error while calling a servlet


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: error while calling a servlet

  1. #1
    satish Guest

    error while calling a servlet



    WHEN i AM TRYING TO call a servlet, I am getting the following error, what
    could be the problem, please let me know.

    satish


    Error 405
    An error has occured while processing request:http://pc27/servlet/Loginservlet
    Message:HTTP method GET is not supported by this URL
    Target Servlet: Loginservlet
    StackTrace:
    --------------------------------------------------------------------------------
    Root Error-1: HTTP method GET is not supported by this URL
    com.ibm.servlet.engine.webapp.WebAppErrorReport: HTTP method GET is not supported
    by this URL at com.ibm.servlet.engine.webapp.WebAppDispatcherResponse.sendError(WebAppDispatcherContext.j ava:240)
    at javax.servlet.http.HttpServlet.doGet(HttpServlet.java:176) at javax.servlet.http.HttpServlet.service(HttpServlet.java:534)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:639) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:557)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java: 160)
    at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:1 05)
    at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:349)
    at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:705)
    at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:631)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebApp.java:112 9)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.java:1001)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.java:960)
    at com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:172)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:639) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:557)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java: 160)
    at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
    at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:1 05)
    at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:349)
    at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:705)
    at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:631)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebApp.java:112 9)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.java:1001)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.java:960)
    at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java:681)
    at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java: 67)
    at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationCon text.java:106)
    at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.j ava:144)
    at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:300)
    at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerI mp.java:230)
    at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.jav a:104)
    at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.jav a:202)
    at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyS ervice(SQWrapperEventSource.java:347)
    at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQW rapperEventSource.java:216)
    at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnab

  2. #2
    sudhakar Guest

    Re: error while calling a servlet


    hi satish,

    I like the way u learn things. I think u are extending

    HttpServlet and in ur servlet program u are missing the doGet

    method or u are using doPost in servlet and in html file from

    where u are calling u are using METHOD="GET" in the Action part.

    check it out.

    all the best...


    sudahkar





    "satish" <satish_141@yahoo.com> wrote:
    >
    >
    >WHEN i AM TRYING TO call a servlet, I am getting the following error, what
    >could be the problem, please let me know.
    >
    >satish
    >
    >
    >Error 405
    >An error has occured while processing request:http://pc27/servlet/Loginservlet
    >Message:HTTP method GET is not supported by this URL
    >Target Servlet: Loginservlet
    >StackTrace:
    >--------------------------------------------------------------------------------
    >Root Error-1: HTTP method GET is not supported by this URL
    >com.ibm.servlet.engine.webapp.WebAppErrorReport: HTTP method GET is not

    supported
    >by this URL at com.ibm.servlet.engine.webapp.WebAppDispatcherResponse.sendError(WebAppDispatcherContext.j ava:240)
    >at javax.servlet.http.HttpServlet.doGet(HttpServlet.java:176) at javax.servlet.http.HttpServlet.service(HttpServlet.java:534)
    >at javax.servlet.http.HttpServlet.service(HttpServlet.java:639) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:557)
    >at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java: 160)
    >at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
    >at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:1 05)
    >at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:349)
    >at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:705)
    >at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:631)
    >at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebApp.java:112 9)
    >at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.java:1001)
    >at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.java:960)
    >at com.ibm.servlet.engine.webapp.InvokerServlet.service(InvokerServlet.java:172)
    >at javax.servlet.http.HttpServlet.service(HttpServlet.java:639) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:557)
    >at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java: 160)
    >at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:287)
    >at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:1 05)
    >at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:349)
    >at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:705)
    >at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:631)
    >at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebApp.java:112 9)
    >at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebApp.java:1001)
    >at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebApp.java:960)
    >at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebGroup.java:681)
    >at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java: 67)
    >at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationCon text.java:106)
    >at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.j ava:144)
    >at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:300)
    >at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQEventListenerI mp.java:230)
    >at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventListenerImp.jav a:104)
    >at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQEventSource.jav a:202)
    >at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyS ervice(SQWrapperEventSource.java:347)
    >at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(SQW rapperEventSource.java:216)
    >at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnab



  3. #3
    Vikram Rajan Guest

    Re: error while calling a servlet


    Ensure that you have implemented the doGet() method. If the method on the
    HTML file is "post" then implement the doPost method().

    Vikram

  4. #4
    Fernando Ribeiro Guest

    Re: error while calling a servlet


    There are other kind of requests defined in the HTTP protocol these simple
    HTTP servlets can handle. Refer to your HTTP or servlet documentation for
    more details on this stuff.

    (where is the question you have just answered?. I have commented about it..
    that is weird hehehe)

    Fernando Ribeiro
    fribeiro

    "Vikram Rajan" <vikramr@planetasia.com> wrote:
    >
    >Ensure that you have implemented the doGet() method. If the method on the
    >HTML file is "post" then implement the doPost method().
    >
    >Vikram



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center