This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
hi ! I have just passed SCJP. I wanted to learn servlets and other technologies so i downloaded the jsdk2.1 package. And i also given the path in the bat file. But still when i compile any basic servlet program it is giving me error that javax.servlet does not exist. I don't know why it is giving me these types of errors.Thanks in advance.
hi shabbir, installing only jsdk is not sufficient u have install any application server that support servlets like tomcat,java web server,jrun ....so decide which server u want to use and install it.if u know java then it is quite easy to work on servlets. -greddy
gayatri reddy
Greenhorn
Joined: Apr 25, 2001
Posts: 7
posted
0
hi shabbir, sorry i thought u installed jdk instead of jsdk. -greddy
Congratulations on clearing the SCJP exam.Please read the documentation of JSDK 2.1 for configuration of the classpath.You can put the servlet.jar in the classpath or alternatively put it in jre/lib/ext folder, so that JVM can take care of your servlet compilation/execution. Hope this helps. Regards, ------------------ Sandeep Desai vgdesai@bom3.vsnl.net.in
Sun Certified Java ProgrammerScored 93 per cent
Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
IBM Enterprise Connectivity with J2EE Scored 72 per cent
Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
shabbir zakir
Ranch Hand
Joined: Nov 12, 2000
Posts: 183
posted
0
thanks everybody for your replies.
shabbir zakir
Ranch Hand
Joined: Nov 12, 2000
Posts: 183
posted
0
hi guys!
Thanks for your replies but i did everything i configured jsdk server and jsdk servlet. but now when i compile any file it gives me error that HelloServlet.java:4 cannot resolve symbol:class GenericServlet location:class HelloServlet
Thanks for your replies but i did everything i configured jsdk server and jsdk servlet. but now when i compile any file it gives me error that HelloServlet.java:4 cannot resolve symbol:class GenericServlet location:class HelloServlet
Hi Shabbir, U have to import the 'javax.servlet.*' package into ur program. So, just include this line into ur program: include javax.servlet.*; and then compile. It must work. Regards, Shibin
Desai Sandeep
Ranch Hand
Joined: Apr 02, 2001
Posts: 1157
posted
0
Hi Shabbir, I would suggest, you import javax.servlet.http.*, and javax.servlet.* both.The former for HttpServlet class and the latter for ServletException class Also, it is a common practice not to override the service method, unless you are implementing a new protocol like HTTP. Hence, you could try the following code :
Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
IBM Enterprise Connectivity with J2EE Scored 72 per cent
Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
Shibin Raghavan
Greenhorn
Joined: Mar 29, 2001
Posts: 11
posted
0
Sorry Shabbir for the error in my previous reply. The actual line must be: import javax.servlet.*; I just typed 'include' by mistake instead of import. Regards, Shibs
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.