[jboss-user] [Beginners Corner] - Re: HTTP Status 405 - HTTP method GET is not supported by th

aurir_ do-not-reply at jboss.com
Wed Apr 4 16:56:21 EDT 2007


Keep in mind that when I return PLAIN TEXT:
public void doGet(HttpServletRequest request, 
  | 			HttpServletResponse response)
  | 			throws ServletException, IOException{
  | 		PrintWriter out = response.getWriter();
  | 		out.println("Hellow World");
  | 	}
There is no problem. I get this error only when I return HMTL:
public void doGet(HttpServletRequest request,
  | 			HttpServletResponse response)
  | 			throws ServletException, IOException{
  | 		super.doGet(request, response);
  | 		//Tell the browser that you?re sending it HTML
  | 		response.setContentType("text/html");
  | 		
  | 		PrintWriter out = response.getWriter();
  | 		
  | 		String docType =
  | 			"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 "+
  | 			"Transitional//EN\">\n";
  | 		
  | 			out.println(docType +
  | 			"<HTML>\n<HEAD>\n<TITLE>HELLO</TITLE>\n</BODY>\n</HTML>");
  | 	}

Could that be some server settings??? I'm running JBoss 4.0

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4034785#4034785

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4034785



More information about the jboss-user mailing list