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:
Now the absolutely essential part of this URL is the “actionname” which StandardProxy retrieves from the getPathInfo in the request, like this:
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.