On 6/2/07, ibozo <[EMAIL PROTECTED]> 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.

http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html

-Rashmi

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to