Thanks for the feedbacks. I have fixed the spelling
(scope). And my ListThread.java extends Action.
ListThread.java does not extend ParameterAction.
In the end of the ListThread.java, it is a standard:
return ( mapping.findForward( "success" ) );
And the relevant part in my struts.config.xml is:
<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>
Because ListThread.java does not really submit a form,
I simply put name="articleForm" there. I have
substitue other forms; nonetheless, I always get:
org.apache.struts.action.RequestProcessor
ProcessException
Warning: unhandle exception thrown: class
java.lang.NullPointerException
And in the log file, I have:
----- 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(RequestProcessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:524)
--- Caroline Jen <[EMAIL PROTECTED]> wrote:
> 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.
>
> 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.)
>
> I got Status 500 error:
>
> java.lang.NullPointerException
> at
>
org.apache.struts.scaffold.ParameterAction.findSuccess(Unknown
> Source)
>
>
> My struts-config.xml looks like:
>
> <action
> roles="administrator,editor,contributor"
> path="/message/ListThreads"
> type="org.apache.artimus.message.ListThread"
> name="articleForm"
> scopte="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!?
> Yahoo! Movies - Buy advance tickets for 'Shrek 2'
>
http://movies.yahoo.com/showtimes/movie?mid=1808405861
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]