On Apr 30, 9:57 pm, Alfredo Vargas <alfredovarga...@gmail.com> wrote: > Dear all, > > I'm working on the third lab of 4003_jspbasics. I can't get it work. > > on index.jsp I have this: I'm not sure you forgot something here, but I don't see the form, so maybe you need to include the form, like the one you have in hello1 project, plus the birthplace field.
> > <% > String username = request.getParameter(" > username"); Here you don't need to define hobby and bplace, there are already transmitted through the form. > String hobby = request.getParameter("hobby"); > String bplace = request.getParameter("birthplace"); > if ( username != null && username.length() > 0 ) { > %> > Here I use: /midle.jsp not midle.jsp > <jsp:forward page="midle.jsp"> > <jsp:param name="myParameter" value="passion!"/> > </jsp:forward> > <% > } > %> > > in midle.jsp > > <body> > <h1>Midle</h1> > <%@ include file="response.jsp" %> > </body> > > in response.jsp > Here it is not <%= whatever %>, but ${param.whatever}, you don't have the values in the page, you have them in the param which was transmitted. Michèle > Hello, <%= username %>! <br/> > Your hobby is <%= hobby %> <br/> > Your Birth Place is <%= bplace %> > New Parameter: <%= myParameter %> > > for each parameter I get this error: > > *PWC6197: An error occurred at line: 28 in the jsp file: /response.jsp > PWC6199: Generated servlet error: > string:///midle_jsp.java:67: cannot find symbol > symbol : variable username > location: class org.apache.jsp.midle_jsp > > What I'm doing wrong? > > The homework is supposed to to this: > *The index.jsp forwards the request to another JSP file called > middle.jsp. Before > forwarding, it should add another String type parameter called > myparameter with > value "Passion!" to the request object. The middle.jsp then includes the > response.jsp. The response.jsp should display the value of the > myparameter along > with name and hobby. > > Thanks so much > > -- > 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 > java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/java-ee-j2ee-programming-with-passion?... -- 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 java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en