• 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:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Custom Tag help - simple question

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to learn JSP and am working on Custom Tags. I'm creating a tag class and these lines:

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

are giving me an errors since I don't have the javax.servlet src code installed.

My question is: How do I get these classes?

I have JSDK 1.5 and I don't have the servlet classes in the src directory. Thanks in advance...
[ July 08, 2005: Message edited by: Bear Bibeault ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using Tomcat, the required libs are in CATALINA_HOME/common/lib
You can also download j2ee.jar from java.sun.com.
 
Patrick Joseph
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the common/lib directory, I see a "servlet.jar" file.

Do I just need to copy this over to where my SDK directories are installed?

I have Tomcat installed in my home machine in a seperate directory.
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's best not to copy it. Rather, add it to your compile classpath where it lies.
 
Bear Bibeault
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Patrick asked:

When you say add it to the CLASSPATH, is that the same as adding it to the PATH variable (environment variable)?



No. The PATH env variable determines the folders that will be searched to find command-line commands.

One of the ways that you can define the classpath is with the CLASSPATH env variable.

If you are going to be serious about web development, I'd recommend adopting Ant as a build tool.
 
Patrick Joseph
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:

One of the ways that you can define the classpath is with the CLASSPATH env variable.



Thanks Bear...

I did a little research and was able to successfully compile the tag class now.
[ July 09, 2005: Message edited by: Patrick Joseph ]
 
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic