File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Unable to compile servelt-files. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to compile servelt-files." Watch "Unable to compile servelt-files." New topic
Author

Unable to compile servelt-files.

Sebastian Green
Ranch Hand

Joined: Jan 30, 2004
Posts: 136
Hello, Im trying to compile MyFristServlet.java. But Igot errors on simple lines such as "import javax.servlet.*;" I belive that Im missing a jar-file clalled "servlets.jar" I have 2 java-dirs, "C:\Java\j2sdk1.4.1_03" & "C:\Program\Java\j2re1.4.1_03". But none of theme contains servlets.jar. Do I need j2ee or something more? My compiling error is: cannot resolve symbol.


/ Sebastian<br />No blog, No homepage, No life?
Billybob Marshall
Ranch Hand

Joined: Jan 27, 2004
Posts: 202
Originally posted by Mr Scam:
Do I need j2ee

Absolutely. You need a J2EE implementation, which will contain a jar containing the needed classes. Depending on which J2EE implementation you get (Tomcat, Weblogic, etc), it may or may not be named 'servlet.jar'.
Sebastian Green
Ranch Hand

Joined: Jan 30, 2004
Posts: 136
okej, Im off to dl it! Thanks for your reply!
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
Mr.Scam,
Welcome to the Ranch!!!
I guess u might need to have a look at the naming policy of the Ranch.
U can change ur display name here.


Co-author of SCMAD Exam Guide, Author of JMADPlus
SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Sebastian Green
Ranch Hand

Joined: Jan 30, 2004
Posts: 136
Sorry mate..
Ben Dover
Ranch Hand

Joined: Jan 30, 2004
Posts: 91
Hi Sebastian,
Your best bet is to download the Tomcat-5 Servlet container, it contains a "sevlet.jar" file you can place in your path when compiling. Read the Tomcat docs re configuring the web.xml file, assembling your web app, deploying it, and then running it. Its a bit of a learning curve but once you have done it a few times it becomes second nature.
[ January 31, 2004: Message edited by: Louis M@lenica ]
Alexis Sumalpong
Greenhorn

Joined: Jan 06, 2004
Posts: 13
The easiest way is to use and IDE that is meant for web app development. It should have all the libraries needed. For Tomcat, use this simple IDE
http://www.hoversoftcorp.com/downloads/devcentre/demo.zip


alexis
 
Don't get me started about those stupid light bulbs.
 
subject: Unable to compile servelt-files.
 
Similar Threads
jsdk2.1 setup....servlet
compiling servlets under Tomcat 4.0
disable key events like alt+tab, ctrl+alt+delete, alt+F4, etc.
URGENT... running a simple servlet
Eclipse + Servlet + Tomcat