one way to fix this...
 
 
<form method="post" name="forma" action="/servlet/Myservlet">
*************
<input type = "hidden" name ="page" value = "MainDir/jsptemplates/MainIndexSearchPage.jsp" >
********************
<input type="text" name="search">
<input type=submit" name"search">
</form>
please note that the action is changed from
/servlet/Myservlet?page=MainDir/jsptemplates/MainIndexSearchPage.jsp
to
/servlet/Myservlet
 
 
regards
guru
 
 
( and one thing i think you are good at servlet but lack the basics of how get and post work .... )
 
( sorry but you are doing wrong way of development because action should be the servelet and all others should be in hidden types if you are usign a form ) ....
 
 
 
-----Original Message-----
From: GW [mailto:[EMAIL PROTECTED]]
Sent: 07 May 2002 15:02
To: [EMAIL PROTECTED]
Subject: strange url anyone have an idea

Hi all
 
I would like to know if anyone has an idea why this happens:
 
I have a servlet entry in my web.xml:
 
<servlet>
  <servlet-name>myServlet</servlet-name>
  <servlet-class>path.to.Myservlet.class</servlet-class>
  <init-param>
        <param-name>propertiesLocation</param-name>
        <param-value>path.to.properties.file
</param-value>
  </init-param>
</servlet>
 
the properties file holds info about the path to the jsp to be served etc...
when I make the request:
 
 
everything works fine...
with getParameter("search");
 
dfgfdg is returned.
 
Now when I insert this form:
 
<form method="post" name="forma" action="/servlet/Myservlet?page=MainDir/jsptemplates/MainIndexSearchPage.jsp">
<input type="text" name="search">
<input type=submit" name"search">
</form>
 
I get an error 500 (internal server)
with a url displayed like this
 
 
it looks like the url gets build up again for some reason
i know the %2F etc... characters is the browsers interpretation of special characters.
 
 
does anyone know why this happens?
 
Kind Regards
GW

Reply via email to