Need "extra path information" to test apps using our framework.

"Simmons, James D." <[email protected]> Wed, 14 Mar 2012 14:35:31 +0000
Newsgroups gmane.comp.web.httpunit.devel
Message-ID <7EC8F5E7586FB646841E059187D0A0496A3545B6@DMS-S8MP-3MB.wagresources.walgreens.local>
--===============8764174070079224156==
Content-Type: multipart/alternative;
	boundary="_000_7EC8F5E7586FB646841E059187D0A0496A3545B6DMSS8MP3MBwagre_"
Content-Language: en-US

--_000_7EC8F5E7586FB646841E059187D0A0496A3545B6DMSS8MP3MBwagre_
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="us-ascii"

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=3Dvalue&name=3D=
value

Now the absolutely essential part of this URL is the "actionname" which Sta=
ndardProxy retrieves from the getPathInfo in the request, like this:

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

We want to use ServletUnit to test our framework but I cannot see any way t=
o put this "Path Info" into our request.  Putting it in the URL  of the Pos=
tMethodWebRequest like this:

            WebRequest request =3D new PostMethodWebRequest("http://test.wa=
lgreens.com/StandardProxy/actionname");

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

Any ideas?

James Simmons



--_000_7EC8F5E7586FB646841E059187D0A0496A3545B6DMSS8MP3MBwagre_
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="us-ascii"

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">My company has written its own servlet framework.&nb=
sp; Instead of making every single request a servlet, we have one ServletPr=
oxy which runs actions.&nbsp; The URL looks like this:<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><a href=3D"http://servername/ContextRoot/StandardPro=
xy/actionname?name=3Dvalue&amp;name=3Dvalue">http://servername/ContextRoot/=
StandardProxy/actionname?name=3Dvalue&amp;name=3Dvalue</a><o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">Now the absolutely essential part of this URL is the=
 &#8220;actionname&#8221; which StandardProxy retrieves from the getPathInf=
o in the request, like this:<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><a href=3D"http://docs.oracle.com/javaee/6/api/javax=
/servlet/http/HttpServletRequest.html#getPathInfo%28%29">http://docs.oracle=
.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html#getPathInfo%28=
%29</a><o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">We want to use ServletUnit to test our framework but=
 I cannot see any way to put this &#8220;Path Info&#8221; into our request.=
&nbsp; Putting it in the URL &nbsp;of the PostMethodWebRequest like this:<o=
:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si=
ze:10.0pt;font-family:&quot;Courier New&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WebRequest request =3D new PostMetho=
dWebRequest(&quot;http://test.walgreens.com/StandardProxy/actionname&quot;)=
;<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none"><span style=3D"font-si=
ze:10.0pt;font-family:&quot;Courier New&quot;"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none">Does &nbsp;not work.&n=
bsp; It says there is no servlet of the name defined.&nbsp; If you take the=
 actionname off the URL it does recognize the servlet.<o:p></o:p></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none">Any ideas?<o:p></o:p><=
/p>
<p class=3D"MsoNormal" style=3D"text-autospace:none"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none">James Simmons<o:p></o:=
p></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

--_000_7EC8F5E7586FB646841E059187D0A0496A3545B6DMSS8MP3MBwagre_--



--===============8764174070079224156==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
--===============8764174070079224156==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Httpunit-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/httpunit-develop

--===============8764174070079224156==--