tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Lunnon" <b...@mirrim.com.au>
Subject RE: strange response.getAttribute problem
Date Thu, 23 Jan 2003 22:21:09 GMT
Try
request.getParameter()
also
you should test for null on the parameter (it will probably cause a
NullPointerException down the line)

HTH

Bill

-----Original Message-----
From: Erik Price [mailto:eprice@ptc.com]
Sent: Friday, 24 January 2003 9:16 AM
To: Tomcat Users List
Subject: strange response.getAttribute problem


In my index.jsp file, I have the following snippet of code:

<input type="hidden" name="dest" value="<%=
response.getAttribute("dest") %>" />

I'm trying to capture the value of the "dest" URL parameter.  I tried
setting it as an attribute in the response object that redirects to
index.jsp, and that didn't work.  But I thought for sure that if I
hardcoded it into the URL, it would work.  Strangely, if I call
index.jsp with the following URL:

domain.com:8080/webapp/index.jsp?dest=/test/path

Then the JSP renders as such:

<input type="hidden" name="dest" value="null" />



any idea why the GET attribute's not getting pulled into the JSP?


Thanks,

Erik


--
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