the problem of JSP custom tags

W

wangyin

hi all:
I defined a tld file:
...........
<tag>
<name>example</name>
<tagclass>ExampleTag</tagclass>//is wrong!
<tagclass>test.ExampleTage</tagclass>//is correct!
<bodycontent>empty</bodycontent>
</tag>
.........
=================================================================
while tagclass name without packagename,jsp compiler occurred many errors.
but add package that's ok! why?
 
A

Andrew Thompson

<tagclass>test.ExampleTage</tagclass>//is correct! ...
while tagclass name without packagename,jsp compiler occurred many errors.
but add package that's ok! why?

It would seem that ExampleTag/ExampleTage is
located in package 'test', so that is where
it needs to be, and where Java will correctly
find it and load it.

HTH
 
T

Tor Iver Wilhelmsen

wangyin said:
while tagclass name without packagename,jsp compiler occurred many errors.
but add package that's ok! why?

Because the package name is part of the class' name. You cannot leave
it out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,433
Messages
2,571,683
Members
48,796
Latest member
Greg L.

Latest Threads

Top