• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Struts Request Processor gives me Null Pointer exception

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I am trying to access my Struts application like this
Http://myhost/userSetup/usersByDivisionReport.do
I am getting this error,where userSetup is our context root..

35ba8c4 WebGroup E SRVE0026E: [Servlet Error]-[action]: java.lang.NullPointerException
at org.apache.struts.util.RequestUtils.forwardURL(RequestUtils.java:1386)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:401)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:505)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServl

the struts-config.xml is like this

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">;

<struts-config>

<!-- Data Sources -->
<data-sources>
</data-sources>

<!-- Form Beans -->
<form-beans>
<form-bean name="usersByDivisionReportForm" type="com.strykercorp.e3s.userSetup.forms.UsersByDivisionReportForm">
</form-bean>
<form-bean name="usersByRoleReportForm" type="com.strykercorp.e3s.userSetup.forms.UsersByRoleReportForm">
</form-bean>
<form-bean name="errorReportForm" type="com.strykercorp.e3s.userSetup.forms.ErrorReportForm">
</form-bean>
<form-bean name="usersInMultDivsReportForm" type="com.strykercorp.e3s.userSetup.forms.UsersInMultDivsReportForm">
</form-bean>
<form-bean name="sysConfigReportForm" type="com.strykercorp.e3s.userSetup.forms.SysConfigReportForm">
</form-bean>
</form-beans>

<!-- Global Exceptions -->
<global-exceptions>
</global-exceptions>

<!-- Global Forwards -->
<global-forwards>
<forward name="reportUsersByDivision" path="/usersByDivisionReport.do?method=populate"/>
<forward name="reportUsersByRole" path="/usersByRoleReport.do?method=populate"/>
<forward name="reportError" path="/errorReport.do?method=populate"/>
<forward name="reportUsersInMultDivs" path="/usersInMultDivsReport.do?method=reportResults"/>
<forward name="reportSysConfig" path="/sysConfigReport.do"/>

</global-forwards>

<!-- Action Mappings -->
<action-mappings>
<action
name="usersByDivisionReportForm"
path="/usersByDivisionReport"
scope="session"
parameter="method"
validate="true"
input="/userSetup/reportUsersByDivision.jsp"
type="com.strykercorp.e3s.userSetup.actions.UsersByDivisionReportAction">
<forward name="populate" path="/userSetup/reportUsersByDivision.jsp?method=populate"/>
<forward name="divisionSelected" path="/userSetup/reportUsersByDivision.jsp?method=divisionSelected"/>
<forward name="reportResults" path="/userSetup/reportUsersByDivision.jsp?method=reportResults"/>
<forward name="reportPagingResults" path="/userSetup/reportUsersByDivision.jsp?method=reportPagingResults"/>
<forward name="reportResultsPrint" path="/userSetup/reportUsersByDivisionPrint.jsp?method=reportResultsPrint"/>

</action>
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>

<action-mappings>

</struts-config>


Appreciate any insights...
 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's obvious from the exception something is wrong with the action forwards


<forward name="populate" path="/userSetup/reportUsersByDivision.jsp?method=populate"/>



Try having the path without the webapp context name.
 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic