He said his openning page was index.jsp - thats where his forward tag is - thats where he could change it to a link tag. ----- Original Message ----- From: "Michael McGrady" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, March 04, 2004 1:31 AM Subject: Re: hiding jsp files under WEB-INF
> I think, but I am not sure, that the opening page cannot be to an action > servlet. > > At 05:27 PM 3/3/2004, you wrote: > >Sorry should have been more explicit. When Dean used the forward tag it > >found the 'welcome' forward and failed when it tried to forward to the path > >associated with it. If he changes the forward to a link, then he can click > >on it and he should get more information about why /Welcome.do is failing > >(all its telling him at the moment is its a 'ServletException). If however > >the link works, then he must have set up the path in his global forward > >incorrectly. Either way, changing to a link should help him resolve his > >problem. > > > >----- Original Message ----- > >From: "Michael McGrady" <[EMAIL PROTECTED]> > >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >Sent: Thursday, March 04, 2004 12:34 AM > >Subject: Re: hiding jsp files under WEB-INF > > > > > > > I use <logic:forward name="opening"/> in my index.jsp. So, that is not a > > > problem. > > > > > > At 09:50 AM 3/1/2004, you wrote: > > > > Alternatively.... > > > > > > > > Change the <logic:forward> on your index.jsp page to an ordinary link > >and > > > > see if that works. > > > > > > > > <html:link action="/Welcome.do">Click Here</html:link> > > > > > > > > Niall > > > > > > > > ----- Original Message ----- > > > > From: "Niall Pemberton" <[EMAIL PROTECTED]> > > > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > > > Sent: Monday, March 01, 2004 5:40 PM > > > > Subject: Re: hiding jsp files under WEB-INF > > > > > > > > > > > > > If you look in 'logic tags' package: > > > > > > > > > > > > > > > > > > > > > > > >http://cvs.apache.org/viewcvs.cgi/jakarta-struts/src/share/org/apache/strut s/taglib/logic/ > > > > > > > > > > In LocalStrings.properties you will see that the message you are > >getting > > > > > ("Exception forwarding for name ?????") matches the message named > > > > > 'forward.forward'. > > > > > > > > > > If you then look in ForwardTag.java this message is only thrown when > >it > > > > > tries to do: > > > > > > > > > > pageContext.forward(path); > > > > > > > > > > This means that it has found your forward named "welcome" and the > > > problem > > > > > lies when it tries to forward to the path associated with that forward > > > > (i.e. > > > > > /Welcome.do). > > > > > > > > > > Quite why that throwing a ServletException I haven't got a clue. Maybe > > > you > > > > > could try setting up another forward for one of your other actions and > > > see > > > > > if that works - how about a "logoff" forward for the /Logoff.do > >action - > > > > > that forwards to Welcome.jsp? Or can you just specify > > > /WEB-INF/Welcome.jsp > > > > > in your "welcome" forward? > > > > > > > > > > Niall > > > > > > > > > > ----- Original Message ----- > > > > > From: "Dean A. Hoover" <[EMAIL PROTECTED]> > > > > > To: <[EMAIL PROTECTED]> > > > > > Sent: Monday, March 01, 2004 4:58 PM > > > > > Subject: hiding jsp files under WEB-INF > > > > > > > > > > > > > > > > I realized that the subject I filed this > > > > > > under (getting started) may not get > > > > > > attention. So I'm sending it out under > > > > > > this subject. Did some google searching > > > > > > but still don't see what the problem is. > > > > > > > > > > > > ===== > > > > > > I am experimenting with some code > > > > > > from "Struts in Action" but I am moving > > > > > > source code around abit. Specifically, > > > > > > I am moving all of the .jsp files into > > > > > > the WEB-INF directory except > > > > > > index.jsp. This is so that a user cannot > > > > > > hit a given .jsp directly. Anyway, I > > > > > > am getting an exception right from the > > > > > > get go and don't know what I am doing > > > > > > wrong. Here's the relevant pieces: > > > > > > > > > > > > == index.jsp === > > > > > > <%@ taglib uri="/tags/struts-logic" prefix="logic" %> > > > > > > <logic:forward name="welcome"/> > > > > > > > > > > > > == Welcome.jsp === > > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > > > > > > "DTD/xhtml1-trans > > > > > > itional.dtd"> > > > > > > <% taglib uri="/tags/struts-bean" prefix="bean" %> > > > > > > <% taglib uri="/tags/struts-html" prefix="html" %> > > > > > > <% taglib uri="/tags/struts-logic" prefix="logic" %> > > > > > > <html:html xhtml="true"> > > > > > > <head> > > > > > > <title>Welcome World!</title> > > > > > > <html:base/> > > > > > > </head> > > > > > > <body> > > > > > > <logic:present scope="session" name="user"> > > > > > > <h3>Welcome <bean:write name="user" property="username"/>!</h3> > > > > > > </logic:present> > > > > > > <logic:notPresent scope="session" name="user"> > > > > > > <h3>Welcome World!</h3> > > > > > > </logic:notPresent> > > > > > > <html:errors/> > > > > > > <ul> > > > > > > <li><html:link forward="logon">Sign in</html:link></li> > > > > > > <logic:present scope="session" name="user"> > > > > > > <li><html:link forward="logoff">Sign out</html:link></li> > > > > > > </logic:present> > > > > > > </ul> > > > > > > </body> > > > > > > </html:html> > > > > > > > > > > > > === struts-config.xml === > > > > > > <?xml version="1.0" encoding="ISO-8859-1" ?> > > > > > > <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD > > > > > > Struts Configuration 1.0//EN" > > > > > > "http:/jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> > > > > > > <struts-config> > > > > > > <form-beans> > > > > > > <form-bean name="registerForm" type="app.RegisterForm"/> > > > > > > <form-bean name="logonForm" type="app.LogonForm"/> > > > > > > </form-beans> > > > > > > <global-forwards> > > > > > > <forward name="welcome" path="/Welcome.do"/> > > > > > > </global-forwards> > > > > > > > > > > > > <action-mappings> > > > > > > <action > > > > > > path="/Welcome" > > > > > > type="org.apache.struts.actions.ForwardAction" > > > > > > parameter="/WEB-INF/Welcome.jsp"/> > > > > > > > > > > > > <action path="/Logon" > > > > > > type="org.apache.struts.actions.ForwardAction" > > > > > > parameter="/WEB-INF/Logon.jsp"/> > > > > > > > > > > > > <action path="/LogonSubmit" > > > > > > type="app.LogonAction" > > > > > > name="logonForm" > > > > > > scope="request" > > > > > > validate="true" > > > > > > input="/WEB-INF/Logon.jsp"/> > > > > > > > > > > > > <action path="/Logoff" > > > > > > type="app.LogoffAction"> > > > > > > <forward name="success" path="/WEB-INF/Welcome.jsp"/> > > > > > > </action> > > > > > > > > > > > > <action path="/Register" > > > > > > type="app.RegisterAction" > > > > > > name="registerForm" > > > > > > input="/WEB-INF/Register.jsp" > > > > > > > > > > > > > <forward name="success" path="/WEB-INF/success.jsp"/> > > > > > > <forward name="failure" path="/WEB-INF/failure.jsp"/> > > > > > > </action> > > > > > > > > > > > > </action-mappings> > > > > > > </struts-config> > > > > > > > > > > > > > > > > > > Here's the exception: > > > > > > > > > > > > *exception* > > > > > > > > > > > > javax.servlet.ServletException: Exception forwarding for name > >welcome: > > > > > > javax.servlet.ServletException > > > > > > > > > > > > > > > > > > > >org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContext I > > > > > mpl.java:867) > > > > > > > > > > > > > > > > > > > >org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm p > > > > > l.java:800) > > > > > > org.apache.jsp.index_jsp._jspService(index_jsp.java:66) > > > > > > > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > > > > > > > > > > > > > > > > > >org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 3 > > > > > 11) > > > > > > > > > > > > >org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) > > > > > > > >org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > > > > > > > > > > *root cause* > > > > > > > > > > > > javax.servlet.jsp.JspException: Exception forwarding for name > >welcome: > > > > > > javax.servlet.ServletException > > > > > > > > > > > > >org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:173) > > > > > > > > > > org.apache.jsp.index_jsp._jspx_meth_logic_forward_0(index_jsp.java:82) > > > > > > org.apache.jsp.index_jsp._jspService(index_jsp.java:58) > > > > > > > > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > > > > > > > > > > > > > > > > > >org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java: 3 > > > > > 11) > > > > > > > > > > > > >org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) > > > > > > > >org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > > > > > > > > > > > > > > > > What am I doing wrong? > > > > > > Dean Hoover > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]