jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryan hansen <b...@yahoo.com>
Subject RE: Cactus test and Struts
Date Wed, 16 Mar 2005 17:05:45 GMT
I have:

<servlet>
 <servlet-name>ServletRedirector</servlet-name>

<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
</servlet>
<servlet>
 <servlet-name>JspRedirector</servlet-name>
 <jsp-file>/jspRedirector.jsp</jsp-file>
</servlet>

<servlet-mapping>
   <servlet-name>ServletRedirector</servlet-name>
   <url-pattern>/ServletRedirector</url-pattern>
</servlet-mapping>
<servlet-mapping>
   <servlet-name>JspRedirector</servlet-name>
   <url-pattern>/JspRedirector</url-pattern>
</servlet-mapping>

in the deployed cactus-war file. It is deploying
correctly for both JBoss and Tomcat. I have actually
started the server up for the cactus instance and it
runs just fine. It just dies on my url. I would expect
to see a struts error message if it wasn't finding the
mapping in struts correctly. 

Thanks,

Bryan

--- basista.juraj@hypotecnibanka.cz wrote:
> It looks like your web-app wasn't successfuly
> deployed or cactifywar wasn't call. Try to check log
> and also if your web.xml contains something like
> this :
> 
> <servlet>
>      <servlet-name>ServletRedirector</servlet-name>
>     
>
<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
> </servlet>
> <servlet-mapping>
>     <servlet-name>ServletRedirector</servlet-name>
>     <url-pattern>/ServletRedirector</url-pattern>
> </servlet-mapping>
> 
> Dursik
> 
> -----Original Message-----
> From: bryan hansen [mailto:bh5k@yahoo.com]
> Sent: Tuesday, March 15, 2005 10:41 PM
> To: cactus-user@jakarta.apache.org
> Subject: Cactus test and Struts
> 
> 
> We are using cactus to test some struts actions. I
> am
> getting an error and not sure what the cause is. BTW
> if somebody has found a better way to do this, I am
> open for suggestions.
> 
> We simply add the URI that we want to request and
> the
> appropriate paramaters in the begin method:
> 
> private void beginAction(WebRequest request) {
>   request.addHeader("URI",
> "/lease/leaseSummary.do");
>   request.addParameter("command", "viewLease");
>   request.addParameter("itemId","1301");
>   request.addParameter("structureId", "1111");      
> }
> 
> We then access the action servlet:
> 
> public void testAction() throws Exception {
>   ActionServlet servlet = new ActionServlet();
>   servlet.init(config);
>   UserSessionValues usv = new UserSessionValues();
>   session.setAttribute("userInfo", usv);   
>         
>   servlet.doPost(request, response);
>         
>   UserSessionValues usvSession = (UserSessionValues)
> request.getSession().getAttribute("userInfo");
>         
>    assertNotNull(usvSession);       
>           
> }
> 
> 
> The output from this test results in a bunch of
> debug
> code, but ultimately this:
> 
>     [cactus] 14:09:54,114 DEBUG wire: << "HTTP/1.1
> 404
> Invalid path /ServletRedirector was
> requested[\r][\n]"
> 
> I get the same error message on Tomcat and JBoss.
> 
> Any ideas?
> 
> Thanks,
> 
> Bryan
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

Mime
View raw message