![]() Make sure your project is there on the right side under 'Configured'. Select Tomcat (Make sure status is started) and click Next Right click first.jsp and select Run As > Run on Server Note that when we invoke first.jsp, it will invoke second.jsp passing the form parameter username as a request parameter to second.jsp. ![]() Request.getParameter("username") will get the value of a request parameter with name username. Open the JSP file and within the body tags ( and ), place the below code:.Now create another JSP file the same way inside WebContent and give the name 'second.jsp' second.jsp) is invoked passing the form parameters (e.g. Once the data is submitted, the jsp/servlet given in the ACTION (e.g. This will create a form that will ask user for his name. Open the JSP file and within the body tags ( and ), place the below code: Right click on the WebContent folder and select 'New > JSP File' or 'New > Other > Web > JSP File', give the name first.jsp and click finish. ![]() Give a name for the project, say 'MyDynaProject' in the wizrard, leave everything else as defaults and click Finish.Ĭreate a jsp file inside WebContent folder. ![]() Select 'File > New > Dynamic Web Project' or 'File > New > Project > Web > Dynamic Web Project'. We will create a simple JSP form and then submit the form with action as another jsp and retrieve the form parameters which are received as request parameters in the second jsp file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |