My company has written its own servlet framework.  Instead of making every single request a servlet, we have one ServletProxy which runs actions.  The URL looks like this:

 

http://servername/ContextRoot/StandardProxy/actionname?name=value&name=value

 

Now the absolutely essential part of this URL is the “actionname” which StandardProxy retrieves from the getPathInfo in the request, like this:

 

http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getPathInfo%28%29

 

We want to use ServletUnit to test our framework but I cannot see any way to put this “Path Info” into our request.  Putting it in the URL  of the PostMethodWebRequest like this:

 

            WebRequest request = new PostMethodWebRequest("http://test.walgreens.com/StandardProxy/actionname");

 

Does  not work.  It says there is no servlet of the name defined.  If you take the actionname off the URL it does recognize the servlet.

 

Any ideas?

 

James Simmons