Thank you for your help Ted, your solution works. I have an other question about the access\location of JSP pages. I placed a message on a JBuilder forum in order to know if it was possible to configure JBuilder5 IDE and see the WEB-INF directory. And all people replied that I don't have to place the JSP pages under the WEB-INF directory. I don't know any more what is the best solution to apply a user' authentication test for each request except the login.jsp page. I don't use the security-constraint, authentication features of the Tomcat because we have implemented our own authentication/authorisation logic process. For each request, I must ask this process to know if the user can access to the page. I can not use a redirect tag (<logic:redirect forward="welcome"/>) for each page.
-----Original Message----- From: Day, Michael-IBM/TT [mailto:[EMAIL PROTECTED]] Sent: 03 September 2002 18:05 To: 'Struts Users Mailing List' Subject: RE: Unable to open location, with jakarta-struts-1.1-b2-blank.war I'm new to struts, and I was wondering if someone could shed some light on why it is a good idea to always use an action to load JSPs. Just a simple explanation would be helpful. -----Original Message----- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 11:29 AM To: Struts Users Mailing List Subject: Re: Unable to open location, with jakarta-struts-1.1-b2-blank.war You may need to refer to /WEB-INF/ rather than /Web-inf The disadvantage is that if any of your JSPs need to reference images or stylesheets, you can't just move those under WEB-INF too. They have to be above WEB-INF where the web server can access them. It is a good idea to always use an action to load your JSPs. Whether it is also useful to place them under WEB-INF is debatable. If you always go through actions, the location of the JSP doesn't show up on the location bar, and people won't know where to access it directly. The technique does *force* all references through actions, and its easy to see if all the JSPs have been moved under WEB-INF. So, it's a good trick in that sense, if that's the only way you can be sure all JSPs are being accessed through actions. -Ted. Heligon Sandra wrote: > Hi, > > I used the jakarta-struts-1.1-b2-blank.war as model for my > application. > I would like to place all the JSP file under the sub-directory > CATALINA_HOME/Webapps/MyApp/Web-inf/jsp in order to force people > > to pass through the RequestProcessor where I test user > authentication. > It is the unique solution, isn't it ? > But I don't understand very well, the disadvantage "Putting the JSPs > below WEB-INF > make it harder to reference style sheets ". > > So I modified the struts-config.xml file, and wrote > > <action path="/Welcome" > type="org.apache.struts.actions.ForwardAction" > parameter="/Web-inf/Jsp/Welcome.jsp" /> > > but when I run my application I have the following error > > Unable to open location. Document not found on server. > > But the file Welcome.Jsp is available on > CATALINA_HOME/Webapps/MyApp/Web-inf/Jsp/Welcome.jsp. > Is it an syntax error ? > > I used JBuilder, I can not see the Web-inf directory under the > WebApplication node I see > all the directories under CATALINA_HOME/Webapps/MyApp except the > Web-inf directory. > How is it possible ? > > thanks, > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- Ted Husted, Husted dot Com, Fairport NY US -- Author, Java Web Development with Struts -- Order it today: -- http://husted.com/struts/book.html -- 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]>

