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??
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
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.
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
Rocket Oven Kickstarter - from the trailbosshttps://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss