Search the web
Welcome, rem947
[Sign Out, My Account]

I'm a seeking a
Age: to City or ZIP:
Yahoo! Personals
Mail Mail shortcuts| Addresses Address Book shortcuts| Calendar Calendar shortcuts| Notepad Notepad shortcuts What's New - Mail Upgrades - Mail Options

This message is not flagged. [ Flag Message - Mark as Unread ]

From Robert Maas Thu May 12 21:44:04 2005
Received: from [153.18.17.22] by web60020.mail.yahoo.com via HTTP; Thu, 12 May 2005 21:44:04 PDT
Date: Thu, 12 May 2005 21:44:04 -0700 (PDT)
From:"Robert Maas" <rem947@yahoo.com>  Add to Address BookAdd to Address Book
Subject: Can't compile example file on campus lab computer
To:sukhjit@coursemanager.info
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Length: 735
H:\tomcat331\webapps\examples\WEB-INF\classes>javac
RequestHeaderExample.java
RequestHeaderExample.java:8: package javax.servlet does not exist
import javax.servlet.*;
^
RequestHeaderExample.java:9: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
RequestHeaderExample.java:17: cannot find symbol
symbol: class HttpServlet
public class RequestHeaderExample extends HttpServlet {
                                          ^
RequestHeaderExample.java:21: cannot find symbol
symbol  : class HttpServletRequest
location: class RequestHeaderExample
    public void doGet(HttpServletRequest request,
                      ^
RequestHeaderExample.java:22: cannot find symbol
symbol  : class HttpServletResponse
location: class RequestHeaderExample
                      HttpServletResponse response)
                      ^
RequestHeaderExample.java:23: cannot find symbol
symbol  : class ServletException
location: class RequestHeaderExample
        throws IOException, ServletException
                            ^
RequestHeaderExample.java:62: cannot find symbol
symbol  : class HttpServletRequest
location: class RequestHeaderExample
    public void doPost(HttpServletRequest request,
                       ^
RequestHeaderExample.java:63: cannot find symbol
symbol  : class HttpServletResponse
location: class RequestHeaderExample
                      HttpServletResponse response)
                      ^
RequestHeaderExample.java:64: cannot find symbol
symbol  : class ServletException
location: class RequestHeaderExample
        throws IOException, ServletException
                            ^
9 errors


I presume the problem is the classpath doesn't include the JAR file
that has javax.servlet etc. I presume to fix that I need to explicitly
set -classpath parameter in javac command. But I have no idea
where that particular JAR file is locayed, so that I know what path
to specify in the -classpath parameter.


Also I'm unable to find the XML file that maps applications to
servlet class files, so that I could edit that XML file to include
new servlets I write myself. So instead of doing that, I'm trying
to modify the sample applications and re-compile them, hence the
compiler errors listed above.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Move Options
Forward Options
Reply Options
Mail Shortcuts
Address Book Shortcuts
Calendar Shortcuts
Notepad Shortcuts
Advanced Search


Copyright © 1994-2005 Yahoo! Inc. All rights reserved. Terms of Service - Copyright/IP Policy - Guidelines - Ad Feedback
NOTICE: We collect personal information on this site.
To learn more about how we use your information, see our Privacy Policy