Gregg Bolinger wrote:
> If you are using Stripes 1.5 

Sorry, I am using 1.5

> defined as your Extensions package and Stripes will wire it in for you. 

I'm too new at this to know what an Extensions package is.

I tried this:

<filter>
        <display-name>Stripes Filter</display-name>
        <filter-name>StripesFilter</filter-name>
        
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
  <init-param>
     <param-name>ActionResolver.Packages</param-name>
     <param-value>com.fnfbook</param-value>
  </init-param>
  <init-param>
       <param-name>ActionBeanContext.Class</param-name>
       <param-value>com.fnfbook.beans.FnFActionBeanContext</param-value>
  </init-param>
 </filter>

I get the error
 Could not create instance of ActionBean type [com.fnfbook.beans.Login].

If I merge the two "init-param" sections, then I get a 404
description The requested resource (/fnfapp/) is not available.
with this as the web.xml
<filter>
        <display-name>Stripes Filter</display-name>
        <filter-name>StripesFilter</filter-name>
        
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
  <init-param>
     <param-name>ActionResolver.Packages</param-name>
     <param-value>com.fnfbook</param-value>
     <param-name>ActionBeanContext.Class</param-name>
     <param-value>com.fnfbook.beans.FnFActionBeanContext</param-value>
  </init-param>
 </filter>

Thanks
Pat



> You'll need something like this in the web.xml
> 
> <init-param>
>     <param-name>Extension.Packages</param-name>
>     <param-value>
>          com.whatever.web.extensions
>     </param-value>
> </init-param>
> 
> You can also use this technique to auto wire interceptors, type
> converters, etc.  If you aren't using 1.5 or you want to do it manually
> you can still do this in the web.xml
> 
> <init-param>
>    <param-name>ActionBeanContext.Class</param-name>
>    <param-value>com.whatever.web.MyActionBeanContext</param-value>
> </init-param>
> 
> I prefer the former because then I can just put everything I need in the
> extensions package and Stripes wires it up.  You can also have classes
> in there that don't get auto wired by using @DontAutoLoad on the class.
> 
> Gregg
> 
> On Thu, Dec 4, 2008 at 8:48 PM, Pat Farrell <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     Hi
> 
>     The best practices says "Implement your own ActionBeanContext"
>     so I have made the class. But I can't figure out how to glue it in.
>     I assume it takes a couple of lines in the web.xml file, but the
>     attempts I've made fail.
> 
>     I guessed that it goes in the
>            <filter>
>            <display-name>Stripes Filter</display-name>
>     as an init-param pair. But that doesn't work.
> 
>     Pointers, examples, links, etc would be greatly appreciated.
> 
>     Thanks
>     Pat
> 
> 
>     --
>     Pat Farrell
>     http://www.pfarrell.com/
> 
> 
>     
> ------------------------------------------------------------------------------
>     SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
>     Nevada.
>     The future of the web can't happen without you.  Join us at MIX09 to
>     help
>     pave the way to the Next Web now. Learn more and register at
>     
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
>     _______________________________________________
>     Stripes-users mailing list
>     [email protected]
>     <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/stripes-users
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users


-- 
Pat Farrell
http://www.pfarrell.com/


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to