Two Laptop Bag
The moose likes Servlets and the fly likes JSP vs Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP vs Bean" Watch "JSP vs Bean" New topic

JSP vs Bean

ismail ismail

Joined: Jun 28, 2001
Posts: 4
Hi all,
I have a JSP application that connects to an app server thru API call. I have to open a connection for each user and I have implemented it in the following way:
login.jsp-- submits to -->processLogin.jsp
processLogin includes a file called incConnection.jsp (incConnection.jsp has a function that takes in the username/password and returns a connection object)
processLogin.jsp checks if the connection object is null or no and redirects based on that to either homepage.jsp OR login.jsp
Here are my questions:
1. Is it be better to implement the code in incConnection.jsp into a Bean?
2. Will using a Bean to handle the connection have different effect(+ve or -ve) on the jsp/servelet engine?
3. Either way, I assume I will need to keep trak of the individual connection object (in a session variable), I am right?
I am trying to find out the pluses of using a Bean vs. the jsp I have now.
Your help is appreciated.
I agree. Here's the link:
subject: JSP vs Bean
jQuery in Action, 3rd edition