Hi everyone!
Could someone help me please?
I am using computer like below.
1. Linux radhat6.0 +apache+ jdk1.2pre + jsdk2.0
2. winNT IIS + jdk 1.2.1 + jsdk2.0
3. win98 jdk 1.2.1 + jswdk1.0ea
I found problem on linux.
The Problem is a doGet() / doPost().
a. <Form method=get act=servletname >
b. <Form method=post act=servletname >
in case a. works everywhere(NT/98/linux)
but case b. dosen't working on linux
who can explain this????
public class Log extends HttpServlet
{
PrintWriter out ;
String url="http://10.20.7.16:8080/servlet/Log"; // server address
String act, name, password;
public void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException,IOException
{
res.setContentType("text/html; charset=euc-kr");
out = res.getWriter();
act = req.getParameter("act");
name = req.getParameter("name"); // ID
password = req.getParameter("password"); file://PASSWORD
if (act == null || act.equals(""))
{
Body(out); // <--- working
System.out.println("body"); // printed
} else {
sub(out); // <-- dosen't working
System.out.println("sub"); // printed
}
out.close();
}
public void sub(PrintWriter out)
{
out.println("<HTML><HEAD>");
out.println("<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=euc-kr\">");
out.println("</HEAD><BODY >");
out.println("<CENTER><BR><BR>");
out.println("<h1> Working"+act+name+password);
out.println("</CENTER>");
out.println("</BODY>");
out.println("</HTML>");
}
public void Body(PrintWriter out)
{
out.println("<HTML><HEAD>");
out.println("<meta http-equiv=\"Content-Type\" content=\"text/html;
charset=euc-kr\">");
out.println("</HEAD>");
out.println("<BODY >");
out.println("<CENTER><BR><BR>");
out.println("<FORM METHOD=\"post\" action="+url+">");
out.println(" <INPUT TYPE=TEXT NAME=\"name\" SIZE=16 MAXLENGTH=16 TABINDEX=1>");
out.println(" <INPUT TYPE=password NAME=\"password\" SIZE=16 MAXLENGTH=16
TABINDEX=2>");
out.println("<INPUT TYPE=SUBMIT value='ok'>");
out.println("<INPUT TYPE=reset value='cansel'><td>");
out.println("</FORM>");
out.println("</CENTER>");
out.println("</BODY>");
out.println("</HTML>");
}
}
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html