In web.xml map *.jsp to StripesFilter.

    <filter-mapping>
        <filter-name>StripesFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>

Christian

-----Original Message-----
From: Srini Nagul [mailto:[email protected]]
Sent: Tuesday, March 10, 2009 10:38 AM
To: [email protected]
Subject: [Stripes-dev] Calling Stripes action from Struts app

I am trying to invoke a Stripes action from an existing Struts web application.
After configuring Stripes Filter, DispatcherServlet in web.xml, I tried to call 
Stripes action from inside a JSP using code below:

[BEGIN -Contents of "One.JSP"]

  <stripes:link beanclass="com.trystripes.action.HelloActionBean"
           event="currentDate"> Show current Date and Time
  </stripes:link>

[END -Contents of "One.JSP"]

 The HelloActionBean is pretty much from Frederic Daoud's example. When I 
invoke struts action that displas One.JSP, I get the following error:
=======================================
ERROR StripesFilter:72 -
net.sourceforge.stripes.exception.StripesRuntimeException: Something is trying 
to access the current Stripes configuration but the current request was never 
routed through the StripesFilter! As a result the appropriate Configuration 
object cannot be located. Please take a look at the exact URL in your browser's 
address bar and ensure that any requests to that URL will be filtered through 
the StripesFilter according to the filter mappings in your web.xml.
        at net.sourceforge.stripes.controller.StripesFilter.getConfiguration
(StripesFilter.java:110)
        at net.sourceforge.stripes.tag.StripesTagSupport.getActionBeanUrl
(StripesTagSupport.java:224)
=======================================
 On the one hand I want to keep the existing Struts action- and yet have a way 
to get a starting point to invoke my stripes action. How can I do that?
Eventually, I plan to move to Stripes, but I want to do it incrementally. Any 
help will be greatly appreciated.

Thanks
 Srini



------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to