struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brook, Andy" <...@dolby.co.uk>
Subject Problems with Modules stored under WEB-INF - H E L P !
Date Tue, 18 Nov 2003 11:48:40 GMT
Hi all,

I have a problem accessing modules when stored under WEB-INF, accessing
modules stored under / seems OK, but modules stored under /WEB-INF seem
to be unable to link correctly to actions that ought to be available
within that modules context.

I've got 'modules' running when stored under the root of the app, e.g.
/module1, with necessary configuration in web.xml:
		{web.xml ...}
		<init-param>
			<param-name>config/module1</param-name>
	
<param-value>WEB-INF/module1-struts-config.xml</param-value>
		</init-param>

I believe action mappings would require a prefix, such as:

	{struts-config ...}
	<action-mappings>
		<action path="/index" forward="/index.jsp"/>
		<action path="/home"
forward="/switch.do?page=index.do&amp;prefix=" />		
		<action path="/switch"
type="org.apache.struts.actions.SwitchAction" /> 		
	</action-mappings>

This appears to be all hunky-dory, I can switch into 'module1' perform
actions and switch back to the root application.

Moving on to storing the pages under the WEB-INF folder, I believe I'll
have:

		{web.xml ...}
		<init-param>
	
<param-name>config/WEB-INF/modules/module2</param-name>
	
<param-value>WEB-INF/module2-struts-config.xml</param-value>
		</init-param>

		{struts-config ...}
		<action-mappings>
			<action path="/index" forward="/index.jsp"/>
			<action path="/test" name="none"
forward="/test.jsp" prefix="/WEB-INF/modules/module2"/>
			<action path="/home"
forward="/switch.do?page=index.do&amp;prefix=" />		
			<action path="/switch"
type="org.apache.struts.actions.SwitchAction" /> 		
		</action-mappings>

I'm using WSAD 5.0, which seems to imply that the <param-name> in the
web.xml file must point to where the actual jsp files are.  This results
in <html:link> tag output that includes the '/WEB-INF/modules/module2'
prefix, which naturally breaks.  I've tried making the <param-name> tag
'module2' rather than 'WEB-INF/modules/module2', but this seems to make
WSAD think that the actions are not present in the module.

Securing the /module2 folder structure? It's a possibility but I haven't
been able to block access to that either...

Does anyone have modules running, with JSP stored under /WEB-INF !!


Thanks for feedback!

Andy Brook
Application Development Manager (UK)
Dolby Laboratories Inc.

Email: Struts-001.20.axb@spamgourmet.com


-----------------------------------------
This message (including any attachments) may contain confidential information intended for
a specific individual and purpose. If you are not the intended recipient, delete this message.
If you are not the intended recipient, disclosing, copying, distributing, or taking any action
based on this message is strictly prohibited.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message