You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Helferty, Richard (FUSA)" <Ri...@firstusa.com> on 2002/05/06 17:20:47 UTC

import javax.servlet.http.* problems

Tomcat 4.0.3
JDK 1.4

Attempt to compile following Servlet results in error. Question. Is
ServletUtilities renamed
or unavailable in tomcat-4.0.3 or javax.servlet.http.* renamed. Or is it
something else. Thanks for the help


Code:
package moreservlets;

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class HelloServlet3 extends HttpServlet {
  public void doGet(HttpServletRequest request,
                    HttpServletResponse response)
      throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Hello (3)";
    out.println(ServletUtilities.headWithTitle(title) + 
                "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                "<H1>" + title + "</H1>\n" +
                "</BODY></HTML>");
  }
}


Error:

HelloServlet3.java:23: cannot resolve symbol
symbol  : variable ServletUtilities
location: class moreservlets.HelloServlet3
    out.println(ServletUtilities.headWithTitle(title) +
                ^
1 error


**********************************************************************
This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you
**********************************************************************


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>