Display Tag 1.1.1 Released
Display Tag version 1.1.1 has been released. This is a bug fix release - see the changelog for more information. Thanks to Fabrizio Giustina for continuing his work on this project.
The Angular Mini-Book is a
guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and
deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.
Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.
For book updates, follow @angular_book on Twitter.
The JHipster Mini-Book is a
guide to getting started with hip technologies today: Angular, Bootstrap, and Spring
Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.
This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.
For book updates, follow @jhipster-book on Twitter.
Display Tag version 1.1.1 has been released. This is a bug fix release - see the changelog for more information. Thanks to Fabrizio Giustina for continuing his work on this project.
Since my last post on trimming whitespace in JSPs seems to be a popular topic, I figured it appropriate to note that JSP 2.1 supports a new trimWhitespace directive.
<%@ page trimDirectiveWhitespaces="true" %>
If you're using a Servlet 2.5 XSD, you can also do this in your web.xml:
<jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <trim-directive-whitespaces>true</trim-directive-whitespaces> </jsp-property-group> </jsp-config>
A Servlet 2.5 XSD seems to be the following:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" metadata-complete="false" version="2.5">
To learn more about this feature, view Summary of New Features in JSP 2.1 Technology and search for "TrimWhiteSpace". It'd be nice if there was anchors in this article for a direct link, but I couldn't find any.
Now I just wish JSP's EL had an xmlEscape="true" flag to escape XML in printed variables. Freemarker supports this.
Hat tip to Kerem and Krishna's Unified Expression Language for JSP and JSF article.
If you're not doing anything this Wednesday, you might want to checkout my Introduction to Apache Roller Webinar. It's sponsored by Covalent and has the following agenda:
11:00: Introductions 11:05: What is Apache Roller 11:10: Installing Roller 11:20: Roller Architecture - 11:25: Blog Customization - 11:35: Server Customization 11:40: Other Features: Using Weblog Clients and Planet 11:50: Q & A
Heck, even if you are doing something, you should still check it out - especially if you're planning on installing Roller for yourself or for your company. Here's the details and how to signup:
Cost: | Free! |
---|---|
When: | Wednesday, June 20, 2007 |
Time: | 11:00am PDT (2:00pm EDT) |
Where: | From the comfort of your home or office |
Technical Level: | Intermediate Technical Track |
To register, click here and follow the provided steps.
About Covalent and Roller
Covalent recently announced it is offering full commercial support for Apache Roller, the open source blog server from the Apache Software Foundation (ASF). Apache Roller drives the Covalent blog, Sun Microsystem's blogs.sun.com blogging site, IBM DeveloperWorks blogs, the Javalobby's 10,000 user strong JRoller Java community site, and hundreds of other blogs world-wide. Roller is a Java Web application that is run on any Java EE server and any relational database.
<Sidenote/>
I think it's important to point out that JRoller and Roller are not the same thing. JRoller is a service provided by JavaLobby that provides free blogs, whereas Roller is the software that powers it. There's been a lot of negative press about JRoller in recent months and from talking to folks, it sounds like most of it is well-deserved. The service is down a fair amount and when it's up, it's extremely slow.
The good news is these problems should go away in the near future. From Matthew Schmidt in a recent JavaLobby Newsletter:
DZone Network Server Upgrades Coming
Over the weekend, Rick and I started the long and painful process of finally upgrading our three-year-old servers to some hardware that should let us scale and meet the needs of the network for the foreseeable future. With these new servers, comes some upgrades that many of you have been trying to beat into my head for months now, including an upgrade to a recent a version of Roller (powers JRoller) as I can find, and an upgrade to the latest and greatest Codebeamer (powers JavaForge). In addition, there's also going to be a much-needed make over to Javalobby and EclipseZone. Of course, these changes won't happen immediately and we'll be migrating to the new hardware first, but keep your eyes open for some nice updates to nearly all our communities. These upgrades have already started and we'd appreciate any feedback you have on whether things like Javalobby and EclipseZone are working properly. Drop me a line if you notice anything not working properly or feeling slow.
IMO, JavaLobby has been mostly mute about its stance on JRoller, and I've heard from folks there's virtually no support. My guess is this is because they've been concentrating on DZone so much. Maybe they need some volunteers to make JRoller more robust? Or maybe it should be moved to other servers that can make money off the service and re-invest it (like wordpress.com)? Hopefully nothing has to change and JRoller can become a higher priority for JavaLobby in the near future.
Update: The webinar went quite well - thanks to everyone who attended! You can download the PowerPoint (or PDF) and audio from Covalent's Webinars. Also, I mentioned a couple of Dave's presentations in my talk. You can download those by clicking on the links below:
Keith Donald has a nice and long writeup on Spring Web Flow 1.0.3's stellar support for JSF:
One important area where our integration is growing is with the Java Server Faces (JSF) community. Beginning with Spring Web Flow 1.0.3, our JSF integration is on-par with what the Spring community expects, and delivers what JSF developers in the trenches need most. This blog will illustrate the integration enhancements to show you the difference Spring Web Flow is making for JSF developers.
One of the most interesting parts of the post is a few paragraphs down:
Basically, Web Flow solves every problem this pour soul experienced with JSF's basic navigation capabilities. As one of our leading users noted, Web Flow can be used as a complete replacement for JSF's default "forward-centric" navigation model.
It's also interesting to note that ideas from SWF could be incorporated into JSF 2.0:
I'd also like to take this opportunity to encourage those already using Spring Web Flow in a JSF environment to speak out about your experience?send me an email, leave a comment here, write an article on JSF central, tell leaders in the JSF community about your experience. Your real world experience can help influence the direction of the JSF 2.0 specification in a time where the specification lead has asked for community feedback. Interface21 has been extended an invitation from Ed Burns, the JSF specification lead, to be a part of the JSF 2.0 expert group, which is a recognition of Web Flow's contribution as an innovative JSF extension. We have accepted that invitation and are excited about helping channel whats proven to work in the area of navigation and state management on a general basis back into JSF 2.0, while continuing to chart new territory and remaining usable in any environment.
Are you using SWF with JSF? If so, have your experiences been good or bad? I'm sure Keith would love to hear about them either way.
I think it's interesting to note that both Interface21 and JBoss are doing a lot to build solutions to JSF's problems. Is there money to be made from supporting JSF? In reality, you have to like what both companies are doing: they're building solutions to overcome the shortcomings of JSF and they're contributing those solutions back to the community for free. Even cooler is the fact that both companies are trying to get their solutions into the next version of JSF. This benefits everyone as far as I'm concerned.
What about those of you using Spring Web Flow with Spring MVC or Struts? How is it working for you?
I recently integrated Spring Web Flow into my current project using the Spring Webflow Plugin. In the past, I've used SWF with Spring MVC and JSF, so the Struts 2 Plugin seemed a bit odd. I guess I'll know more once I start using it more.
This brings up a good question - do you think it's better to create a page flow (i.e. a shopping cart) without Spring Web Flow first, and then refactor? Or do you think it's easier to use SWF from the beginning? My gut feeling is to start w/o it because you may not need it. Then if you do need it, you'll understand the problems it solves. What are your thoughts?
I'm trying to configure Apache and Tomcat to work with a desired architecture for doing A/B Testing on my current project. Our basic idea is that we'll deploy entirely new WAR files when we have a test, then use the magic of Apache's mod_rewrite, mod_jk and possible the UrlRewriteFilter to keep the URLs somewhat consistent between version A and version B. Here's some questions I have for those folks who might've done this before:
In other words, can Apache forward to the correct app going in, and can that app rewrite its URLs so those same URLs are used when going out?
I believe this is all possible. However, I am having difficulty getting mod_jk to allow mod_rewrite to be processed first. If I have the following in httpd.conf, it seems like htdocs/.htaccess gets bypassed.
JkMount /* loadbalancer
Is it possible to configure Apache/mod_jk so WARs can hang off the root, but still use mod_rewrite? If not, the only solution I can think of is to use UrlRewriteFilter in the WAR to forward to another context when a "v" parameter is in the URL. Currently, the UrlRewriteFilter doesn't allow forwarding to another context. The good news is the Servlet API allows it. I got it working in Tomcat (with crossContext enabled) and wrote a patch for the UrlRewriteFilter.
Anyone out there have experience doing A/B Testing in a Java webapp? If so, did you try to disguise the URLs for the different versions?
Update:
I've got a bit of this working. The magic formula seems to be don't try to hang things off the root - use mod_rewrite to make things appear to hang off the root.
First of all, I posted a message similar to this post to the tomcat-user mailing list. Before I did so, I discovered mod_proxy_ajp, which happens to look like the successor to mod_jk. AFAICT, it doesn't allow fine-grained rules (i.e. only serve up *.jsp and *.do from Tomcat), so I'll stick with mod_jk for now.
Rather than proxying all root-level requests to Tomcat, I changed my JkMount to expect all Tomcat applications to have a common prefix. For example, "app".
JkMount /app* loadbalancer
This allows me to create RewriteRules in htdocs/.htaccess to detect the "v" parameter and forward to Tomcat.
RewriteEngine On RewriteCond %{QUERY_STRING} ^v=(.*)$ RewriteRule ^(.*)$ /app%1/ [L]
This isn't that robust as adding another parameter causes the forward to fail. However, it does successfully forward http://localhost/?v=1 to /app1 on Tomcat and http://localhost/?v=2 to /app2 on Tomcat.
What about when ?v=3 is passed in? There's no /app3 installed on Tomcat, so Tomcat's ROOT application will be hit. Using the UrlRewriteFilter, I installed a root application (which we'll likely need anyway) with the following rule:
<rule> <from>^/app(.*)$</from> <to type="forward">/</to> </rule>
So I've solved problem #1: Using URL parameters to serve up different web applications. To solve the second issue (webapps should rewrite their URLs to delete their context path), I found two solutions:
Since I'm using mod_jk, #2 is the reasonable choice. I added the following link in my /app1/index.jsp:
<a href="<c:url value="/products.jsp"/>">link to products</a>
By default, this gets written out as http://localhost/app1/products.jsp. To change it to http://localhost/products.jsp?v=1, I added the following to urlrewrite.xml:
<outbound-rule> <from>^/app1/(.*)$</from> <to>/$1?v=1</to> </outbound-rule>
This produces the desired effect, except that when I click on the link, a new session is created every time. AFAICT, I probably need to do something with cookies so the jsessionid cookie is set for the proper path.
Not bad for a day's work. Only 2 questions remain:
It's entirely possible that mod_proxy_ajp with mod_rewrite_html is best tool for this. Can mod_proxy handle wildcards like JkMount can? I've heard it's faster than mod_jk, so it probably warrants further investigation.
Update 2: I achieved the desired result using mod_rewrite, mod_jk and the UrlRewriteFilter (for outgoing links). Here's what I put in htdocs/.htaccess (on Apache):
RewriteEngine On # http://domain/?v=1 --> http://domain/app1/?v=1 RewriteCond %{QUERY_STRING} v=([^&]+) RewriteRule ^(.*)$ /app%1/$1 [L] # http://domain --> http://domain/app (default ROOT in Tomcat) RewriteRule ^$ /app/ [L]
And in the urlrewrite.xml of each webapp:
<outbound-rule> <from>^/app([0-9])/([A-Za-z0-9]+)\.([A-Za-z0-9]+)$</from> <to>/$2.$3?v=$1</to> </outbound-rule> <outbound-rule> <from>^/app([0-9])/([A-Za-z0-9]+)\.([A-Za-z0-9]+)\?(.*)$</from> <to>/$2.$3?$4&v=$1</to> </outbound-rule>
Next I'll try to see if I can get it all working with mod_proxy_ajp and mod_proxy_html. Anyone know the equivalent of "JkMount /app*" when using LocationMatch with mod_proxy?
The AppFuse Team is pleased to announce the release of AppFuse 2.0 M4! This release marks a milestone in the usability of AppFuse 2.x. A lot of folks (including myself) have been using AppFuse 2.0 on projects and have fixed quite a few issues. In addition to polishing the tutorials, we've fixed a fair amount of i18n bugs and packaging issues with modular archetypes.
We were hoping to get AMP's code generation and XFire integrated in M4, but were it's going to have to wait until M5.
AppFuse 2.0 is available as a Maven archetype. For information on creating a new project using this release, please see the QuickStart Guide.
If you've used AppFuse 1.x, but not 2.x, you'll want to read the FAQ and join the user mailing list if you have any questions. The Maven Reference Guide has a map of Ant » Maven commands.
The 2.0 series of AppFuse has a minumum requirement of the following specification versions:
For more information, please see the 2.0 M4 Release Notes. To see how AppFuse 2.x works, please see the video demos.
Comments and issues should be sent to the mailing list.
We appreciate the time and effort everyone has put toward contributing code and documentation, posting to the mailing lists, and logging issues. We also greatly appreciate the help from our sponsors, particularly Atlassian, Cenqua, Contegix, JetBrains, Java.net and KGBInternet. Without them, working on this project wouldn't be nearly as much fun.
From Java to .NET, Back To Java Again, My Little Impression of The Two:
Having said all these, integration of various java projects together really do take a lot of Java people's time, it's no joke, but it's not desperate. For example, the open source project "AppFuse" does a fantastic job integrating various frameworks for us, I strongly encourage everyone to give it a shot and see how much time it saves you.
So which platform do I like? My impression is Java offers a lot flexibility and choices, but at the same time introduced the "Paradox of Choices", having so many things and integrate them together is no easy task, it simply overwhelm the human brains. .NET on the other hand is in a controlled environment, less choices, but easy to develop.
In other words: Java development is way more complicated than .NET ... unless you use AppFuse.
Ever since Virtuas shut down a couple weeks ago, I've been having a blast. Mostly, I've been working on AppFuse, but I've also been spending more time with Julie and the kids. Where I work varies from day-to-day. Some mornings, I'll head to our local Einstein's or the close by Spanky's Roadhouse. Other days, I'll work from home and let the kids harass me all day. I'll admit, there's some days that are frustrating when I'm about to solve a problem and the kids are yanking my fingers off the keyboard. However, there's others where the music is cranked, the kids are dancing in my office, and I just solved a problem that was bugging me for the last 6 hours. There's nothing like having a Woo hoo! after solving a problem you've been wrestling with all morning. It's even better when there's friends around to help you celebrate. My whooping and clapping often leads to games of "horsey", happy kids, and a worn out dad.
In AppFuse news, I finished all the web framework tutorials a couple nights ago. Since the beginning of this year, I've written over 100 pages worth of AppFuse documentation. Wednesday's "the web tutorials are done" was a huge milestone and it feels great to be done with it. We hope to release 2.0 M3 in the next few days.
Yesterday, after getting 8" snow reports from Beaver Creek two days in a row, I suggested to Julie that we "head for the hills" for a day of skiing. She agreed and we left a few hours later. We ended up at Keystone since they have cheap skiing for kids and it's one of the closest ski resorts to Denver. Leaving last night was brutal. It starting snowing around 2pm and we left town around 5:30. We quickly ended up in rush hour traffic and it took us an hour just to get out of town (to the top of Lookout Mountain). Once we hit Idaho Springs, the roads improved and by the time we got to the tunnel the roads were bare and dry.
Coming up here last night turned out to be a good idea. Denver experienced a record low of -18° F this morning. Furthermore, there were wicked winds and west-bound I-70 was closed for 9 hours this morning because a semi blew over and spilled all of its 2000 gallons of unleaded. I watched the story on the news and was quite impressed when I heard the wind was so strong it was blowing windows out of cars.
The skiing at Keystone today was bitter cold (-15 to -25 °F with wind chills), but I made it work. Hot Cider and bump runs are excellent ways to keep warm. Now we're sitting in the condo we rented and waiting for the kids to wake up so we can enjoy FAC at the local bowling alley.
Life is good.
Did you know the SiteMesh folks released version 2.3 back in October? Here's proof. Unfortunately, there's no release notes and the release hasn't been uploaded to Maven's repository. There are release notes in JIRA, but not all of them seemed to be fixed. What's up with that? Did you guys forget how to manage a project?
Mike Stenhouse is the creator of the CSS Framework we use in AppFuse. Mike is going to talk about the tools he uses to develop web applications. Mike works solely on the front-end, no backend work.
"In 2007 we’ll witness the increasing dominance of open internet standards. As web access via mobile phones grows, these standards will sweep aside the proprietary protocols promoted by individual companies striving for technical monopoly. Today’s desktop software will be overtaken by internet-based services that enable users to choose the document formats, search tools and editing capability that best suit their needs." -- Eric Schmidt, CEO Google
Web Standards is a methodology and philosophy, not just valid CSS and XHTML. The main philosophy behind web standards is progressive enhancement. The methodology behind web standards is a 3-step process.[Read More]