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>

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:


 <TITLE>My form</TITLE>

 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!">


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();
  out.println("Hello Login");

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 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:33 UTC