Thank you Musachy,
That solved my problem, but
I got this error, which might be very familiar for most of you:
The Result type [tiles] which is defined in the Result annotation on the
class [class actions.admin.LoginAction] or determined by the file extension
or is the default result type for the PackageConfig of the action, could not
be found as a result-type defined for the Struts/XWork package
[actions.admin#convention-default#/admin/login] - [unknown location]
actions.admin.LoginAction.java:
@Action(value="/admin/login/index",result...@result(name="success",
type="tiles", location="admin.login") }) (I have definition in tiles.xml
for "admin.login".)
public String execute() {
return SUCCESS;
}
struts.xml :
<package name="default" namespace="/" extends="struts-default">
<result-types>
<result-type name="tiles"
class="org.apache.struts2.views.tiles.TilesResult" />
</result-types>
</package>
Can anyone explain what name="default" stands for, because i changed it as
name="admin", i got the same error.
and also [actions.admin#convention-default#/admin/login] . What is
#convention-default# ? Is it "actions" because convention plugin looks for
actions package. Or is it something we define in config files?
Thanks in advance.
On Wed, Jan 7, 2009 at 3:42 PM, Musachy Barroso <[email protected]> wrote:
> You are missing dependencies, in this case Commons Digester
> (http://commons.apache.org/digester/)
>
> musachy
>
> On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu <[email protected]> wrote:
> > Hi,
> > I'm using Struts 2.1.5 with convention plugin. I'm in the learning
> process
> > and trying several things (action, rule annotations, hibernate etc).
> > Everything was working ok until today. i started using Tiles.
> > I copied
> >
> > struts2-tiles-plugin-2.1.5.jar
> > tiles-api-2.0.6.jar
> > tiles-core-2.0.6.jar
> > tiles-jsp-2.0.6.jar files into my lib folder. These files come with
> struts
> > 2.1.5.
> >
> > I added
> > <listener>
> >
> >
> <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
> > </listener>
> > to web.xml file.
> >
> > This is my struts.xml:
> > <struts>
> > <package name="default" extends="struts-default"> (There was also
> > namespace="/", but later i removed it. but nothing changed)
> > <result-types>
> > <result-type name="tiles"
> > class="org.apache.struts2.views.tiles.TilesResult" />
> > </result-types>
> > </package>
> > </struts>
> >
> > I couldn't quite understand this package thing. Maybe the problem is with
> my
> > struts file. I can also paste tiles.xml if it is necessary to diagnose
> the
> > problem.
> > I get
> > HTTP Status 404 - /adv_ment/admin/login/index problem. And these are
> the
> > lines from eclipse console:
> >
> > SEVERE: Exception sending context initialized event to listener instance
> of
> > class org.apache.struts2.tiles.StrutsTilesListener
> > java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
> > at org.apache.tiles.definition.UrlDefinitionsFactory.init
> > at
> > org.apache.tiles.impl.BasicTilesContainer.initializeDefinitionsFactory
> > at org.apache.tiles.impl.BasicTilesContainer.init
> > ..............
> >
> > Thanks in advance. Sorry for keeping it long.
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>