struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Erickson" <>
Subject Tiles Modules Problem
Date Tue, 27 Jul 2004 00:50:15 GMT
Ok so as far as struts is concerned, if your within a module, say /user, all
actions defined in struts-config-user.xml will resolve to that directory,
for example:
        <action path="/editPage" type="user.PageAction" attribute="pageForm"
parameter="edit" scope="session">
            <forward name="success" path=""/>

would resolve to /(AppContext)/user/

However this same functionality does not appear to exist within a tiles
module.  Here is my config:
 <plug-in className="org.apache.struts.tiles.TilesPlugin">
  <set-property property="definitions-config"
  <set-property property="moduleAware" value="true"/>
  <set-property property="definitions-parser-validate" value="true"/>

since I used as my forward in the action above we'll examine
that.  Here's the definition:
    <definition name="" extends=".base">
        <put name="body" value="/user/page.jsp"/>

Notice I still have to prepend the 'module' onto the url, ie the /user in
/user/page.jsp.  Should this not function similarly to the struts modules?
IE I should only need to put /page.jsp?  For true modularity I believe it
should, and is currently not.  Now I recognize there are instances where
this kind of functionality would not be desirable, for instance when you
need to reference a common header.jsp, or when you have JSPs organized under
WEB-INF..  but shouldnt there be an attribute to set that? perhaps
moduleRelative="true/false", where by default its set to true?  As is its
not really modularized at all because you couldn't just pick it up and put
it somewhere else and expect it to work..


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

View raw message