jee

JSP - Multiple parameters from request.

To access request parameters in you JSP files, you could do this below

 

 String value = request.getParameter("value_to_acces"); 

 

To access multiple values for the same parameter, you could do this below

 

 String [] values = request.getParameterValues("value_to_access"); 

 

For JSP best practice, you should not use scriptlets. Scriplets increases the design pattern called spaghetti. Hope this helps!

Reduce server restart on java web projects

Java web application development have been criticized a lot in the past as painful compared to building building php web application.  When developing an application in php, developers would refresh the browser to see changes they have made.

In java, the developer would have to  restart the server and then refresh the browser. This process limits developer productivity. JRebel was created to solve this problem and has done this very well. The only problem is that jrebel is not free.  

A free alternate to jrebel is  "Dynamic Code Evaluation Virtaul Machine"  or  "DCEVM" .  I wrote about DCEVM  a while back. This article would describe how I use it in my development environment. My environment consist of the following tools

JEE 6 and 7, something to think about

I recently switched jobs and I have being working on upgrading our applications to JEE 6. Our applications run currently on oc4j(J2EE 1.3). I never heard of oc4j until I took this position.

What I notice is that JEE has made some really good improvements. Things just work. I have being using spring for years and I still love spring. I think a mixture of spring and JEE would be great for any development environment.

The ease of EJBs development is as easy as annotating and your beans get discovered by the container and injected to a managed bean that needs the dependency being requested for.

Subscribe to RSS - jee