You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christian Stalp <st...@imbei.uni-mainz.de> on 2005/08/24 14:17:43 UTC

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( "<HEAD><TITLE>Antwort</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-name>Eingabe Ihrer Daten</display-name>
  <servlet>
    <servlet-name>hello</servlet-name>
    <servlet-class>Dialog</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>hello</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: stalp@imbei.uni-mainz.de

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


MAIL FAILURE

Posted by no...@ardiri.com.
*********************************************************************
           THIS EMAIL IS AUTOGENERATED - DO NOT REPLY TO
*********************************************************************

The email you sent was not delivered to the desired recipient because
it was blocked/filtered for a specific reason, which may include:

  - reply to no-reply@ardiri.com
  - mail undeliverable because mailbox is not existant (or removed)
  - unsolicited email

If you  wish to contact Aaron Ardiri (aaron@ardiri.com),  you may use 
the following service to send an instant message direct to his mobile
where you can put  a request for contact and an  attempt will be made 
to return your contact.

  http://www.contactme.biz/

Thankyou.

*********************************************************************
           THIS EMAIL IS AUTOGENERATED - DO NOT REPLY TO
*********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


MAIL FAILURE

Posted by no...@ardiri.com.
*********************************************************************
           THIS EMAIL IS AUTOGENERATED - DO NOT REPLY TO
*********************************************************************

The email you sent was not delivered to the desired recipient because
it was blocked/filtered for a specific reason, which may include:

  - reply to no-reply@ardiri.com
  - mail undeliverable because mailbox is not existant (or removed)
  - unsolicited email

If you  wish to contact Aaron Ardiri (aaron@ardiri.com),  you may use 
the following service to send an instant message direct to his mobile
where you can put  a request for contact and an  attempt will be made 
to return your contact.

  http://www.contactme.biz/

Thankyou.

*********************************************************************
           THIS EMAIL IS AUTOGENERATED - DO NOT REPLY TO
*********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: get is not supported

Posted by Steve Ochani <oc...@ncc.edu>.
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( "<HEAD><TITLE>Antwort</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-name>Eingabe Ihrer Daten</display-name>
>   <servlet>
>     <servlet-name>hello</servlet-name>
>     <servlet-class>Dialog</servlet-class>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>hello</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:
> stalp@imbei.uni-mainz.de
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For
> additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»§«¤»¥«¤»
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