I got that error before, look in response.jsp

<h2><font color="black">Hello, <%= username %>!</font></h2>

and change it to

<h2><font color="black">Hello, ${param.username}</font></h2>

that will take the error away

 

 

I implemented what you did this other way :

 

        <%
            String username = request.getParameter("username");
            if ( username != null && username.length() > 0 ) {
        %>
        <% } %>
      
        <jsp:forward page="middle.jsp">
            <jsp:param name="myparameter" value="Passion!" />
        </jsp:forward>
 


Date: Fri, 20 Feb 2009 11:56:20 -0800
From: biljana_b...@yahoo.com
Subject: [java ee programming] Help my with homework
To: java-ee-j2ee-programming-with-passion@googlegroups.com






I try to do my #3 homwork, I have problem:
For those who knew:
in index.jsp i added
....
    <%
            String myparameter = "Passion";
            String username = request.getParameter("username");
            if ( username != null && username.length() > 0 ) {
        %>
        <jsp:forward page="middle.jsp"/>
        <%
            ....
then I write middle.jsp like this:
 

<%...@include file="response.jsp" %>
 
and response.jsp is ok, but after I click Submit in arise page, I have  got 
this error:
 
HTTP Status 500 - 


type Exception report
message
descriptionThe server encountered an internal error () that prevented it from 
fulfilling this request.
exception org.apache.jasper.JasperException: PWC6033: Unable to compile class 
for JSP

PWC6197: An error occurred at line: 28 in the jsp file: /response.jsp
PWC6199: Generated servlet error:
string:///middle_jsp.java:80: cannot find symbol
symbol  : variable username
location: class org.apache.jsp.middle_jsp

PWC6199: Generated servlet error:
Note: string:///middle_jsp.java from  uses unchecked or unsafe operations.

PWC6199: Generated servlet error:
Note: Recompile with -Xlint:unchecked for details.



note The full stack traces of the exception and its root causes are available 
in the Sun GlassFish Enterprise Server v2.1 logs.


Sun GlassFish Enterprise Server v2.1
 
What is my mistake?
 
Please help me,
Biljana

 



_________________________________________________________________
Windows Liveā„¢: Keep your life in sync. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_022009
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to