Hi guys! I just started the course and I have a small question for the chapter JSP Basics.
This is my code: index.jsp - A form with 3 parameters (username, hobby and nationality) <html> <head><title>Hello</title></head> <body bgcolor="white"> <img src="duke.waving.gif"> <h2>Hello, my name is Duke. My hobby is Golf.</h2> What are your name, hobby and nationality? <form method="get"> <input type="text" name="username" size="25"> <input type="text" name="hobby" size="25"> <input type="text" name="nationality" size="25"> <p></p> <input type="submit" value="Submit"> <input type="reset" value="Reset"> </form> <% String username = request.getParameter("username"); if ( username != null && username.length() > 0 ) { %> <jsp:forward page="middle.jsp"/> <% } %> </body> </html> middle.jsp - I'm adding 2 parameters to the request (1 GET and 1 POST) <html> <% request.setAttribute("myparameterpost", "and enthusiasm!"); %> <jsp:forward page="response.jsp?myparameterget=Passion!"/> </html> response.jsp Printing the 5 parameters <h2><font color="black">Hello, ${param.username}!</font></h2> <h2><font color="black">I didn't know that ${param.nationality}s used to like ${param.hobby} with ${param.myparameterget} <% out.print (request.getAttribute("myparameterpost").toString()); %> </font></h2> Can anyone tell me how to this properly? I'm trying to add 2 parameters: 1. GET = myparameterget 2. POST = myparameterpost Is there a way to get both parameters using the same syntax? Thanks in advance for your help! Diego --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~----------~----~----~----~------~----~------~--~---