On 08-02-2010 at 04:30, Sindu R wrote:
> Sindu R <riss.regis...@...> writes:
> > 
> > I have just started evaluating Stripes for a project and started with the 
> > Calculator example in the Quick start guide. 
> > I am facing an issue though. 
> > 
> > When the param-value for ActionResolver.Packages is set to 
> > net.sourceforge.stripes.examples, I see logs such as 
> > 
> > Wiring path /examples/quickstart/Calclator.action to 
> > net.sourceforge.stripes.examples.quickstart.CalculatorActionBea
> >  @ /examples/quickstart/Calculator.action
> > 
> > in the log. However, once the param-value is changed to something else such 
> as 
> > com.sourceforge.stripes.examples with corresponding changes in the jsp and 
> > ActionBean, I get an ActionBeanNotFoundException exception when the jsp is 
> > submitted.

Yes: the package name is used to resolve the classes that can handle
requests. They are translated into the URL's that will be handled by Stripes.
How can be found on the website and in the book "Stripes... and web
development is fun again" by Freddy Daoud.

Your change modified the package where these classes are into something else.
As a result, no URL is mapped, and Stripes no longer can find the code. Hence
the exception. This is visible from the absence of a log line like:
> > Wiring path /examples/quickstart/Calclator.action to 
> > net.sourceforge.stripes.examples.quickstart.CalculatorActionBea
> >  @ /examples/quickstart/Calculator.action

This actually says there is a class name
net.sourceforge.stripes.examples.quickstart.CalculatorActionBean.
So if you change the prefix "net" into "com", this class can no longer be
found.

But as you may have noticed, the name "ActionResolver.Packages" is plural.
You can make it a comma separated list (even with extra whitespace for
readability:
        <init-param>
                <param-name>ActionResolver.Packages</param-name>
                <param-value>
                        net.sourceforge.stripes.examples,
                        com.sourceforge.stripes.examples
                </param-value>
        </init-param>


Oscar

-- 
   ,-_
  /() ) Oscar Westra van Holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  QED - Quite Easily Done

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to