Subject: Re: Weird problem with tiles and struts forward. From: "Jack Gao" <[EMAIL PROTECTED]> === I also update to web-app_2_3.dtd and struts-config_1_1.dtd.
But I didn't found any place need to update except <!DOCTYPE Any idea which part need to update? Thanks Jack "Brendan Grainger" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Hi, > > I had exactly the same problem. I got it work using Struts 1.1 Beta. For me > the problem seemed to be with my struts-config.xml file or my web.xml file > (I'm not sure which sorry, but I updated them both). Make sure you're using > the latest dtd's. I"m using struts-config_1_1.dtd and web-app_2_3.dtd > respectively. It was strange error. I basically rewrote both my > struts-config.xml and web.xml from scratch, made sure the latest struts.jar > was being copied into my web application and it worked. > > As for this: > > >> it also use forward to a tiles definition, why? > > You can assemble pages using your tiles-def.xml without actually writing the > entire page and use struts to forward to the definition which puts it all > together for you. So for example in an application I'm working on I have a > 'gallery page' which is just a really just the body. The components that > make up the page (header, menu, footer and body) are defined in my > tiles-def.xml with the name forward.gallery.page and to get that page to > display I just use a struts forward to that definition. It's an excellent > framework once you get it going. > > Hope that helps. > Brendan > > -----Original Message----- > From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]] > Sent: Saturday, March 30, 2002 7:55 PM > To: [EMAIL PROTECTED] > Subject: Re: Weird problem with tiles and struts forward. > > > Subject: Re: Weird problem with tiles and struts forward. > From: "Jack Gao" <[EMAIL PROTECTED]> > === > Thanks for the reply group. > > Yes, I'm using struts 1.1 beta. But the tutorial looks work fine, it also > use forward to a tiles definition, why? And since I already use > ActionComponentServlet (Actually, since I need to init log4j in the servlet, > I extends from it.). Any idea why tutorial works, but not our program? > > Thanks > > Jack > > "Jack Gao" <[EMAIL PROTECTED]> wrote in message > news:a834bs$4bt$[EMAIL PROTECTED]... > > Hi, List > > > > I'm new with this struts and tiles issues. > > > > My problem is: when define a jsp page in struts-config.xml to forward to > if > > success or failed, it works fine. But if I jump to tiles, and forward to a > > definition, I keep to get servlet exception. > > > > My definition xml file has a declare like this: > > > > <definition name="register.success" extends="mainLayout"> > > <put name="body" value="/success.jsp" /> > > </definition> > > > > > > And in my struts-config.xml I delcare like this: > > > > <action path="/register" > > type="xxx.xxx.xxx.RegisterAction" > > name="registerForm" > > scope="request" > > validate="false"> > > <forward name="success" path="register.success"/> > > <forward name="failure" path="register.failure"/> > > </action> > > > > The mainLayout works fine, and I got exception when it forward to next > page. > > > > java.lang.IllegalArgumentException: Path register.success does not start > > with a "/" character > > at > > > org.apache.catalina.core.ApplicationContext.getRequestDispatcher(Application > > Context.java:570) > > at > > > org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(Appli > > cationContextFacade.java:174) > > at > > > org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:96 > > 5) > > at > > > org.apache.struts.action.RequestProcessor.processActionForward(RequestProces > > sor.java:408) > > at > > > org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269) > > at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109) > > at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > at > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application > > FilterChain.java:247) > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > > ain.java:193) > > at > > > filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java: > > 170) > > at > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application > > FilterChain.java:213) > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > > ain.java:193) > > at > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja > > va:243) > > at > > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > > 66) > > at > > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > at > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja > > va:190) > > at > > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > > 66) > > at > > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > at > > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343) > > at > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 > > ) > > at > > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > > 66) > > at > > > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. > > java:170) > > at > > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > > 64) > > at > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 > > ) > > at > > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > > 64) > > at > > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) > > at > > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > > 64) > > at > > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > at > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java > > :174) > > at > > > org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 > > 66) > > at > > > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > > at > > > org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: > > 1012) > > at > > > org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107 > > ) > > at java.lang.Thread.run(Thread.java:484) > > > > > > Any idea? > > > > Thanks a lot! > > > > Jack > > > > > > > > > > -- > 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]>