This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.servlet.Servlet with JBuilder

 
krupa devi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am totally new to servlets and I am using JBuilder foundation and I wanted to write my first sevlet, but when I added the following import statement
import javax.servlet.Servlet
the Jbuilder compiler is giving the following error.
"Class1.java": Error #: 302 : cannot access class javax.servlet.Servlet; neither class nor source found for javax.servlet.Servlet at line 2, column 22
Please help.
Thanks,
Krupa
 
Venugopal nandikolla
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think you must go to the Project--> ProjectProperties--> RequiredLibraries---> and add the jar files(servlet.jar ... etc) then you can able to build the class file.
Better use ant(from apache.org) tool for building the files and you can set it the jbuilder for compilation and cleaning the class files, generating the javadocs....etc
-venu
I am totally new to servlets and I am using JBuilder foundation and I wanted to write my first sevlet, but when I added the following import statement
import javax.servlet.Servlet
the Jbuilder compiler is giving the following error.
"Class1.java": Error #: 302 : cannot access class javax.servlet.Servlet; neither class nor source found for javax.servlet.Servlet at line 2, column 22
Please help.
Thanks,
Krupa
[/B]
 
krupa devi
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Venu,
Thank you very much. It worked.If I want to use ant ( apache.org)where can I get information as what is it? why is it used and how to use it?
Thanks,
Krupa
 
Venugopal nandikolla
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi krupa,
Great ....
Go click on this link http://jakarta.apache.org/ and in the SubProjects part click on the Ant and download the jakarta-ant-1.3-bin.zip(if working on windows OS).Add ant.jar and antrunner.jar in your classpath and you customize the build.xml file as per your requirement you can just use
c:\>ant will build all your class files.
If you want to integrate the ant with JBuilder then I'll will give more info ,mail to my email-id.
-venu
venugopaln@yahoo.com
 
Rehan Malik
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by krupa devi:
Hi,
I am totally new to servlets and I am using JBuilder foundation and I wanted to write my first sevlet, but when I added the following import statement
import javax.servlet.Servlet
the Jbuilder compiler is giving the following error.
"Class1.java": Error #: 302 : cannot access class javax.servlet.Servlet; neither class nor source found for javax.servlet.Servlet at line 2, column 22
Please help.
Thanks,
Krupa


If you just want to use ANY web server, then I would recommend using the free developer's edition of Allaire JRun. It is very easy to setup and can integrate with most of the web servers. It also have the capability of running as a web server by itself.
http://www.allaire.com/products/jrun/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic