wood burning stoves 2.0*
The moose likes JSP and the fly likes My j2ee jdk1.4.2 is not supporting javax package. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "My j2ee jdk1.4.2 is not supporting javax package." Watch "My j2ee jdk1.4.2 is not supporting javax package." New topic
Author

My j2ee jdk1.4.2 is not supporting javax package.

Ajoy Sharma
Greenhorn

Joined: Feb 24, 2004
Posts: 9
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
.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
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.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Ajoy Sharma
Greenhorn

Joined: Feb 24, 2004
Posts: 9
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

Joined: May 29, 2003
Posts: 1258
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

Joined: Feb 24, 2004
Posts: 9
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

Joined: May 29, 2003
Posts: 1258
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: My j2ee jdk1.4.2 is not supporting javax package.