You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2006/03/23 10:23:25 UTC

DO NOT REPLY [Bug 39074] New: - java.lang.NullPointerException

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39074>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39074

           Summary: java.lang.NullPointerException
           Product: Struts
           Version: Unknown
          Platform: Other
        OS/Version: Windows NT
            Status: NEW
          Severity: major
          Priority: P2
         Component: Taglibs
        AssignedTo: dev@struts.apache.org
        ReportedBy: se_shailesh@yahoo.co.in


I m using Struts-1.2.0 and Tomcat 4.1.30.
I have a link in my "index.jsp" that uses 'forward' attribute of <html:link> to 
transfer to a page called "xyz.jsp".
For your reference the code snippet is as below:
---------------------------------------------
  In index.jsp -> 
      <html:link forward="xyzForward"> XYZ Form </html:link>
   
  In struts-config.xml ->
     <global-forwards>
     <forward   name="xyzForward"
         	path="/xyz.jsp"/>
     </global-forwards>
---------------------------------------
And i get the HTTP Status 500 Internal Server Error: The root cause is as 
follows: (only the initial 4 lines is listed)

java.lang.NullPointerException
	at org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding
(TagUtils.java:487)
	at org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding
(TagUtils.java:370)
	at org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:514)
	at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:374)
                                     "
--------------------------------------
Note : With "href" and "action" attributes of <html:link> the index.jsp is 
getting displayed but exception occurs while using "forward" and "page" 
attributes.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 39074] - java.lang.NullPointerException

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39074>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39074





------- Additional Comments From eh-asf-bugzilla@narthex.us  2006-04-04 21:04 -------
This defect also appears in struts-1.2.9.

Source of error:
TagUtils.java:422:
ModuleConfig moduleConfig = instance.getModuleConfig(module, pageContext);
TagUtils.java:428:
ForwardConfig forwardConfig = moduleConfig.findForwardConfig(forward);

The problem is that "getModuleConfig" is allowed to return null (see its
implementation, where this is documented).  If it does return null, however,
there's no check for it, nor any alternate action.  Dereferencing it in line 428
generates the exception.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 39074] - java.lang.NullPointerException

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39074>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39074





------- Additional Comments From eh-asf-bugzilla@narthex.us  2006-04-04 23:23 -------
This particular problem can be masked by initializing servlet "action" with
param-name "config/" rather than "config".  This appears to make a module
context that exists (non-null pointer) with an empty name.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 39074] - java.lang.NullPointerException

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39074>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39074





------- Additional Comments From eh-asf-bugzilla@narthex.us  2006-04-04 21:29 -------
(In reply to comment #1)
> TagUtils.java:422:
> ModuleConfig moduleConfig = instance.getModuleConfig(module, pageContext);
> TagUtils.java:428:
> ForwardConfig forwardConfig = moduleConfig.findForwardConfig(forward);

Still no null-pointer check in 1.3.0 snapshot.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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