Mark, you can't just forward to a "module"; you have to forward to a
specific action(URL) within that module.
marc wrote:
Sorry for the late reply, but got sick.
But yes that is just what I what to do. And just to get the module admin
to work. Can't see admin module at all.
I only need to put something in the default modul right??
And what??
Bill Siggelkow wrote:
Well, what exactly are you trying to do? I assumed you wanted to
create something like a link that takes you to the admin module. You
cannot just specify the module name for the path of a global forward
.. you have to specify a valid URL; for modules, you need to make sure
that control goes through Struts so you the path needs to be an action.
marc wrote:
I can't follow that, can you explain that a bit more. Thank you.
Bill Siggelkow wrote:
You need the path of the global forward to be an action in your
/admin module. Something like:
<forward name="toAdmin"
path="/admin/main.do"
redirect="true"
contextRelative="true"/>
-Bill Siggelkow
marc wrote:
I'm trying to get modules to work in struts but with no luck.
First I made a standard struts app. And It works fin, but now I
what it to be a module.
So I made a default module, then the plan is that this module will
point at my first working module.
I get the default module to work, but can not get i't to forward to
the working module, just get at invalid path.
You can see the web.xml and struts-default.xml(default module).
Will not post the working app, because it's to long.
************************************************************************
WEB.XML
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/config/struts-default.xml</param-value>
</init-param>
<init-param>
<param-name>config/admin</param-name>
<param-value>/WEB-INF/config/struts-admin.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Standard Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
*************************************************************************
STRUTS-DEFAULT.XML
<struts-config>
<form-beans/>
<global-forwards>
<forward name="toAdmin"
path="/admin"
redirect="true"
contextRelative="true"/>
</global-forwards>
<action-mappings>
<action path="/home"
forward="/jsp/home.jsp"/>
</action-mappings>
</struts-config>
*************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]