This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Zero to AI - A non-technical, hype-free guide to prospering in the AI era and have Nicolò Valigi and Gianluca Mauro on-line!
See this thread for details.
Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Similar JDK1.3 Problem to Mr. Norman Leach -- Please Help

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am running into similar problem to what Mr. Norman Leach had -- my programs with import statment get compiled without problem using JDK 1.2.2. However, when I use JDK 1.3, I have "cannot resolve symbol" error messages. I would like to know the exact way to solve the problem.
To be specific:
This program (see below) (and my many other Servlets programs) were compiled using JDK 1.2.2 without problem. When I use JDK 1.3 to compile this program, I got six error messages (error messages are listed after the program).
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ThreeParams extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String title = "Reading Three Request Parameters";
out.println("<DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +<br /> "Transitional//EN\">" + "\n" +
"<HTML>\n" +
"<HEAD><TITLE>" + "Three Parameters" + "</TITLE></HEAD>\n" +
"<BODY BGCOLOR=\"#FDF5E6\">\n" +
"<H1 ALIGN=CENTER>" + title + "</H1>\n" +
"
    \n" +
    "
  • param1: "
    + request.getParameter("param1") + "\n" +
    "
  • param2: "
    + request.getParameter("param2") + "\n" +
    "
  • param3: "
    + request.getParameter("param3") + "\n" +
    "
  • \n" +
    "</BODY></HTML>");
    }
    }
    error message:
    The first two error messages point at
    import javax.servlet.*;
    import javax.servlet.http.*;
    The other four error messages are:
    ThreeParams.java:17: cannot resolve symbol
    symbol: class HttpServlet
    location: class ThreeParams
    public class ThreeParams extends HttpServlet {
    (an arrow point at the 'H' of HttpServlet)
    ThreeParams.java:19: cannot resolve symbol
    symbol: class HttpRequest
    location: class ThreeParams
    public void doGet( HttpServletRequest request,
    (an arrow points at the 'H' of HttpServletRequest)
    ThreeParams.java:20: cannot resolve symbol
    symbol: class HttpServletResponse
    location: class ThreeParams
    HttpServletResponse response )
    (an arrow points at the 'H' of HttpServletResponse)
    ThreeParams.java:21: cannot resolve symbol
    symbol: class ServletException
    location: class ThreeParams
    throws ServletException, IOException {
    (an arrow points at the 'S' of ServletException)
    Please let me know how to fix the problem? My autoexec.bat file is shown below. Thank you.
    @ECHO OFF
    SET BLASTER=A220 I7 D1 H7 P330 T6
    SET SBPCI=C:\SBPCI
    SET PATH=.;c:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.2.2\bin;
    set WL_HOME=C:\weblogic
    set JAVA_HOME=c:\jdk1.2.2
    set RMIFORMS=
    set JDK_CLASSES=%JAVA_HOME%\lib\tools.jar;
    set CLIENT_CLASSES=%WL_HOME%\myserver\clientclasses
    set SERVER_CLASSES=%WL_HOME%\myserver\serverclasses
    set SERVLET_CLASSES=%WL_HOME%\myserver\servletclasses
    set
    CLASSPATH=%CLASSPATH%%JDK_CLASSES%%WL_HOME%\license;%WL_HOME%\classes;%WL_HOME%\lib\weblogicaux.jar;%CLIENT_CLASSES%;%SERVER_CLASSES%%RMIFORMS%
    set PATH=%PATH%%WL_HOME%\bin;
    DOSKEY
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the file 'servlet.jar' in that classpath anywhere? I didn't see it. If you don't have the file, it's available on Sun's web site.
I hope that helps.
Kevin
 
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your JAVA_HOME environment variable is still pointing to the JDK1.2.2. If you're using JDK1.3, shouldn't it point to JDK1.3?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic