get is not supported

2005-08-24 Thread Christian Stalp
Hello out there,
I working on a new servlet and it is very simple so far. But I cannot start 
it!?!
I get this error dumped on my browser:
[quote]
HTTP Status 405 - HTTP method GET is not supported by this URL

type Status report

message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested 
resource (HTTP method GET is not supported by this URL).
Apache Tomcat/5.5.9
[/quote]

The sourcecode is very simple so far...
[code]
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.softwareag.tamino.db.api.accessor.TAccessLocation;


public class Dialog extends HttpServlet {
   
   public void doGet ( HttpServletRequest req, HttpServletRequest res ) throws 
ServletException, IOException
   {
  res.setContentType ( text/html );
  PrintWriter out = res.getWriter();
  
  String name= req.getParameter( name );
  String vorname = req.getParameter( vorname );
  
  out.println( HTML);
  out.println( HEADTITLEAntwort/TITLE/HEAD );
  out.println( BODY);
  out.println( Name  + vorname +   + name );
  out.println( /BODY/HTML);
   }

}
[/code]

and the service-descriptor:
[code]
?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
  display-nameEingabe Ihrer Daten/display-name
  servlet
servlet-namehello/servlet-name
servlet-classDialog/servlet-class
  /servlet
  servlet-mapping
servlet-namehello/servlet-name
url-pattern/hello/url-pattern
  /servlet-mapping
/web-app
[/code]

Its really not complex so far, but I cannot find the problem.
Can anybody help me?

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: get is not supported

2005-08-24 Thread Raghupathy,Gurumoorthy
Put it in a package and it will run ... .

-Original Message-
From: Christian Stalp [mailto:[EMAIL PROTECTED] 
Sent: 24 August 2005 13:18
To: tomcat-user@jakarta.apache.org
Subject: get is not supported


Hello out there,
I working on a new servlet and it is very simple so far. But I cannot start 
it!?!
I get this error dumped on my browser:
[quote]
HTTP Status 405 - HTTP method GET is not supported by this URL

type Status report

message HTTP method GET is not supported by this URL

description The specified HTTP method is not allowed for the requested 
resource (HTTP method GET is not supported by this URL).
Apache Tomcat/5.5.9
[/quote]

The sourcecode is very simple so far...
[code]
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import com.softwareag.tamino.db.api.accessor.TAccessLocation;


public class Dialog extends HttpServlet {
   
   public void doGet ( HttpServletRequest req, HttpServletRequest res )
throws 
ServletException, IOException
   {
  res.setContentType ( text/html );
  PrintWriter out = res.getWriter();
  
  String name= req.getParameter( name );
  String vorname = req.getParameter( vorname );
  
  out.println( HTML);
  out.println( HEADTITLEAntwort/TITLE/HEAD );
  out.println( BODY);
  out.println( Name  + vorname +   + name );
  out.println( /BODY/HTML);
   }

}
[/code]

and the service-descriptor:
[code]
?xml version=1.0 encoding=UTF-8?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN
  http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
  display-nameEingabe Ihrer Daten/display-name
  servlet
servlet-namehello/servlet-name
servlet-classDialog/servlet-class
  /servlet
  servlet-mapping
servlet-namehello/servlet-name
url-pattern/hello/url-pattern
  /servlet-mapping
/web-app
[/code]

Its really not complex so far, but I cannot find the problem.
Can anybody help me?

Gruss Christian

-- 
Christian Stalp
Institut für Medizinische Biometrie, Epidemiologie und Informatik
Johannes-Gutenberg-Universität Mainz
Tel.: 06131 / 17-3107
E-Mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: get is not supported

2005-08-24 Thread Steve Ochani
Hi,
I'm not sure if this is the answer but
You have both parameters for doGet method as HttpServletRequest, the 2nd 
parameter
is supposed to be of type HttpServletResponse

-Steve O.


On 24 Aug 2005 at 14:17, Christian Stalp wrote:

 Hello out there,
 I working on a new servlet and it is very simple so far. But I cannot
 start it!?! I get this error dumped on my browser: [quote] HTTP Status
 405 - HTTP method GET is not supported by this URL

 type Status report

 message HTTP method GET is not supported by this URL

 description The specified HTTP method is not allowed for the requested
 resource (HTTP method GET is not supported by this URL). Apache
 Tomcat/5.5.9 [/quote]

 The sourcecode is very simple so far...
 [code]
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 import com.softwareag.tamino.db.api.accessor.TAccessLocation;


 public class Dialog extends HttpServlet {

public void doGet ( HttpServletRequest req, HttpServletRequest res
) throws
 ServletException, IOException
{
   res.setContentType ( text/html );
   PrintWriter out = res.getWriter();

   String name= req.getParameter( name );
   String vorname = req.getParameter( vorname );

   out.println( HTML);
   out.println( HEADTITLEAntwort/TITLE/HEAD );
   out.println( BODY);
   out.println( Name  + vorname +   + name );
   out.println( /BODY/HTML);
}

 }
 [/code]

 and the service-descriptor:
 [code]
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web
 Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app
   display-nameEingabe Ihrer Daten/display-name
   servlet
 servlet-namehello/servlet-name
 servlet-classDialog/servlet-class
   /servlet
   servlet-mapping
 servlet-namehello/servlet-name
 url-pattern/hello/url-pattern
   /servlet-mapping
 /web-app
 [/code]

 Its really not complex so far, but I cannot find the problem.
 Can anybody help me?

 Gruss Christian

 --
 Christian Stalp
 Institut für Medizinische Biometrie, Epidemiologie und Informatik
 Johannes-Gutenberg-Universität Mainz Tel.: 06131 / 17-3107 E-Mail:
 [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED] For
 additional commands, e-mail: [EMAIL PROTECTED]


«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
There's no obfuscated Perl contest because it's pointless.
 - Jeff Polk

Steve O.
http://www.steveo.us

New pics: B17G and B24
http://www.steveo.us/B17-B24

B17G WWII Bomber Yankee Lady Flight
http://www.steveo.us/b17ride

SUNY NCC MATH/COMPUTER Dept.
http://www.matcmp.ncc.edu