Try this: http://localhost/mydir/test%20with%20spaces.jsp?one=1&two=2
Literal spaces are not legal in URLs (as Cees pointed out) but they can be encoded as %20 and that should be decoded correctly by Tomcat. -- Tim Moore / Blackboard Inc. / Software Engineer 1899 L Street, NW / 5th Floor / Washington, DC 20036 Phone 202-463-4860 ext. 258 / Fax 202-463-4863 > -----Original Message----- > From: Ian Pilborough [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 13, 2002 6:29 AM > To: 'Tomcat Users List' > Subject: Tomcat/IIS losing request parameters > > > Hi, > > I have problem with IIS and Tomcat losing request parameters. > > I have a set-up with IIS 5.0 and Tomcat 4.0.6 on Windows 2002 > Advanced Server and JDK 1.3.1_01 and for sometime this has > worked fine, but I have just noticed that request parameters > are lost when there are spaces in the filenames of a JSP being served. > > With this code to loop through request.getParameters() on two > pages I get two different outputs from the same request parameters. > > <% > > int i =0; > for (Enumeration e = request.getParameterNames() ; > e.hasMoreElements() ;) {%> > <%=++i%> = <%=e.nextElement()%><BR> > <%} > > %> > > For > > http://localhost/mydir/testwithoutspaces.jsp?one=1&two=2 > > I get: > > 1 = one > 2 = two > > For > http://localhost/mydir/test with spaces.jsp?one=1&two=2 I get nothing returned. If I hit the pages via port 8080 I get the correct response (i.e. from testwithoutspaces.jsp above) from both pages. I can't see what is happening here and wondered if this is a known "feature" when using filenames that contain spaces between words. I've looked for similar problems with lost request parameters and all I have found is that IE sending URLs in UTF-8 can cause a problem with certain versions of Tomcat. None of the problems I reviewed mentioned IIS and Tomcat in conjunction though. If tomcat handles the URLs fine as standalone on port 8080 the only difference is with requests being passed through to Tomcat from IIS via the AJP connector. I've got two further problems, in that I didn't configure the original system and that the system is in a co-location centre that I don't have much access to. I'm currently setting up a test environment with IIS, but that's not working at present, the original test environment didn't use IIS and so I'm fighting to get a test set-up ready to work on this. (The joys of picking up other's pieces eh?) Finally, it is not possible to create the filenames without spaces in them due to the software that produces each JSP (it's a long story, but not relevant to this discussion). If anyone has any ideas, please send me a message, otherwise I shall continue to trawl the net. Cheers, Ian -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>