I work with MVC model implementation recomended by IBM where I submit from a
JSP to a controller
servlet which redirect the request to whatever handler, I found the following behaviour, which occured on a single machine with IBM WepSphere AppServer 3.5.5 and doesn't occur on others:
I printed the following with the
java APIs for getting the request
string, servlet path, etc.....
Servlet Path = /controller.
Path info = /PublishingHandler.
Request URI = /vi_debug/controller/PublishingHandler.
Query String = Page=displayPublishing&relatedPublishingId=3&displayPublishingClosePageParameter=/vi_debug/controller/PublishingAdministrationHandler?Page=navigate_create_show_publishing_publishing%26CategoryToNavigate=1.
From the above values you can c that the query string contains key=value pairs but when I try to get the parameter values using the following code:
// Obtain the request parameters
Enumeration parameterEnum = p_Request.getParameterNames();
if ( parameterEnum.hasMoreElements() )
System.out.println( "Enumeration has elements" );
else
System.out.println( "Enumeration don't have elements" );
// Go through them one at a time and print them out
while ( parameterEnum.hasMoreElements() ) {
String name = (String) parameterEnum.nextElement();
System.out.println( "Parameter name: " + name );
System.out.println( "Parameter value: " + p_Request.getParameter( name ) );
}
I got the message that Enumeration don't have elements, I recognized that this happens when the querystring contains %26 I'm using this character so that I submit with a query string that have more than ? character & I wanted to keep the & that occured after the second ?
Also I used the upload utility from orielly, and the form is multi-part & I concatenat some values in the query string, but I didn't get them using getParameter, Is the getParameter method not used when the form is muli-part, and if so what with used in this case?
thankx for yr time.