Servlets - Something Basic is Wierd, Need Someone to Pinpoint the Problem
JiaPei Jen
Ranch Hand
Joined: Nov 19, 2000
Posts: 1309
posted
0
All my Servlets programs can be compiled using JDK1.2.2, and I get compilation errors when I use JDK1.3 to compile those programs. I found that it is very strange. Please help to pinpoint and explain the problem. And what I should do. To give an example, I am able to compile this 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 " + "Transitional//EN\">" + "\n" + "<HTML>\n" + "<HEAD><TITLE>" + "Three Parameters" + "</TITLE></HEAD>\n" + "<BODY BGCOLOR=\"#FDF5E6\">\n" + "<H1 ALIGN=CENTER>" + title + "</H1>\n" + "<UL>\n" + " <LI><B>param1</B>: " + request.getParameter("param1") + "\n" + " <LI><B>param2</B>: " + request.getParameter("param2") + "\n" + " <LI><B>param3</B>: " + request.getParameter("param3") + "\n" + "</UL>\n" + "</BODY></HTML>"); } }
using JDK 1.2.2. JDK1.3 give me compilation error.
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
posted
0
But what is the compilation error that you get? Just saying you get an error is not much help.