You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Pingili, Madhupal" <MP...@BBandT.com> on 2004/01/09 19:56:26 UTC

RE: Struts Question.

Hi Leonard,
For your question,
	< When it forwards to a tile what should happen and is there any
linkage you
can think I may be missing. >
You can associate a controller(Java code or Action) to your tile, which will
run 
immediately before your Tile JSP page and put some debug statements to see
if 
the tile is processed.
Regarding missing links, I don't think of any. But I see index_jsp in the
Exception stack.
So, I am guessing that you are invoking index.jsp, which is having a Link to
action
/skiptomain. I don't quite understand the flow of your application.

So, I am posting this email to Struts user mailing list so that someone can
understand 
your questions and hopefully give some ideas.

Reddy Pingili 


> -----Original Message-----
> From:	Leonard.Hegarty@barclayscapital.com
> [SMTP:Leonard.Hegarty@barclayscapital.com]
> Sent:	Friday, January 09, 2004 12:00 PM
> To:	Pingili, Madhupal
> Subject:	Struts Question.
> 
> Hi Reddy
> 
> I have a question regarding Tiles and Struts. If you havent used tiles
> then
> I don't want to waste your time.
> 
> I am deliberately not using ForwardAction to direct to the start page. I
> am
> using my DoNothingAction so as I can see the debug statement and know its
> going correct thusfar
> 
> 
> 	<action path="/skiptomain"
>            type="com.barcap.topl.requestHandler.action.DoNothingAction"
>            name="editSchedulerConfigForm"
>            validate="false"
>            scope="request">           
>       <forward name="success"              path=".default.web.page"/>     
> 	</action>
> -----------------------------------------
> Here is my donothing.java
> 
> 
> 	public ActionForward execute(ActionMapping mapping,
> 								 ActionForm
> form,
> 	
> HttpServletRequest request,
> 	
> HttpServletResponse response)
> 							throws IOException,
> ServletException, TOPLException
> 	{
> //		String title = (String)context.getAttribute( "title" );
> //		System.out.println( "Original title			" +
> title );
> 
> 		System.out.println(getClass() + " donothingactioninvoked");
> 
> 		return (mapping.findForward("success"));
> 
> 	} 
> ------------------------------------------------------
> Here is my tile definition:
> 
>   <definition name=".default.web.page"
> path="/web/jsp/common/barcaysLayout.jsp">
>           <put name="title"  	 value="HELLO WORLD Title" />
>   </definition>
> 
> --------------------------------------------------------
> Here is my basic layout:
> 
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> 
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>
> 
> <html:html>
> <head>
> <title><tiles:getAsString name="title"/></title>
> <html:base/>
> </head>
> 
> </body>
> </html:html>
> 
> -------------------------------------------------
> This debug comes out INFO regarding the Tiles definition factory; does it
> need a name ?
> 
> 09-Jan-2004 16:35:44 org.apache.struts.tiles.TilesRequestProcessor
> initDefinitio nsMapping
> INFO: Tiles definition factory found for request processor ''. class
> com.barcap.topl.requestHandler.action.DoNothingAction donothingactioninvok
> ed
> ---------------------------
> The debug statement comes out ok.; but I get the exception below 
> 
> javax.servlet.ServletException: Exception forwarding for name skiptomain:
> java.lang.NullPointerException
> 	at
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextI
> mp
> l.java:533)
> 	at org.apache.jsp.index_jsp._jspService(index_jsp.java:61)
> 	at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :2
> 10)
> 	at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati
> on
> FilterChain.java:247)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter
> Ch
> ain.java:193)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.
> ja
> va:256)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv
> ok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480
> )
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.
> ja
> va:191)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv
> ok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480
> )
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1
> 80
> )
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv
> ok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValv
> e.
> java:171)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv
> ok
> eNext(StandardPipeline.java:641)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
> 72
> )
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv
> ok
> eNext(StandardPipeline.java:641)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480
> )
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja
> va
> :174)
> 	at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.inv
> ok
> eNext(StandardPipeline.java:643)
> 	at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480
> )
> 	at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 	at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
> 	at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCon
> ne
> ction(Http11Protocol.java:392)
> 	at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.j
> av
> a:619)
> 	at java.lang.Thread.run(Thread.java:534)
> 
> My forward to the Tile does not seem to be happening atall.
> 
>   <definition name=".default.web.page"
> path="/web/jsp/common/barcaysLayout.jsp">
>           <put name="title"  	 value="HELLO WORLD Title" />
>   </definition>
> 
> 
> 
> 
> 
> When it forwards to a tile what should happen and is there any linkage you
> can think I may be missing. 
> 
> Thanks
> 
> Leonard
> 
> 
> 
> 
> ------------------------------------------------------------------------
> For more information about Barclays Capital, please
> visit our web site at http://www.barcap.com.
> 
> 
> Internet communications are not secure and therefore the Barclays 
> Group does not accept legal responsibility for the contents of this 
> message.  Although the Barclays Group operates anti-virus programmes, 
> it does not accept responsibility for any damage whatsoever that is 
> caused by viruses being passed.  Any views or opinions presented are 
> solely those of the author and do not necessarily represent those of the 
> Barclays Group.  Replies to this email may be monitored by the Barclays 
> Group for operational or business reasons.
> 
> ------------------------------------------------------------------------
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org