Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

only javaweb server will do?

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello everybody
I have installed Java web server1.1,jdk1.2 and set path of my computer as well but when i try to compile servlet source code file with javac compiler Package errores come like ,javax.servlet not found in import.
Package javax.servlet.http not found in import.
Superclass HttpServlet of class MyServlet2 is not foundi want to know that, i must install JSDK in my computer?
cant i compile servlets without installing JSDK and only with javawebserver.i also tried to compile servlet source file with Jbuilder2 but same kind of error comes?
so what things are must for servlet compiling and how to compile them ?,with javac ?
where can i get jswdk___?
thank you very much waiting for reply.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the c:\javawebserver\lib\jws.jar in your classpath when compiling.
 
nishadinesh gupta
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is reply to xyzman

before compiling the java file you must set the path

eg:- if ur servlet file is in c:\jdk1.3\bin\<some _folder_name> then at command prompt type
c:\>cd jdk1.3\bin\some _folder_name
c:\jdk1.3\bin\some _folder_name>path=c:\jdk1.3\bin
c:\jdk1.3\bin\some _folder_name>set classpath=%classpath%;c:\jsdk2.0\src.;
c:\jdk1.3\bin\some _folder_name>javac myservlet.java

try this i m u will be able 2 run ur programs.

Bye
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic