At 04:42 PM 9/15/99 +0000, Sandy Tiu wrote:
>"Account does not exist."
>
>I found out that I have to parse the above string and replace all spaces
>with a "%20" before appending it to the url. It worked after
>I did this. Is there a better way?
<%
String encodedMsg = java.net.URLEncoder.encode(e.getMessage());
response.sendRedirect("udpate_error.jsp?msg=" + encodedMsg);
%>
Although, I think a better way would be to have the databse throw an
exception, and then set <%@ page errorPage="update_error.jsp" %>, instead
of trying to pass an exception message in the URL.
Marc Hedlund <[EMAIL PROTECTED]>
Director of Web Applications
BEA WebXpress <http://weblogic.beasys.com/>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html