It is true that the tiles config file is optional. But if you don't have a tiles config file, this means that you don't use tiles definitions. So, you don't need the TilesRequestProcessor and the TilesPlugin ...
The TilesRequestProcessor is used to catch definition names. It queries the factory to check if a definition exist. If there is no config file, no factory is loaded, and the first attent to access to the factory throw an exception.
It appears that the TilesRequestProcessor try to access the tiles factory to check if your path is a definition ... I think that this can be reported as a bug.
A workaround is to have a tiles config file with a fake definition.
Cedric
Jerome Jacobsen wrote:
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-----<mailto:[EMAIL PROTECTED]>
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-----com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction -
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:processorClass="org.apache.struts.tiles.TilesRequestProcessor"
<controller
debug="9"/>http://localhost:8080/Sandbox-FPRSAcceptanceClient-context-root/index.jsp
<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 --
2002-12-12 16:38:08,073 [HttpRequestHandler-532] DEBUG[HttpRequestHandler-532]
com.metalsa.orator.fprs.ui.web.struts.actions.FprsBaseAction - BEGIN
execute(ActionMapping,...) 2002-12-12 16:38:08,103
DEBUG
com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction -BEGIN initialize(ActionMapping, ...) 2002-12-12 16:38:08,103- Unable
[HttpRequestHandler-532] INFO
com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction
to find localeForm in the session. 2002-12-12 16:38:08,203com.metalsa.orator.fprs.ui.web.struts.actions.InitializingAction - Added
[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
localeForm to the session. 2002-12-12 16:38:08,223[HttpRequestHandler-532]
DEBUG
processActionForward(/getErrorSeverityLocs.do,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,...)
in servletfalse)
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
J2EE].server.http.EvermindHttpServletResponse,int org.apache.struts.taglib.logic.ForwardTag.doEndTag()oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest,
ForwardTag.java:180
void _index._jspService(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
[/index.jsp]
index.jsp:8
void
javax.servlet.ServletResponse)ServletRequ
HttpJsp.java:139
void
oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.Http
est, javax.servlet.http.HttpServletResponse, java.lang.String)p.HttpServl
JspPageTable.java:317
void
oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.htt
etRequest, javax.servlet.http.HttpServletResponse)rvletReques
JspServlet.java:465
void
oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpSe
t, javax.servlet.http.HttpServletResponse)javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
JspServlet.java:379
void
javax.servlet.ServletResponse)ervletReque
HttpServlet.java:853
void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.S
st, javax.servlet.ServletResponse)servlet.Ser
ServletRequestDispatcher.java:721
void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.
vletRequest, javax.servlet.http.HttpServletResponse)Oracle9iAS
ServletRequestDispatcher.java:306
boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for
J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[
(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
<mailto:[EMAIL PROTECTED]>java.io.InputStream, java.io.OutputStream, boolean)exception.
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:processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>
<controller
Now it works! So what was wrong with the <plug-in> usage? WasI 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
<mailto:[EMAIL PROTECTED]>global forward.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
in servletjavax.servlet.jsp.JspException: Exception forwarding for name
displayErrorMaintSearch: javax.servlet.ServletException: Error
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:
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:
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:
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]>

