Bug 7299

Summary: NPE generated when using RT version of import tag and passing a null value for the url attribute.
Product: Taglibs Reporter: Ryan Lubke <Ryan.Lubke>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: CLOSED FIXED    
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Ryan Lubke 2002-03-20 20:15:28 UTC
Given:

<c-rt:import url='<%= null %>'/>

Generates the following:
java.lang.NullPointerException
	at o.a.t.s.tag.common.core.ImportSupport.isAbsoluteUrl(ImportSupport.java:481)
	at o.a.t.s.tag.common.core.ImportSupport.isAbsoluteUrl(ImportSupport.java:467)
	at o.a.t.s.tag.common.core.ImportSupport.doStartTag(ImportSupport.java:150)
	at o.a.jsp.negativeUrlNullTest$jsp._jspService(negativeUrlNullTest$jsp.java:167)


Section 7.4, page 7-59 of the PD Spec:

"If url is null or empty, a JspTagException is thrown."

This works fine with the EL version if the import tag.
Comment 1 Shawn Bayern 2002-03-30 19:50:56 UTC
Fixed.