Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 6th, 2007, 02:12 PM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default setting classpath in fedora core 5

HI everyone
i am using tomcat Apache Tomcat/5.5.15
when i have compiled my testservlet file i got the following error message
[root@localhost classes]# javac TestingServlet.java
----------
1. ERROR in TestingServlet.java
 (at line 1)
        import javax.servlet.*;
               ^^^^^^^^^^^^^
The import javax.servlet cannot be resolved
----------
2. ERROR in TestingServlet.java
 (at line 2)
        import javax.servlet.http.*;
               ^^^^^^^^^^^^^
The import javax.servlet cannot be resolved
----------
3. ERROR in TestingServlet.java
 (at line 6)
        public class TestingServlet extends HttpServlet {
                                            ^^^^^^^^^^^
HttpServlet cannot be resolved to a type
----------
4. ERROR in TestingServlet.java
 (at line 8)
        public void doGet(HttpServletRequest request,
                          ^^^^^^^^^^^^^^^^^^
HttpServletRequest cannot be resolved to a type
----------
5. ERROR in TestingServlet.java
 (at line 9)
        HttpServletResponse response)
        ^^^^^^^^^^^^^^^^^^^
HttpServletResponse cannot be resolved to a type
----------
6. ERROR in TestingServlet.java
 (at line 10)
        throws ServletException, IOException {
               ^^^^^^^^^^^^^^^^
ServletException cannot be resolved to a type
----------
6 problems (6 errors)[root@localhost classes]#


I found in one of the threads that BY SETTING THE CLASSPATH VARIABLE IT CAN BE RESOLVED

How to set the classpath variable in Fedora core 5
I read i a book that JAVA_HOME variuable also should be assigned a value i.e the poath where java is installed

Please explain me about setting the variable JAVA_HOME,CLASSPATH....etc[IF ANY] in detail

Bye


 
Old February 7th, 2007, 02:52 AM
Registered User
 
Join Date: Feb 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Add servlet.jar file to your class path






Similar Threads
Thread Thread Starter Forum Replies Last Post
setting up WiFi Access on Fedora Core 5 crmpicco Linux 0 August 24th, 2007 05:58 PM
Setting up the path and classpath Yvette Java Basics 0 December 14th, 2005 10:13 PM
How to configure mysql server in linux fedora core sachinkumar PHP Databases 1 June 17th, 2005 01:44 AM
problem with paying music in fedora core 1 yoord Linux 1 August 2nd, 2004 07:08 AM
setting classpath aadz5 JSP Basics 1 July 28th, 2004 04:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.