This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
following is the code for A.jsp <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>JSP Example For SCJD</title> </head> <body> <%! String who="";%> <form> Enter your name:<input type="text" name="who"> <input type=submit value="Submit"> </form> <jsp:forward page="welcome.jsp"> <jsp aram name="who" value="<%= who%>"/> </jsp:forward> </body> </html> and below is the code for welcome.jsp <html> <head> <title>Trupti's first JSP for SCJD</title> </head> <body> <%--<%! String name="";%>--%> Welcome!! <%=who%>. This is my first example for the SCJD study group. </body> </html> when I submit the name, the welcome.jsp should display the line with the name entered by the user. e.g. welcome!! trupti But the A.jsp directly forwords the request to welcome.jsp without showing the form. How do I achieve it? thanks, Trupti [ November 27, 2002: Message edited by: trupti nigam ] [ November 27, 2002: Message edited by: trupti nigam ]
hi Trupti, i guess what u want is, simple HTML that has a form having Name field and Submit button and then the action for that form to be "welcome.jsp". when u click on Submit after entering the Name it should go to Welcome page that says "Welcome, <<user>>", right? if i were u , i would have done following, <html> <form name='f' action='/jsp/Welcome.jsp' method=post> <input type='text' name='name' value='Trupti'> <input type='submit' name='submit' value='Submit'> </form> </html> and Welcome.jsp code is fine. regards, Maulin
Hello Trupti, There is small change in welcome.jsp.You are passing the parameter to welcome.jsp thru jsp param but in welcome.jsp you should get the same param by using the getParameter("<parameter name>") into the string and then print it in the scriptlet.Hope it helps you. Ravi
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com