tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sharples, Brian" <Brian.Sharp...@cingular.com>
Subject RE: Errors Compiling a JSP
Date Thu, 15 Aug 2002 15:40:06 GMT
If I get rid of the bang I get another internal error with no other
information.

-----Original Message-----
From: Durham David Cntr 805CSS/SCBE [mailto:David.Durham1@scott.af.mil]
Sent: Thursday, August 15, 2002 11:29 AM
To: Tomcat Users List
Subject: RE: Errors Compiling a JSP


get rid of that bang.  The bang is for declaring class level stuff.
i.e.
<% String [] colorValues = ...   instead of <%! String

> -----Original Message-----
> From: Sharples, Brian [mailto:Brian.Sharples@cingular.com]
> Sent: Thursday, August 15, 2002 10:15 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Errors Compiling a JSP
> 
> 
> Hi,
> 
> I am learning JSP with the SAMS book"Teach Yourself JSP in 24 
> Hours".  One
> of the sample JSPs keeps getting a compiler error.  The code is:
> 
> <HTML>
> <HEAD><TITLE>JSP that processes parameters in a link</TITLE></HEAD>
> <BODY>
> Parameters
> <UL>
> <LI>Country = <%= request.getParameter("country") %>
> <LI>Colors:
> 	<UL>
> 	<%! String[] colorValues = 
> request.getParameterValues("colors"); %>
> 	<LI>Color 1 = <%= colorValues[0]%>
> 	<LI>Color 2 = <%= colorValues[1]%>
> 	<LI>Color 3 = <%= colorValues[2]%>
> 	</UL>
> </UL>
> </BODY>
> </HTML>
> 
> The error is a status 500 - Internal Server Error: Undefined 
> variable or
> class name: request
> String[] colorValues = request.getParameterValues("colors"); 
> If I remove the colorValues variable declaration and just put <%
> request.getParameterValues("colors") %>, I get past that 
> line.  Of course,
> the next line then shows colorValues as undefined.
> I don't understand why this is occurring.  I am using Tomcat 
> 4.0.4 and j2sdk
> 1.4.0_01.
> Thanks for your help.
> Brian Sharples
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message