Monthly Archives: March 2011

3n+1 path

While reading Programming Challenges I thought of implementing the path of 3n+1 for a given number. Here is my first stab in Java. I am not trying to solve the problem, however I thought it is interesting to print the … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Ant war task

Many of us build war files as part of the project, however some projects stilll use jar and copy ant tasks to assemble war file. However ant has a built-in war task which takes care of web.xml, classes, libraries etc., … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Validation and erroror reporting in Struts 1.1

One of the benefits of using Struts framework is declarative validation mechanism and error reporting. Struts provides validation hook so that you can implement your own validation logic in action classes. The validation can be turned on/off in action mapping … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Internationalization in Struts 1.1

How do you internationalize your struts 1.1 application?¬† Here are simple steps: Prepare you language speicific resource bundles. Provide default resource bundle in struts-config.xml using message-resources Include struts bean tag lib in your web.xml using taglib In JSP,¬† include your … Continue reading

Posted in Uncategorized | Tagged , | 1 Comment

Implicit objects in JavaServer Pages.

In JSP you can get access to the following implicit objects: request РHttpServletRequest response  РHttpServletResponse Session РHttpSession out РJspWriter application РServletContext config РServletConfig pageContext page exception (available only to error pages).

Posted in Uncategorized | Tagged , , | 1 Comment