File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Servlets - Something Basic is Wierd, Need Someone to Pinpoint the Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets - Something Basic is Wierd, Need Someone to Pinpoint the Problem" Watch "Servlets - Something Basic is Wierd, Need Someone to Pinpoint the Problem" New topic
Author

Servlets - Something Basic is Wierd, Need Someone to Pinpoint the Problem

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
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: 6920
But what is the compilation error that you get? Just saying you get an error is not much help.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets - Something Basic is Wierd, Need Someone to Pinpoint the Problem