1) WelcomeServlet : Prints Welcome Message along with the userName and have one Button., something like "Take a tour"
2) TourServlet : Executes when user clicks on the Button on WelcomeServlet and it Prints the Same UserName along with some message
i am able to code two different Servlets.. but dont know how should i pass the UserName from one servlet to another??
isn't there any method or way through which i can pass values from one servlet to another
IF both servlets are in the same web application, the usual way to share user-specific information is the "session" - an instance of HttpSession managed by the servlet container and associated with a user's browser session.
This is all very basic stuff, perhaps you should locate a tutorial on servlets
and nice site Bill
just wanted to conform is this approach is Right... for a Live Application.
Is there any disadvantages to use this approach.??
Information unique to a user's interaction with a particular application belongs in the HttpSession if you want to use the standard API. Each user session gets a separate HttpSession object that is managed by the container for the application.
Again, this is basic stuff better covered in a tutorial.