This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems when package statement is missing

 
Suprakash Das
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am using Tomcat 4.0. I wrote a simple tag, without a package statement and placed the MyTag.class file in WEB-INF/classes. The Jsp page using the tag doesn't compile...Compile Exception No class found... MyTag.
When I change the tag to include a package statement it works without a hitch.
This has happened before with other servlet containers. I was wondering if anybody knew the reason for this behaviour of servlet containers.
Thanks in advance.
das
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17626
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'd have to show us the taglibrary descriptor. That's what makes a tag accessible. Otherwise there's a potential security problem if I could take any class in the classpath and pretend it was a tag library. Though considering the infrastructure required it's a pretty minor one.
 
Suprakash Das
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the tld for the tag. I placed HelloTag.class under WEB-INF/classes in my webapp.
<tag>
<name>hello</name>
<tagclass>HelloTag</tagclass>
<info>
Print hello and name
</info>
<attribute>
<name>first</name>
<required>true</required>
</attribute>
<attribute>
<name>second</name>
</attribute>
</tag>
I want to know what the jsp engine does when it encounters a class without a package structure.
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic