BugRat Report # 9

Project: Jasper Release: 3.2 beta 2
Category: Bug Report SubCategory: New Bug Report
Class: swbug State: received
Priority: medium Severity: serious
Confidence: public

Submitter: Phil Hanna ( Phil.Hanna@sas.com )
Date Submitted: Aug 1 2000, 04:35:49 CDT
Responsible: Default User ( jakarta-bugs@localhost )

TagBeginGenerator will not allow tags in unnamed package
Environment: (jvm, os, osrel, platform)
1.3, any, any, any

Additional Environment Description:

Report Description:
org.apache.jasper.compiler.TagBeginGenerator emits servlet code to handle custom tags. In its generateServiceMethodStatements() method, it generates a call to the constructor of the custom tag, using the tag handler's fully qualified class name: pkg.Foo foo = new pkg.Foo(); this works fine if Foo is in a package, but fails for tag handler classes in the unnamed package: Foo foo = new Foo(); because there is no import Foo; at the top of the class. The generated servlet does not compile, since it itself is in a package, and thinks that Foo must be in the same package.

View this report online...