I have double checked that the signin/Welcome.jsp is
at the application root.  Therefore, the forward
statement should not cause the NullPointerException
problem.

      <forward
             name="success"
             path="/signin/Welcome.jsp"/>

What confuses me is that I have done something similar
before; i.e. I have other java class extends Action. 
And upon completion of all tasks of the class, I
successfully forward the application to my welcome
page.  

Only this ListThread.java class fails to work. 

--- Martin Gainty <[EMAIL PROTECTED]> wrote:
> Where is signin/Welcome.jsp?
> if located under WEB-INF/signin then modify forward
> statement to
> <forward name="success"
>          path="/WEB-INF/signin/Welcome.jsp"/>
> Martin
> ----- Original Message -----
> From: "Caroline Jen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, May 14, 2004 10:54 AM
> Subject: NullPointerException - findSuccess(Unknown
> Source)
> 
> 
> > Need your expertise to diagnose the problem.
> >
> > I have a java class ListThread.java that extends
> > Action. This java class simply calls a couple of
> > helper classes to access my database. In the end
> of
> > the ListThread.java, it is a standard statement:
> >
> > return ( mapping.findForward( "success" ) );
> >
> >
> > I have not yet prepared a JSP to be displayed in
> the
> > browser after ListThread.java completes its tasks;
> > therefore, upon completion, I temporarily wants
> the
> > application to be forwarded to my welcome page.
> (My
> > welcome page works fine.)
> >
> > Because the ListThread.java does not really submit
> a
> > form, I simply put name="articleForm" in the
> > struts-config.xml file.  I have substituted with
> other
> > forms for testing purpose.  Nonetheless, I always
> got
> > Status 500 error:
> >
> > ----- Root Cause -----
> > java.lang.NullPointerException
> > at
> >
>
org.apache.struts.scaffold.ParameterAction.findSuccess(Unknown
> > Source)
> > at
> >
>
org.apache.struts.scaffold.BaseAction.execute(Unknown
> > Source)
> > at
> >
>
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
> sor.java:484)
> > at
> >
>
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
> > .............
> > .............
> >
> > My struts-config.xml looks like:
> >
> >     <action
> >         roles="administrator,editor,contributor"
> >         path="/message/ListThreads"
> >        
> type="org.apache.artimus.message.ListThread"
> >         name="articleForm"
> >         scope="request"
> >         validate="false">
> >        <forward
> >             name="success"
> >             path="/signin/Welcome.jsp"/>
> >     </action>
> >
> > And here is my ListThread.java:
> >
> > import LOTS OF PACKAGES AND CLASSES;
> >
> > public final class ListThread extends Action
> > {
> >    public ActionForward execute(ActionMapping
> mapping,
> >                                 ActionForm form,
> >                                 HttpServletRequest
> > request,
> >                                
> HttpServletResponse
> > response)
> >                                 throws Exception
> >    {
> >
> >       String memberName = request.getRemoteUser();
> >
> >       // for sort and order stuff
> >       String sort  = request.getParameter( "sort"
> );
> >       String order = request.getParameter( "order"
> );
> >
> >       if ( sort.length() == 0 ) sort =
> > "ThreadLastPostDate";
> >       if ( order.length()== 0 ) order = "DESC";
> >
> >       int offset  = 0;
> >       int rows    =
> > MessageInboxConfig.ROWS_IN_THREADS;
> >       offset = Integer.parseInt(
> request.getParameter(
> > "offset" ) );
> >       rows = Integer.parseInt(
> request.getParameter(
> > "rows" ) );
> >
> >       ListThreadHandler lthandler = new
> > ListThreadHandler();
> >       ListPostHandler lphandler = new
> > ListPostHandler();
> >
> >       int totalThreads =
> > lthandler.getNumberOfThreads_forReceiver(
> memberName
> > );
> >       if ( offset > totalThreads )
> >       {
> >          throw new BadInputException( "The offset
> is
> > not allowed to be greater than total rows." );
> >       }
> >
> >       Collection beans =
> >
>
lthandler.getThreads_forReceiver_withSortSupport_limit(
> > memberName, offset, rows, sort, order );
> >
> >       SiteUtil.prepareNavigate( request, offset,
> > beans.size(), totalThreads,
> > MessageInboxConfig.ROWS_IN_THREADS );
> >       int totalPosts =
> > lphandler.getNumberOfPosts_forReceiver( memberName
> );
> >
> >       request.setAttribute( "ThreadBeans", beans
> );
> >       request.setAttribute( "TotalThreads", new
> > Integer( totalThreads ) );
> >       request.setAttribute( "TotalPosts", new
> Integer(
> > totalPosts ) );
> >
> >       return ( mapping.findForward( "success" ) );
> >
> >    }
> > }
> >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! - Internet access at a great low price.
> > http://promo.yahoo.com/sbc/
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 



        
                
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to