Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Message - HTTP method GET is not supported by this URL...

843840Sep 11 2007 — edited Sep 11 2007
Hi all..,

I'm trying to call a Servlet directly from a link (href) in my home page. But it gives me the following Message : HTTP method GET is not supported by this URL.

My coding is as follows...

HomePage.html
<html>
<head>
<title> Sample app</title>
</head>
<body>
<a href="searchallitems">Show all songs</a>
</body>
</html>
doPost() @ SearchAllItems.java --> The servlet
    public void doPost(HttpServletRequest request, 
                       HttpServletResponse response) throws ServletException, 
                                                            IOException {

        ( More coding here.... )

        RequestDispatcher view = 
            request.getRequestDispatcher("AllItems.jsp");

        view.forward(request, response);

    }
Can someone help me with this please...???
Thanx in advance...
Asela.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2007
Added on Sep 11 2007
5 comments
481 views