Stephen,

Thanks for your reply.  As shown in the modified version of
DirectRequest.jsp, even if I added in the check for whether the parameter
"p" is null and direct the destination to a default page if it is null, my
problem with Netscape Browser still exists.  In my application, the
parameter "p" is never null because it's sent in from a HTML Form as a radio
button with a default value.  If I had commented out the "<jsp:forward..."
line, the Nescape Browser will recognize "p" with some value.  But as soon
as I uncomment the line, the Netscape Browser will start to think "p" is
null.  IE however handles it correctly.  

        <body>
        <%
           String p=request.getParameter("p");
           if (p==null) {
            p=""; 
         }
           String destination=null;
           if (p.equals("v1")) {
             destination="page1.jsp"; 
           }
           else if (p.equals("v2")) {
             destination="page2.jsp"; 
           }
           else if (p.equals("v3")) {
             destination="page3.jsp";
           }
         else {
           destination="error.jsp"; 
         }
        %>
      <%=destination%>
      <%--
        <jsp:forward page="<%= destination %>" />
      --%>
        </body>  

Any help is greatly appreciated.

Thanks,
Sue

-----Original Message-----
From: Stephen Oakes [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 7:50 PM
To: JRun-Talk
Subject: RE: request forwarding error in Netscape Browser 6.0



Sue,
There are at least two problems with your code.  First, you should check
that the parameter "p" actually exists.

Eg.
        String p=request.getParameter("p");
        if (p == null)
                p= new String("");


Secondly, you should not call "forward" if p does not have one of the
expected values, or you should have a default destination page.

HTH...
--
Stephen Oakes, Senior Developer.  [EMAIL PROTECTED]
Atomic Media, Level 1/216 City Road, Southbank, 3006.  +613 9695 5777
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to