I just switched from using the ActionComponentServlet to the Tiles Plugin, but I still get the same error.
Thanks, Matt --- In [EMAIL PROTECTED], "matt_raible" <[EMAIL PROTECTED]> wrote: > Basically, what I'm trying to do is use a DefaultAction to dispatch > requests through an action to my definitions. I'm experiencing some > wierd behavior. I have a Struts build from a couple nights ago. > > When I request http://localhost/myApp/index.do, everything works > fine - here's my log: > > - Processing a 'GET' for path '/index' > Requested URI: '/roller/index.do' > Forwarding to: 'index' > processActionForward(index, false) > 'index' - processed as definition > > But, when I request http://localhost/myApp/login.do, I get the > following log and subsequent error: > > LOG --- > - Processing a 'GET' for path '/login' > Requested URI: '/roller/login.do' > Forwarding to: 'login' > processActionForward(login, false) > > ERROR --- > ava.lang.IllegalArgumentException: Path base does not start with > a "/" character > at > org.apache.catalina.core.ApplicationContext.getRequestDispatcher > (ApplicationContext.java:572) > at > org.apache.catalina.core.ApplicationContextFacade.getRequestDispatche > r(ApplicationContextFacade.java:174) > at org.apache.struts.action.RequestProcessor.doForward > (RequestProcessor.java:1007) > at > org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition > (TilesRequestProcessor.java:237) > at > org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig > (TilesRequestProcessor.java:291) > at > org.apache.struts.action.RequestProcessor.processActionForward > (RequestProcessor.java:390) > > 1. In struts-config.xml, I have: > > <action path="/unknown" type="org.roller.presentation.DefaultAction" > unknown="true"/> > > 2. In order to request a definition by using definitionName.do, I > have my DefaultAction coded as: > > <snip> > String requestURI = request.getRequestURI(); > String contextPath = request.getContextPath(); > > String definitionName = requestURI.substring(contextPath.length()); > definitionName = definitionName.substring(1, definitionName.indexOf > (".do")); > > return new ActionForward(definitionName); > </snip> > > 3. In my tiles configuration file (tiles-config.xml), I have: > > <!-- Base Layout Definition, most pages will extend --> > <definition name="base" path="/theme/layout.jsp"> > <put name="title.prefix" value="title.prefix"/> > <put name="title.key"/> > <put name="footer" value="/theme/footer.jsp"/> > </definition> > > <!-- Index page --> > <definition name="index" extends="base"> > <put name="title.key" value="title.index"/> > <put name="content" value="/index.jsp"/> > </definition> > > <!-- Login page --> > <definition name="login" path="base"> > <put name="title.key" value="title.login"/> > <put name="content" value="/login.jsp"/> > </definition> > > Any ideas or suggestions are appreciated. > > Matt > > --- In [EMAIL PROTECTED], Cedric Dumoulin <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > You can test for a definition by asking the definition factory: > > > > DefinitionUtil.getDefinition( defName, servletRequest, > servletContext ) ; > > This return a ComponentDefinition, or throw > NoSuchDefinitionException if > > not found. > > > > Hope this help, > > Cedric > > > > Struts Newsgroup (@Basebeans.com) wrote: > > > > >Subject: Nightly build 08052002: Tiles plugin and > mapping.findForward > > >From: "Matt Raible" <[EMAIL PROTECTED]> > > > === > > >I'd like to write a helper method to check for a <forward> and if > none is > > >found, then to route to forward. > > > > > >What is the best way to do this? > > > > > >I know that mapping.findForward() will return a zero length array > if nothing > > >is found, so what would I do next? I'd love it if there was a > > >mapping.findDefinition or something. > > > > > >Thanks, > > > > > >Matt > > > > > > > > > > > >-- > > >To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@j...> > > >For additional commands, e-mail: <mailto:struts-user-help@j...> > > > > > > > > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@j...> > > For additional commands, e-mail: <mailto:struts-user-help@j...> > > > -- > To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@j...> > For additional commands, e-mail: <mailto:struts-user-help@j...> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>