• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

My j2ee jdk1.4.2 is not supporting javax package.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My j2ee jdk1.4.2 is not supporting javx package.
i already set all pathh and class path.
anybody can help me.
details are given below ::

C:\AVA\J2EE Programs\JSP\JSPCustomTag>javac ATMTag.java
ATMTag.java:5: package javax.servlet does not exist
import javax.servlet.*;
^<br>
ATMTag.java:6: package javax.servlet.http does not exist
<br>
import javax.servlet.http.*;
<br>
ATMTag.java:18: cannot resolve symbol
symbol : class TagSupport
location: class ATMTag
public class ATMTag extends TagSupport{
<br> ^
ATMTag.java:29: cannot resolve symbol
symbol : class JspTagException
location: class ATMTag
public int doStartTag() throws JspTagException{
<br> ^
ATMTag.java:31: cannot resolve symbol
symbol : class JspWriter
location: class ATMTag
<br> JspWriter out =pageContext.getOut();
^
ATMTag.java:31: cannot resolve symbol
symbol : variable pageContext
location: class ATMTag
<br> JspWriter out =pageContext.getOut();
^
ATMTag.java:56: cannot resolve symbol
symbol : variable pageContext
location: class ATMTag
pageContext.getOut().write(str);
<br> ^
ATMTag.java:60: cannot resolve symbol
symbol : variable EVAL_PAGE
location: class ATMTag
return EVAL_PAGE;
^
8 errors
.
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to specify the j2ee.jar as part of your classpath when you attempt to compile you other sources. The j2ee.jar file should be in your J2EE installation "lib" directory.
It is your J2SE JDK that you are using to compile things (javac). The J2SE of course has no knowledge of J2EE, and so you must specify additional libraries so your sources will actually compile.
 
Ajoy Sharma
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi my J2ee.jar in this C:\Sun\AppServer\lib not in jdk\lib directory .
let me know what i do ??
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is your application server's lib directory, which as you noted also contains the j2ee.jar file. You CAN specify that one on your classpath if it is the correct j2ee version. However, I would recommend that you do as I previously said and download the J2EE distribution from Sun, and so on ... see my first post.
 
Ajoy Sharma
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iam sorry .iam unable to understand ur idea. I have already have J2EE application server and JDK \j2sdk1.4.1_02 . in my computer.
and i already set all path all path and class path.
after that plz told me waht i should do to solve this problem.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, here are the steps. Follow them.
1) Download the J2EE distribution from Sun.
2) Install the J2EE distribution from Sun.
3) Compile your sources using the j2ee.jar file in the lib directory of the installed distribution (from step 2).
4) Smile
I cannot explain this any more clearly. You are confusing application, application server, j2se, j2ee, and the requirements and role of each in deploying an enterprise application.
Perhaps, if you followed my directions you would understand them more fully. Try it out.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic