struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <>
Subject Re: Possible to package struts2 actions/code in a reusable jar?
Date Wed, 08 Aug 2007 19:46:57 GMT
The JSPs cannot be accessed if they are inside a jar.I could be wrong
on this, but I don't think that putting struts.xml inside the jar will

If you package it as a plugin, and map the actions in the plugin xml,
and use FreeMarker for the viewer you will be fine.


On 8/8/07, WiltOnTilt <> wrote:
> We have several projects that will have many common actions and links to
> common JSP names.  For example, all of our projects will have a Welcome
> action and a related welcome.jsp.
> I'd like to be able to create a common-actions.jar that would essentially
> contain all of the source code needed for each common action to run (Action
> classes, beans, DAOs, Entity objects, etc).  The hope would be that I could
> put the struts.xml in the jar as well as .properties files and then override
> them as necessary under each project's src folder.
> So here's what I've done so far, my directory structure looks like this:
> src
> >arson/
> >>action/
> >>biz/
> >>model/
> >
> >
> >struts.xml
> I tried jarring up everything under src.
> Then in eclipse, I added the external jar to the project, and put it at the
> very top of my buildpath.
> When I try to access my Welcome action, it couldn't find it, giving me this
> error:
> "There is no Action mapped for namespace / and action name Welcome. -
> [unknown location]"
> Any idea if what I want to do is even possible, or what I could be doing
> wrong?
> Thanks!
> Aaron
> --
> View this message in context:
> Sent from the Struts - User mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

"Hey you! Would you help me to carry the stone?" Pink Floyd

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message