W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1998

POST and GET doesn't work.

From: Juraj Kazda <jerry@frkis.utc.sk>
Date: Thu, 12 Nov 1998 05:23:31 -0500 (EST)
Message-Id: <001401be0e26$26d08b20$6798c19e@fr334.utc.sk>
To: <www-jigsaw@w3.org>
Hi,

I have a problem. Jigsaw 2.0beta3 reports everytime "Servlet has thrown exception:java.lang.ClassCastException". Maybe I'm stupid, but I don't understand it...
If I change the doGet(..) to service(..), it works... But doPost(..) and doGet(..) doesn't.

This is my html:

<HTML>

<HEAD>
 <TITLE>My form</TITLE>
</HEAD>

<BODY>
 Type your username:
 <B>Login: </B>
 <FORM ACTION="http://localhost:8001/servlets/LoginServlet" METHOD="get">
  <INPUT TYPE="text" NAME="login">
  <INPUT TYPE="submit" VALUE="Go!">
 </FORM>
</BODY>

</HTML>

And this teh servlet code:

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class LoginServlet extends HttpServlet {

 public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
  ServletOutputStream out = res.getOutputStream();
  res.setContentType("text/plain");
  out.println("Hello Login");
  out.close();
 }
 
}

Can some help me?
--------------------------------------------------------------------------
Juraj Kazda
department of information networks
faculty of management science and informatics
University of Zilina
Velky Diel
010 26 Zilina
tel.: +421 89 672 341
fax : +421 89 655 530
www: http://winkis.utc.sk/jerry
--------------------------------------------------------------------------
Received on Thursday, 12 November 1998 05:43:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:28 GMT