Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

url not supported  RSS feed

 
Greenhorn
Posts: 10
Chrome Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i get following error message:
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/7.0.22
the servlet code is as follows.


package servlets;

import java.io.IOException;
import java.util.ArrayList;
import java.util.StringTokenizer;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* Servlet implementation class SearchServlet
*/
public class SearchServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

/**
* @see HttpServlet#HttpServlet()
*/
public SearchServlet() {
super();
// TODO Auto-generated constructor stub
}

/**
* @param session
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response, ServletRequest session) throws ServletException, IOException {
// TODO Auto-generated method stub
processRequest(request,response);
}

private void processRequest(HttpServletRequest request,
HttpServletResponse response) {
// TODO Auto-generated method stub

System.out.println("Sairam");

}

/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
processRequest(request,response);
}

}

my calling page is following:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Home page</title>
</head>
<body>

<h1><p align="center"><font size="20" color="#ff0000" face="Garamond">SAI OnLine Books and Softwares Store</font></p></h1>
<form action="/OnlineBookStore_proj/Search" method="get">
<p align="right"><input type="submit" value="search">
<input type="text" name="search"></p>
</form>
<img src="web-app/images/books.jpg" align="left" width="150" height="150" >
<img src="web-app/images/softwares.jpg" align="right" width="150" height="150">
<form action="reg_page.html" method="get">
<p align="center"><input type="submit" value="register" ></p>
</form>
<hr width="80%" color="#ff3000" size="3"></hr>
<div>
<!-- displaying text at left and right in the same line -->
<p style="float:left;color:blue"><font size="25">Books</font></p>
<p style="float:right;color:blue"><font size="25">Softwares</font></p>
</div>

</body>
</html>
help me out,
Thank u.
 
thippe swamy
Greenhorn
Posts: 10
Chrome Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry ranchers, if i have troubled any of you. I have hound my mistake.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!