Dear all,

I'm working on the third lab of 4003_jspbasics. I can't get it work.

on index.jsp I have this:

        <%
            String username = request.getParameter("
username");
            String hobby = request.getParameter("hobby");
            String bplace = request.getParameter("birthplace");
            if ( username != null && username.length() > 0 ) {
        %>

            <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

        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 at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to