With just the <controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/> I get the
following error.
2002-12-13 17:07:57 action: Error - TilesRequestProcessor : Definition
Factory not found for subapp ''. Do you have declared appropriate plugin in
struts-config.xml ?
If instead I use the plug-in element in struts-config I get the following
log.
2002-12-13 17:19:05 action: Tiles definition factory loaded for processor
''.
When accessing the webapp I get a runtime exception.
2002-12-13 17:20:26 ApplicationDispatcher[/StrutsLogTest] Servlet.service()
for servlet action threw exception
java.lang.NullPointerException
at
org.apache.struts.tiles.xmlDefinition.FactorySet.getDefinition(FactorySet.ja
va:156)
It appears that a definitions file is required. But from reading both the
package documentation, Husted's Tiles chapter, and Caverness' Tiles chapter
they all indicate that the definitions file is optional. I wanted to
refactor toward the use of a definitions file (following Husted's
instructions in his Tiles chapter). I guess I can add a dummy definition
and see if that appeases tiles. Any thoughts on this?
> -----Original Message-----
> From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 13, 2002 12:46 PM
> To: Struts Users Mailing List
> Subject: RE: Move to TilesRequestProcessor results in forwarding
> exception.
>
>
> Cedric,
>
> My webapp makes no use of Tiles yet. The first step in my refactoring was
> to add the tiles plug-in. That is where I'm stuck. I have no tiles
> definitions yet. So do I still need a tiles definitions file?
>
> For some reason I can't get Tiles logging to work. I see that it uses the
> servlet.log but I can't get that to work either. Tried setting
> debug to 99
> in web.xml but it has no effect. I'll keep trying to get logging to work
> and let you know what I see.
>
> > -----Original Message-----
> > From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 12, 2002 5:21 PM
> > To: Struts Users Mailing List
> > Subject: Re: Move to TilesRequestProcessor results in forwarding
> > exception.
> >
> >
> >
> > Well, let start on good basis: to use Tiles, you should declare the
> > tiles plugin and specify a tiles config file. You don't need to specify
> > the TilesRequestProcessor yourself.
> > The debug s properties of TilesRequestProcessor don't work anymore:
> > they are replaced by a common logging mechanism.
> > You should see some messages from the TilesPlugin, indicating what
> > happens.
> >
> > Cedric
> >
> > Jerome Jacobsen wrote:
> >
> > >OK. I added the following to my struts-config:
> > >
> > ><controller
> > processorClass="org.apache.struts.tiles.TilesRequestProcessor"
> > >debug="9"/>
> > ><plug-in className="org.apache.struts.tiles.TilesPlugin">
> > > <set-property property="definitions-debug" value="2"/>
> > > <set-property property="definitions-parser-details" value="2"/>
> > ></plug-in>
> > >
> > >
> > >And the following to my log4j.properties (in case Tiles uses Commons
> > >Logging):
> > >
> > >log4j.category.org.apache.struts.tiles=DEBUG
> > >
> > >
> > >The logging output shows no Tiles logs. It is:
> > >
> > >Target URL --
> >
> >http://localhost:8080/Sandbox-FPRSAcceptanceClient-context-root/index.jsp
> > >2002-12-12 16:38:08,073 [HttpRequestHandler-532] DEBUG
> > >com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction - BEGIN
> > >execute(ActionMapping,...) 2002-12-12 16:38:08,103
> > [HttpRequestHandler-532]
> > >DEBUG
> com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction -
> > >BEGIN initialize(ActionMapping, ...) 2002-12-12 16:38:08,103
> > >[HttpRequestHandler-532] INFO
> > >com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction
> > - Unable
> > >to find localeForm in the session. 2002-12-12 16:38:08,203
> > >[HttpRequestHandler-532] WARN
> > >com.metalsa.orator.fprs.ui.web.struts.ModelFacade - Get Locales from
> > >database. 2002-12-12 16:38:08,223 [HttpRequestHandler-532] INFO
> >
> >com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction - Added
> > >localeForm to the session. 2002-12-12 16:38:08,223
> > [HttpRequestHandler-532]
> > >DEBUG
> com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction -
> > >END initialize(ActionMapping, ...) 2002-12-12 16:38:08,433
> > >[HttpRequestHandler-532] DEBUG
> > >com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction - END
> > >execute(ActionMapping,...)
> processActionForward(/getErrorSeverityLocs.do,
> > >false)
> > >
> > >I get the exception in the web browser, not in the logs. It is:
> > >
> > >500 Internal Server Error
> > >javax.servlet.jsp.JspException: Exception forwarding for name
> > >displayErrorMaintSearch: javax.servlet.ServletException: Error
> in servlet
> > > int org.apache.struts.taglib.logic.ForwardTag.doEndTag()
> > > ForwardTag.java:180
> > > void _index._jspService(javax.servlet.http.HttpServletRequest,
> > >javax.servlet.http.HttpServletResponse)
> > > [/index.jsp]
> > > index.jsp:8
> > > void
> > oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest,
> > >javax.servlet.ServletResponse)
> > > HttpJsp.java:139
> > > void
> > >oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.Http
> > ServletRequ
> > >est, javax.servlet.http.HttpServletResponse, java.lang.String)
> > > JspPageTable.java:317
> > > void
> > >oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.htt
> > p.HttpServl
> > >etRequest, javax.servlet.http.HttpServletResponse)
> > > JspServlet.java:465
> > > void
> > >oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpSe
> > rvletReques
> > >t, javax.servlet.http.HttpServletResponse)
> > > JspServlet.java:379
> > > void
> > javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
> > >javax.servlet.ServletResponse)
> > > HttpServlet.java:853
> > > void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> > >J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.S
> > ervletReque
> > >st, javax.servlet.ServletResponse)
> > > ServletRequestDispatcher.java:721
> > > void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> > >J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.
> > servlet.Ser
> > >vletRequest, javax.servlet.http.HttpServletResponse)
> > > ServletRequestDispatcher.java:306
> > > boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> > >J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[
> > Oracle9iAS
> > >(9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread,
> > >com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> > >J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS
> > >(9.0.3.0.0) Containers for
> J2EE].server.http.EvermindHttpServletResponse,
> > >java.io.InputStream, java.io.OutputStream, boolean)
> > > HttpRequestHandler.java:767
> > > void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> > >J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
> > > HttpRequestHandler.java:259
> > > void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
> > >J2EE].server.http.HttpRequestHandler.run()
> > > HttpRequestHandler.java:106
> > > void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
> > > PooledExecutor.java:797
> > > void java.lang.Thread.run()
> > > Thread.java:484
> > >
> > >Any idea what's up?
> > >
> > >
> > >
> > >
> > >>-----Original Message-----
> > >>From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
> > >>Sent: Thursday, December 12, 2002 4:23 PM
> > >>To: Struts Users Mailing List
> > >>Subject: Re: Move to TilesRequestProcessor results in forwarding
> > >>exception.
> > >>
> > >>
> > >>
> > >> Hi,
> > >>
> > >> Normally, you also specify the tiles-config files with the tiles
> > >>plugin. I suppose that the tiles factory has failed to initialize, and
> > >>so something goes wrong with the RequestProcessor. Can you check the
> > >>tomcat log file for tiles messages (maybe you need to enable the tiles
> > >>logging) ?
> > >>
> > >> Cedric
> > >>
> > >>Jerome Jacobsen wrote:
> > >>
> > >>
> > >>
> > >>>Interesting. With the <plug-in> tag removed I added the following:
> > >>><controller
> > >>>
> > >>>
> > >>processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
> > >>
> > >>
> > >>>Now it works! So what was wrong with the <plug-in> usage? Was
> > >>>
> > >>>
> > >>I supposed
> > >>
> > >>
> > >>>to add some required <set-property> tags?
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>>-----Original Message-----
> > >>>>From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]]
> > >>>>Sent: Thursday, December 12, 2002 2:53 PM
> > >>>>To: Struts User
> > >>>>Subject: Move to TilesRequestProcessor results in forwarding
> > exception.
> > >>>>
> > >>>>
> > >>>>I just added the following to my *non-tiles* Struts 1.1b2 app
> > >>>>configuration
> > >>>>file:
> > >>>>
> > >>>> <plug-in className="org.apache.struts.tiles.TilesPlugin"/>
> > >>>>
> > >>>>As I understand it this should replace the RequestProcessor with the
> > >>>>TilesRequestProcessor. Well something changed because now I get an
> > >>>>exception when my Action forwards to another Action via a
> > >>>>
> > >>>>
> > >>global forward.
> > >>
> > >>
> > >>>>javax.servlet.jsp.JspException: Exception forwarding for name
> > >>>>displayErrorMaintSearch: javax.servlet.ServletException: Error
> > >>>>
> > >>>>
> > >>in servlet
> > >>
> > >>
> > >>>> int org.apache.struts.taglib.logic.ForwardTag.doEndTag()
> > >>>> ForwardTag.java:180
> > >>>>
> > >>>>If I remove the Tiles plug-in from struts-config it works again.
> > >>>>I want to
> > >>>>refactor to Tiles but step one has failed.
> > >>>>
> > >>>>
> > >>>>--
> > >>>>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]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>