struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent PROSPER" <Vincent.Pros...@Alkinos.com>
Subject RE: Problem: Struts+Modules+jsps under WEB-INF
Date Tue, 03 Dec 2002 13:05:43 GMT
To my understanding:

1. Put something like <action forward="/mainScreen.jsp"... (if I were you, I
wouldn't put any jsp file under WEB-INF, only TLD, XML and external JARs.
common is automatically added as the subapp prefix by the subapp controller
handling your stuts-config-common.xml, and jsp has nothing to do with your
issue here since you put it in "app/WEB-INF/common/mainScreen.jsp" which
contains no 'jsp' directory).

2. you're right, your module name is used as a prefix (this is the way
subapps work, no way to change this to my knowledge)

3. when putting your test.do directly in your struts-config.xml, you're not
in any subapp, so the corresponding struts action behaves as usual.

I guess you should have something like:

app/img/
app/css/
app/WEB-INF/lib
app/WEB-INF/classes
app/common/
app/common/mainScreen.jsp
app/test.jsp

Hope this helps.

Vince

-----Original Message-----
From: Maciej Ko³odziej [mailto:Maciej.Kolodziej@comarch.com]
Sent: Tuesday, December 03, 2002 1:44 PM
To: struts-user
Subject: Problem: Struts+Modules+jsps under WEB-INF


Hi,

I started developing an application with Jakarta Struts 1.1. I decided to
build it using multiple modules (sub-apps) and also hide all jsps under
WEB-INF. Thus my application structure looks like this:
app/img/
app/css/
app/WEB-INF/
app/WEB-INF/classes/
app/WEB-INF/lib/
app/WEB-INF/jsp/
app/WEB-INF/common/
app/WEB-INF/common/mainScreen.jsp
...

Now I create an action in stuts-config-common.xml and define it like this:

<action forward="/WEB-INF/jsp/common/mainScreen.jsp" path="/test"
scope="request" unknown="false" validate="false"/>

When I want to fire this action I have to type for ex.:

http://localhost:8080/app/common/main.do

But then I get a message:

type Status report

message /common/WEB-INF/jsp/common/mainScreen.jsp
        ^^^^^^^^

description The requested resource
(/common/WEB-INF/jsp/common/mainScreen.jsp) is not available.

So the module name is used as context(?) and inserted also before WEB-INF.
Why? I don't need this.
The module name should be put after jsp, as it is, but not before
WEB-INF!
If I create another action test.do and put in in default module (not
common) this doesn't happen. Supposedly because context then is / not
/common. How do I solve this?

--
MK


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





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


Mime
View raw message