• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

custom "advice" tag example

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried the custom "advice" tag example from chapter 9 of HFSJ(pg.467). But am getting exception as : unable to compile class for jsp. AdvisorTagHandler cannot be resolved to a type.

I have 3 files here
1. myLib.tld




2. TestCustomTag.jsp


3.AdvisorTagHandler.java(AdvisorTagHandler.class is in the classes directory)



the java file compiles. all the files are at right places. what am i doing wrong ?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I were you, I'd put the AdvisorTagHandler in a package. Leaving class files in the default package does not guarantee a correct behaviour.
 
nisha chidella
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


If I were you, I'd put the AdvisorTagHandler in a package.



now it works. i was lazy to put a one line package statement. . But good i left that , else i wouldn't have known what you told:


Leaving class files in the default package does not guarantee a correct behaviour.



thanks Christophe.
 
reply
    Bookmark Topic Watch Topic
  • New Topic