See intermixed. > -----Original Message----- > From: Emmanuel Bridonneau [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 06, 2002 7:03 PM > To: Struts Users Mailing List > Subject: RE: jsp inside WEB-INF > > > I can understand this part of the servlet spec. I believe the jsp's do > not refer to other jsp directly. Page1 refers to a forward mapping > called Page2 which path should be resolved by the default ActionForward > class to /WEB-INF/Page2.jsp. > But you are saying that to be able to put jsp under WEB-INF, one has to > write a custom ActionForward class so that even pages that do not > require action class can (indirectly) link to pages located under > WEB-INF.
No. Sorry for the misunderstanding. All you have to do is specify a forward under your action in struts-config.xml: Here is a snip of what I did to make a point on another thread....;) I moved the registration.jsp under the WEB-INF folder and then changed it here... This is from the struts-example application (struts-config.xml): ... ... <!-- Edit user registration --> <action path="/editRegistration" type="org.apache.struts.webapp.example.EditRegistrationAction" attribute="registrationForm" scope="request" validate="false"> <forward name="success" path="/WEB-INF/registration.jsp"/> </action> <!-- Save user registration --> <action path="/saveRegistration" type="org.apache.struts.webapp.example.SaveRegistrationAction" name="registrationForm" scope="request" input="/WEB-INF/registration.jsp"/> ... ... My reference to ForwardAction is simply a "pre-written" Action class so that you can save a little leg work. That should take care of it. JM > I was under the impression that this was a default Struts behavior. If I > understand your thoughts, the custom/subclass of ActionForward should > override the setPath method intelligently to distinguish whether the > mapping is to be done inside or outside of WEB-INF? > > > -----Original Message----- > From: James Mitchell [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 06, 2002 3:18 PM > To: Struts Users Mailing List > Subject: RE: jsp inside WEB-INF > > > Ok.....If I understand you correctly. > > You will *not* be able to link to anything directly to a jsp under > WEB-INF. > It is specifically disallowed in the servlet spec. > > Try adding a generic mapping that does a simple forward. > > See the javadoc or source code for: > org.apache.struts.actions.ForwardAction > for more details. > > JM > > > > -----Original Message----- > > From: Emmanuel Bridonneau [mailto:[EMAIL PROTECTED]] > > Sent: Monday, May 06, 2002 6:06 PM > > To: Struts Users Mailing List > > Subject: RE: jsp inside WEB-INF > > > > > > Yes there is no Page1.do but just page1 reference. The two pages are > > rather dummy as they don't call specific action class. I suppose the > > ActionServlet class does the mapping. My html is simple: > > <html:link forward="Page1">go to destination Page</html:link> > > and page1 is mapped as shown below in struts-config.xml > > > > > > -----Original Message----- > > From: James Mitchell [mailto:[EMAIL PROTECTED]] > > Sent: Monday, May 06, 2002 2:52 PM > > To: Struts Users Mailing List > > Subject: RE: jsp inside WEB-INF > > > > > > Are all your links coming from the users browser correctly formatted? > > > > Viewing the html source......... > > /myapp/action.do (or whatever you picked) > > > > or > > > > Are you trying to link from one jsp to another without going through > > your > > action mappings? > > > > > > JM > > > > > > > -----Original Message----- > > > From: Emmanuel Bridonneau [mailto:[EMAIL PROTECTED]] > > > Sent: Monday, May 06, 2002 5:43 PM > > > To: 'Struts Users Mailing List' (E-mail) > > > Subject: jsp inside WEB-INF > > > > > > > > > Some of you participated in an interested thread about whether to > put > > > jsp's inside WEB-INF some 3 weeks ago. I am trying to do this using > a > > > JBoss/catalina environment with no vail. > > > So I have these 2 js pages that refer to each other i.e Page1 links > to > > > page2 and vice-versa. > > > the global-forwards> section has: > > > <forward name="Page1" path="WEB-INF/pageone.jsp" /> > > > <forward name="Page2" path="WEB-INF/pagetwo.jsp" /> > > > > > > Unfortunatly, instead of mapping to this directory, I have the > > following > > > mapped URL : http://localhost:8080/mywebApp/WEB-INF/page1.jsp -- but > > the > > > result is an invalid request URI ie. The requested resource > > > (/mywebApp/WEB-INF/pageone.jsp) is not available. > > > I was expecting instead the relative URI /WEB-INF/pageone.jsp to be > > > resolved > > > Anything but WEB-INF is properly resolved e.g. > > > /webappsubdir/pageone.jsp (and NOT > /mywebApp/webappsubdir/pageone.jsp) > > > > > > What am i missing? Any one can explain this to me? > > > > > > -- > > > To unsubscribe, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: > > > <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > -- > > To unsubscribe, e-mail: > > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > > <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>