tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Rubdi" <>
Subject Re: Tomcat session varibale
Date Sat, 02 Jun 2007 19:17:33 GMT
On 6/2/07, ibozo <> wrote:
> Thanks again..
> Here is my first code that takes two varibles from client to log in, as
> email adress and password. And puts the email adress into a session variable
> as:

With reference to the code in the previous post, it could be made a
lot simpler and easier if you follow the MVC design pattern.

Once you make it simpler you can easily see how to get the session in
a servlet and how to set and get values to it.

1) Write the HTML in a JSP instead of a Servlet

2) Use the Servlet as a medium between the front end (JSP) and the
back end (Java classes and JDBC)

3) Define the Servlet mapping in web.xml

4) Submit the form from the JSP to the Servlet (URL pattern from web.xml)

Take a look at this clickable diagram.


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message