Error: HTTP method GET is not supported by this URL

Hey,
I am attempting to overload the doGet method with a Wrapper class I created for HttpServletReponse that extends it of course and I receive this error: "HTTP method GET is not supported by this URL". I figure you can't change the method as I have but I am curious if there is anyway I can go about to accomplish what I am trying to do. Basically I just need to extend the HttpServletResponse so that it contains a few more variables and such.
public class test extends HttpServlet {
    public void doGet(HttpServletRequest request,  XmlServletResponseWrapper response) throws ServletException, IOException{
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<head>");
        out.println("</head>");
        out.println("<body>test</body>");
        out.println("</html>");
   

public void doGet(HttpServletRequest request, XmlServletResponseWrapper response)
is not the same method as
public void doGet(HttpServletRequest request, HttpServletResponse response)
The servlet container is going to call the later method and since you did not overwrite it to provide an implementation it sees the GET request as not being supported.
what you are looking to do is something like this:
public void doGet(HttpServletRequest request,  HttpServletResponse response) throws ServletException, IOException{
        XmlServletResponseWrapper myResponse = (XmlServletResponseWrapper ) response;
        myResponse .setContentType("text/html");
        PrintWriter out = myResponse .getWriter();
        out.println("<html>");
        out.println("<head>");
        out.println("</head>");
        out.println("<body>test</body>");
        out.println("</html>");
   

Similar Messages

  • GRMG RFC Configuration "HTTP method GET is not supported by this URL"

    Hi All,
    when i create the RFC Destinaton for SLD  with regards to GRMG Configuration and test the rfc i get the Reason code 400 with error "HTTP method GET is not supported by this URL".
    Even if i call  http://hostname:port/sld/rtc in the browser i get the same error.
    RFC Details:
    Target machine:Host
    Service No: port no
    path prefix: /sld/rtc
    My other RFC destinations for rwb,IR,ID,Adapter Engine works well.
    I would appreciate your suggestions on this
    Aravind

    Hi David,
    I feel sorry to wake this thread up after long time.
    It's the same situation, connection testing for SLD returns 400 "HTTP method GET is not supported by this URL".
    However, CCMS hearbeat seems to work fine with SLD. It returns green.
    I have a question here. Is it OK if we leave it that way without changing GRMG?
    Is there any potential problem, or side effect when the RFC destination returns 400?
    Thank you very much,
    Teyun

  • HTTP method GET is not supported by this URL

    hi.. I am trying one Cookie example.. I m ready with the class file.. and I have deployed it in Tomcat.. but when I am trying to run this the error "HTTP method GET is not supported by this URL" is coming..
    Pls give some clues so that I can run this....

    Implement HttpServlet#doGet() in your servlet.

  • Problem:HTTP Status 405 - HTTP method GET is not supported by this URL

    Hi
    I m beginner.I try to invoke servlet using HTML page with doPost method .I put the html file in Tomcat4.1/webapps/root and put the class file in Tomcat4.1/webapps/root/WEB-INF/classes. So when i put the url in the browser the html page is diplayed but when i sumit it to open the servet it gives this error HTTP Status 405 - HTTP method GET is not supported by this URL.I give the servlet name and class in web.xml also have done its mapping but still it is not working.Whereas the simple servet runs like HelloWord but when i use html page to run servlet it does'nt work.
    Plz help me out.
    Thanx

    Hi,
    I have also encountered this problem while running my web-application under tomcat 3.3.2. My application is resided in webapps directory. And servlet class is placed inside <app-dir>/WEB-INF/Classes/com/rEWebSite/Servlets.
    <web-app>
    <servlet>
    <servlet-name>
    LoginServlet
    </servlet-name>
    <servlet-class>
    com.rEWebSite.Servlets.LoginControlServlet
    </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>
    LoginServlet
    </servlet-name>
    <url-pattern>
    /Login
    </url-pattern>
    </servlet-mapping>
    </web-app>
    This is script in web.xml file. And after clicking on the link it is showing http://localhost:8080/<app-dir>/Login .
    If anyone knows a solution, plz reply me.

  • 405 HTTP method GET is not supported by this URL

    When I use GET method to browse a servlet by using TOMCAT or Resin, receive the following message:
    405 HTTP method POST is not supported by this URL
    Thanks!

    Just post your question once and be patient:
    http://forum.java.sun.com/thread.jspa?threadID=573890
    Go out and get a servlet book. Don't you know how to write servlets?
    %

  • HTTP method POST is not supported by this URL

    Hi everyone,
    I'm having a problem in my application.
    I used the ADF Security Wizard to enable the ADF Security in my application. So, it created the pages login.html, error.html and welcome.jsp.
    The problem is when I try to sign in in my applicaton. On the page login.html I filled in the fields username and password and click on the button to post the form. But when the form is posted I get the message: "HTTP method POST is not supported by this URL".
    The form is posted to the bean j_security_check.
    Does anybody know why is it happening? What should I do to fix it?
    Thanks a lot
    Daniel
    Edited by: [email protected] on 23/02/2010 05:37

    Normally when you get this error, your username/password is not correct.
    It's not a clean way of errorhandling. I have had the same issue and after a while i noticed the password i entered was not correct.

  • HTTP Status 405 - HTTP method POST is not supported by this URL

    dear all
    can u solve my problem.am getting the *"HTTP Status 405 - HTTP method POST is not supported by this URL"* msg from the browser when i press the search button in my form.plz suggest me the solution for my fault.these are the following html,xml,class files:
    search.html*
    <html>
    <head>
    <title>Search Page</title>
    </head>
    <body>
    <p align="center"><font size="6" color="#0000FF"><b>Search Module</b></font></p>
    <p align="center"> </p>
    <center>
    <form method="POST" action="./emp">
    <table border="1" width="43%">
    <tr>
    <td width="50%">
    <p align="right">Employee Name</td>
    <td width="50%"><input type="text" name="empname" size="36"></td>
    </tr>
    <tr>
    <td width="100%" colspan="2">
    <p align="center"><input type="submit" value="Search" name="B1"></td>
    </tr>
    </table>
    </form>
    </center>
    </body>
    </html>
    web.xml*
    <web-app>
    <servlet>
    <servlet-name>jdbc</servlet-name>
    <servlet-class>searchModule</servlet-class>
    <init-param>
    <param-name>driver</param-name>
    <param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value>
    </init-param>
    <init-param>
    <param-name>url</param-name>
    <param-value>jdbc:odbc:first</param-value>
    </init-param>
    <init-param>
    <param-name>user</param-name>
    <param-value>scott</param-value>
    </init-param>
    <init-param>
    <param-name>pass</param-name>
    <param-value>tiger</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>jdbc</servlet-name>
    <url-pattern>/emp</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>search.html</welcome-file>
    </welcome-file-list>
    </web-app>
    SearchModule.java*
    import java.util.*;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class searchModule extends HttpServlet
    Connection con;
    public void init() throws ServletException
    String d=getInitParameter("driver");
    String u=getInitParameter("url");
    String us=getInitParameter("user");
    String pwd=getInitParameter("pass");
    try
    Class.forName(d);
    con=DriverManager.getConnection(u,us,pwd);
    catch(ClassNotFoundException e)
    System.out.println(e);
    catch(SQLException e)
    System.out.println("Unable to establish the connection");
    }//init
    public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    String empname=req.getParameter("empname");
    res.setContentType("text/html");
    PrintWriter pw=res.getWriter();
    try
    pw.println("<html><body><center>");
    Statement st=con.createStatement();
    String sql="select * from employee where empname="+empname;
    ResultSet rs=st.executeQuery(sql);
    if(rs.next())
    pw.println("<h2>Employee Details</h2>");
    pw.println("<table border=1>");
    pw.println("<tr><th>Employee No.</th>");
    pw.println("<th>Employee Name</th>");
    pw.println("<th>Designation</th>");
    pw.println("<th>Department</th>");
    pw.println("<th>Salary</th>");
    pw.println("</tr><tr>");
    pw.println("<td>"+rs.getInt(1)+"</td>");
    pw.println("<td>"+empname+"</td>");
    pw.println("<td>"+rs.getString(3)+"</td>");
    pw.println("<td>"+rs.getString(4)+"</td>");
    pw.println("<td>"+rs.getInt(5)+"</td>");
    pw.println("</tr></table>");
    else
    pw.println("<h2>Employee Record Not Found</h2>");
    pw.println("</center></body></html>");
    pw.close();
    rs.close();
    st.close();
    catch(SQLException e)
    System.out.println(e);
    }//doPost
    public void destroy()
    if(con!=null)
    try
    con.close();
    catch(Exception e)
    System.out.println("Connection Closed");
    }//destroy
    }//searchModule
    in control panel i selected System DNS and created the name as first and driver as Microsoft ODBC for Oracle
    plz suggest me the solution where i committed mistake.

    <form method="*POST*" action="./emp">
    public void doGet (HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException
    HTTP method POST is not supported by this URL

  • 405 HTTP method POST is not supported by this URL

    When I use GET method to browse a servlet by using TOMCAT or Resin, receive the following message:
    405 HTTP method POST is not supported by this URL
    Thanks!

    Just post your question once and be patient:
    http://forum.java.sun.com/thread.jspa?threadID=573890
    %

  • GET is not supported by this URL

    I have created a simple droplet and I tried to see output in my jsp page.
    But I am getting bellow message with blank page - "GET is not supported by this URL"
    I am new to ATG :)
    Looking for any help.....
    Thnx in Adv.!!!!
    Rajib

    I think u r placed super.service() method in ur code.. Pls remove that one.. it wil work fine.

  • POST method not supported by this URL

    Hello gentlemen,
              We are trying to migrate our servlets from another Web Application
              Server (IBM WebSphere 2.02) to Weblogic 4.5.1.
              A servlet that did work fine with WebSphere, now produces the "POST
              method not supported by this URL" error under Weblogic.
              Of course, we implement doPost method in our servlet.
              Any idea to fix this problem? thank you.
              emanuele
              

              Emanuele--
              In the ICSessionServlet file you are posting the data to ICIdentification servlet which is
              again a servlet
              So you need to register this servlet in weblogic.properties file before you post something to
              this servlet.
              Also the way you are calling the servlet is totally wrong from weblogic standpoint
              You don't need to specify the package name in weblogic(this is OK in java web server) for e.g.
              icdoor.myservlet.session.ICIdentificationServlet.
              Because we are registering the servlet with full package name in properties file so we don't
              need to mention the package
              name here..
              Call the servlet in the following way or whichever way is suitable for you.
              Here is how i'm calling ICIdentificationServlet
              http://localhost:7001/ICIdentificationServlet
              Here is the output i'm getting after entering user name/password
              "Welcome Startfighter"
              Requested URL
              http://localhost:7001/Stupida
              Hope this helps
              Kumar
              emanuele wrote:
              > Here's the source code for a servlet producing "HTTP method POST is not
              > supported by this URL".
              >
              > I have registered servlet Stupida in the file weblogic.properties. This
              > servlet subclass the ICSessionServlet.
              > The service() method of ICSessionServlet ask for a userid and a password
              > (user and password are not verified, anyway) and then calls the doPost()
              > method of ICIdentification servlet. This one displays a sort of "Welcome
              > page" and then the calling URL. (if it works fine...).
              >
              > On WebSphere, it works. On Weblogic, it doesn't.
              >
              > Any idea?
              >
              > emanuele
              >
              > "Kumaraswamy A." wrote:
              >
              > > can you post the stacktrace , also if possible send your java file
              > > too!..
              >
              >
              

  • HTTP Method Post not supported by this URL

    We are running WL6.0sp1 on Win2000. When we try to open a JSP page which calls
    a servlet we get a "HTTP Method Post not supported by this URL". This same setup
    (WL 6.0sp1 on Win2000) on another machine works absolutely fine running from the
    same client. Is there any setup that needs to be done in Weblogic for this? Any
    pointers on this would be appreciated.
    Rgds

    Normally when you get this error, your username/password is not correct.
    It's not a clean way of errorhandling. I have had the same issue and after a while i noticed the password i entered was not correct.

  • HT1918 Everytime I try to purchase music I get.... Update payment method PayPal is not supported on this device.... Help!!!!

    I can't purchase songs any longer using ITunes. The message I receive is Paypal is not supported by this device. Problem with previous payment update acct info. ... I did update acct info! Help?????

    I had this same problem also.  The problem has to do with your credit card number associated with you iCloud account.  To solve this problem, you need to update your credit card/payment information by doing the following on your iPad / iPhone / iTouch:
         Settings > iCloud > click on your account > Payment Information
    Update this section with your correct credit card information and Save.

  • Raid Utility Error Message "raid utility is not supported on this computer"

    I am not doing anything that I know of, but Raid Utility keeps opening up on its own, and a message pops up multiple times a day telling me "raid utility is not supported on this computer"
    Anyone have any idea how to fix this?

    Network startup is if you want to start your macbook using a network drive.
    Keep your startup settings at your current drive.
    Raid utility doesn't apply to you since you only have one hard drive installed, unless you installed another hard drive in your optical bay.
    Fibre Channel is another type of hard drive connection via network connection.
    You can't access things you don't have installed in your macbook.  Those are there in case you decide to have a network drive start up options, a raid configuration of a fibre channel network drive.

  • I just tried to play a video podcast on iTunes and received and error message saying QuickTime is not supported by this version of iTunes?

    I have the latest version of iTunes installed on my iMac. Everything on the iMac is up to date. I am perplexed by iTunes not supporting QuickTime. Has anyone else experienced this?

    Try relaunching iTunes in 32-bit mode first, as per the instructions in the following document:
    iTunes for Mac: Older media files may require iTunes to reopen in 32-bit mode

  • I turned on my iMac, mounted Firefox and was told it would no longer work - Download and install Firefox4 (FREE) which I did, but now the error message says it's not supported on this architecture. What to do?

    Today I turned on my iMac (OSX 10.5.8 1.8GHz PowerPC G5, 1.25 GB DDR SDRAM) mounted Firefox and was prompted to Download and install Firefox4 (FREE) which I did.
    I was prompted to replace the previous Firefox with the newly downloaded and now I can't find the old version and the new version says it isn't supported on this architecture. The icon has a zero with a slash across it.
    What do I have to do?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/4.0/system-requirements/
    For an unofficial Firefox 4 compatible version (TenFourFox) that runs on PowerPC Macs with OS X 10.4.11 or OS X 10.5.8 you can look at:
    * http://www.floodgap.com/software/tenfourfox/
    Firefox 3.6.x (Mac OS X 10.4 and later) can be found here:
    * http://www.mozilla.com/en-US/firefox/all-older.html

Maybe you are looking for