JDK1.2.2+JSDK2.1の導入 for Linux
LICENSE examples/ startserver* webpages/ README server.jar startserver.bat default.cfg servlet.jar stopserver* etc/ src/ stopserver.bat |
[root@soho jsdk2.1]# ./startserver Using classpath: ./server.jar:./servlet.jar [root@soho jsdk2.1]# java.lang.ClassNotFoundException: java/rmi/server/UnicastRe moteObject |
JDK1.1.7+JSDK2.0のServletテスト for NT
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Hello extends HttpServlet {
public void doGet(
HttpServletRequest req,
HttpServletResponse res
) throws ServletException, IOException
{
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
out.println("Hello, World!");
out.close();
}
public String getServletInfo() {
return "Hello World servlet";
}
}
|
servletrunner starting with settings: port = 8080 backlog = 50 max handlers = 100 timeout = 5000 servlet dir = ./examples document dir = ./examples servlet propfile = ./examples/servlet.properties Hello: init |
JDK1.2.2+JSDK2.0でのテスト for Linux
root@soho lib]# export CLASSPATH=/tmp/JSDK2.0/lib/jsdk.jar:$classpath [root@soho lib]# cd .. [root@soho JSDK2.0]# cd .. [root@soho /tmp]# cd jdk1.2.2/bin [root@soho bin]# javac Hello.java |
Apache1.3+JServ1.1のServletテスト for NT
import java.io.*;
import java.util.*;
import java.text.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Now extends HttpServlet {
public void doGet(
HttpServletRequest req,
HttpServletResponse res
) throws ServletException, IOException
{
res.setContentType("text/html");
Date d = new Date();
String s = DateFormat.getDateTimeInstance().format(d);
ServletOutputStream out = res.getOutputStream();
out.print("
|
Apache1.3+JServ1.1(JavaWebServer)のServletテスト for NTpass = tiger id = scott sql = select * from emp sid = ora8 port = 1521 hadr = 172.21.20.13
| EMPNO | ENAME | JOB | MGR | HIREDATE | SAL | COMM | DEPTNO |
| 7369 | SMITH | CLERK | 7902 | 1980-12-17 00:00:00.0 | 800 | null | 20 |
| 7499 | ALLEN | SALESMAN | 7698 | 1981-02-20 00:00:00.0 | 1600 | 300 | 30 |
| 7521 | WARD | SALESMAN | 7698 | 1981-02-22 00:00:00.0 | 1250 | 500 | 30 |
| 7566 | JONES | MANAGER | 7839 | 1981-04-02 00:00:00.0 | 2975 | null | 20 |
| 7654 | MARTIN | SALESMAN | 7698 | 1981-09-28 00:00:00.0 | 1250 | 1400 | 30 |
| 7698 | BLAKE | MANAGER | 7839 | 1981-05-01 00:00:00.0 | 2850 | null | 30 |
| 7782 | CLARK | MANAGER | 7839 | 1981-06-09 00:00:00.0 | 2450 | null | 10 |
| 7788 | SCOTT | ANALYST | 7566 | 1987-04-19 00:00:00.0 | 3000 | null | 20 |
| 7839 | KING | PRESIDENT | null | 1981-11-17 00:00:00.0 | 5000 | null | 10 |
| 7844 | TURNER | SALESMAN | 7698 | 1981-09-08 00:00:00.0 | 1500 | 0 | 30 |
| 7876 | ADAMS | CLERK | 7788 | 1987-05-23 00:00:00.0 | 1100 | null | 20 |
| 7900 | JAMES | CLERK | 7698 | 1981-12-03 00:00:00.0 | 950 | null | 30 |
| 7902 | FORD | ANALYST | 7566 | 1981-12-03 00:00:00.0 | 3000 | null | 20 |
| 7934 | MILLER | CLERK | 7782 | 1982-01-23 00:00:00.0 | 1300 | null | 10 |
java関連のリンク集
ritsuo@mxy.mesh.ne.jp