• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDK and JEE(VERY URGENT)  RSS feed

 
Angela D'souza
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have jdk1.3 on my system. I came to know that javax.servlet is in Java(TM) 2 SDK, Enterprise Edition 1.3.1. Do I need both JDK1.3 and JEE1.3.1 to run other java classes and servlets???
Here is code for servlet:
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class test extends HttpServlet {
public void doGet (HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("<body bgcolor=\"#ffffff\">" +
"<center>" + "<hr> <br>  " + "<h1>" +
"<font size=\"+3\" color=\"#CC0066\">Duke's </font>" +
<img src=\"" + request.getContextPath() +
"/duke.books.gif\">" +
"<font size=\"+3\" color=\"black\">Bookstore</font>" +
"</h1>" + "</center>" + "<br>   <hr> <br> ");
}
}
 
Barry Andrews
Ranch Hand
Posts: 529
C++ Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need both, or you can move to Java SDK 1.4 which contains everything.
Barry
 
Deyan Sultov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can just copy all packages you are planning to use(for instance servlet.jar, containing javax.servle.* classess) into your JAVA_HOME\jre\lib\ext directory
 
Angela D'souza
Ranch Hand
Posts: 469
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
Is is true that servlets required Tomcat to run or it just run with JDK1.3 with servlet library???
 
Deyan Sultov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes .. in order to execute the servlet you need application server (Tomcat, JRun)
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And contrary to the statement above, J2SDK 1.4 does not contain servlet support either. You still need Tomcat or another server.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!