NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

package javax.servlet does not exist :>

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
wildheart25c



Joined: 13 Sep 2009
Posts: 4

PostPosted: Sun Sep 27, 2009 3:06 pm    Post subject: package javax.servlet does not exist :> Reply with quote

you've read it once you've read it a thousand times! probably responded to it just as many times. Now i ask that you respond one more time
I've added as many details as possible becuase i've tried the solutions in an old thread in this forum but no luck.

http://developers.sun.com/mobility/midp/articles/tutorial2/ <= I'm following what they're telling me to do step by step but i get JAVAC NOT RECOGNIZED when i try to compile the code from that website. It's called Writing Servlet Source Code

1- I downloaded TOMACAT zip and unzipped it in my C drive => C:\jakarta-tomacat-4.1.31 Contents of hte zip are inside this directory.

2- I went here C:\jakarta-tomacat-4.1.31\webapps\midp\WEB-INF\classes and put a copy of that java file here. I created the directory midp and its subdirectories.

3- I went to C:\jakarta-tomacat-4.1.31\bin and pressed STARTUP. Now the server is running.

4- I started a prompt and did as I was told where i set the path then i tried JAVAC and i failed.

5- I went to ENV vars. There was no classpath. So i created one and added its value as C:\jakarta-tomacat-4.1.31\common\lib\servlet.jar

6- I closed the prompt and the server then tried again. Failed.

7- I tried going to the directory where my java file was and then tried javac and still i failed.

8- I started NetBeans and checked plugins. To my luck, and surprise, i found tomacat plugin which I installed alongside another plugin called WebSomething. It says that this plugin will be installed as well since its dependant on it.

9- I went to TOOLS then OPTIONS then MISCLANEOUS and pressed ADD JAR/ZIP next CLASSPATH and put this C:\jakarta-tomacat-4.1.31\common\lib\servlet.jar

10- I started a new prj and created a java file with the same name as the one in the site. I copied hte code too. Red lines appeared on almost every line of code. Like import javax.servlet.http.*; was underlined and the tip said package javax.servlet does not exist


So what now? I tried to make my post as detailed as possible. If you have a solution plz let me no. and in details if you plz Very Happy
My jdk directory is C:\Program Files\Java\jdk1.6.0
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo