Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Hello JSP tag...

 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, i have been trying to crack a HelloWorld tag for a couple of nights now.
I have just installed Tomcat 4.0.3,the installation was OK , i can start and stop and
access localhost:8080
I have abided by the directory structure given in JSP Tag Lib Book(Gal Shachor etal) and find out
you will end up with two WEB-INF folders .The
directory structure he suggested was :
webapps/testapp/WEB_INF/classes
webapps/testapp/WEB_INF/lib
My XXX.tld was in WEB_INF
TagHandlerClass in .../classes
web.xml in .../classes
The problem is in my IDE Forte 2.0 i cannot compile the HelloWorld.jsp . Though the TagHandlerClass compile easily.All i was doing was
typing from the Book into different destinations.
The error on Forte output was :
HelloJSP.jsp [3:8] Unable to open taglibrary /hello : Could not locate TLD META-INF/taglib.tld
NOTE: where /hello is my uri
Below is my web.xml file
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE web-app
PUBLIC "-//Sun MicroSystems,inc.//DTD Web Application 2.2// EN"
"http://java.sun.com/j2ee/dtds/web-apps_2_2.dtd"
>
<web-app>
<taglib>
<taglib-uri> /hello </taglib-uri>
<taglib-location>
/WEB-INF/HelloDescriptor.tld
</taglib-location>
</taglib>
</web-app>
Please , help !!!
 
Younas Aamir
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Hoping this link will help you
http://jakarta.apache.org/taglibs/tutorial.html
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"aamir"-
Welcome to the JavaRanch! Please adjust your displayed named to match the JavaRanch Naming Policy.
You can adjust it here.
Thanks! and welcome to the JavaRanch!
 
Younas Aamir
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jessica
I have fixed. Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic