Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Redirecting to a JSP with parameters

843835May 7 2003 — edited May 7 2003
Hey all,

I'm trying to get form parameters on a page, then redirect the user to a new JSP page using URL rewriting, with those parameters in the URL. I can only use JSPs for this - no beans or servlets. I can get the parameters easily but I'm having a problem with the page redirect. Part of my code is below:

<form name="userUpdate" action=<response.encodeRedirectURL("DisplayUpdate.jsp?date=<%=date%>&dayofweek=<%=dayofweek%>&author=<%=author%>&headline=<%=headline%>&clip=<%=clip%>&
publication=<%=publication%>&link=<%=link%>&newslocation=<%=newslocation%>&category=<%=category%>&keywords=<%=keywords%>")>

This gives me an error:

HTTP Status 404 - /<response.encodeRedirectURL("DisplayUpdate.jsp
------------------------------------------------------------------------type Status report
message /<response.encodeRedirectURL("DisplayUpdate.jsp
description The requested resource (/<response.encodeRedirectURL("DisplayUpdate.jsp) is not available.
-----------------------------------------------------------------------
Apache Tomcat/4.1.24

I think this is happening because it is trying to interpret the form action as a straight up URL instead of Java code. But when I tried enclosing it with the <%> operators I got a long list of Servlet exceptions. Any ideas on how to fix this?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2003
Added on May 7 2003
3 comments
937 views