Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet java profram:error 405 method not found
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Aayshi Mehrotra
java profram:error 405 method not found
2 Answer(s)      3 years and 11 months ago
Posted in : JSP-Servlet


import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;

public class Configservlet extends HttpServlet
{
ServletConfig con;
ServletContext ctx;

public void Service(HttpServletRequest req,HttpServletResponse res) throws
IOException ,ServletException
{

ctx = getServletContext();
con = getServletConfig();

String driver =ctx.getInitParameter("driver");
String image =con.getInitParameter("image");

res.setContentType("text/html");
PrintWriter out = res.getWriter();
out.println("<html><body background "+image+">");
out.println(driver);
out.println("</body></html>");
}

}

Advertisement
View Answers

January 27, 2011 at 3:57 PM


Hi Friend,

Use doGet() method instead of doService() method.

For more information, visit the following link:

ServletConfig Example

Thanks



January 27, 2011 at 4:15 PM


thanx now it got properly tested



Related Tutorials/Questions & Answers:
java profram:error 405 method not found
java profram:error 405 method not found  import javax.servlet.http.*; import javax.servlet.*; import java.io.*; public class Configservlet..., Use doGet() method instead of doService() method. For more information, visit
HTTP Status 405 - Request method 'GET' not supported. Its urgent
') in onclick method, following error is displaying in new window. "HTTP Status 405 - Request method 'GET' not supported." Anybody reply ASAP, its urgent...HTTP Status 405 - Request method 'GET' not supported. Its urgent  
Advertisements
How to found which class or method contain specific annotation?
How to found which class or method contain specific annotation?  ... categories of testcase. i want to found method or class according to category... will be appreciated I am using core java reflection and annotations. Original Scenario
Java file not found exception
Java file not found exception This section illustrates you the concept of file not found exception. Java provides a powerful concept of Exceptions. An exception is an error that occurs at runtime. It is either generated by the Java
Tag In Project POM To Close My Java Application If JRE 1.6 Is Not Found?
Tag In Project POM To Close My Java Application If JRE 1.6 Is Not Found?  I have an application compiled in Java. I build my code through Maven. I want a tag in my project POM, so that if JRE 1.6 is not found in the system during
java method
java method  can we declare a method in java like this static { System.loadLibrary("nativelib"); } i have seen this in a java learning E book. i don't understand the static { } plz help me. what kind of method
Path was not found
Path was not found  The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
identifier not found
identifier not found  Getting compilation error " identifier not found " please explain ?   identifier means variable name,,,,make sure it same as declaration
File not found
;% this is my code part getting an error "emp_code.doc"(specified file not found
File not found
;lt;% this is my code part getting an error "emp_code.doc"(specified file not found
File not found
(); <% } this is my code part getting an error "emp_code.doc"(specified file not found
File not found
(); <% } this is my code part getting an error "emp_code.doc"(specified file not found
File not found
getting an error "emp_code.doc"(specified file not found)  Hi Friend
File not found
;% } this is my code part getting an error "emp_code.doc"(specified file not found)  Hi Friend, Visit Here Thanks
Steps not found.
Steps not found.  import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; public class Details1 extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse
mycustomer.hbm.xml not found
="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1...;"); Thanks.jsp print("<%@ page language="java" contentType="text/html...(); //Query q=s.createQuery("from mycustomer"); //q.setCacheable(true); //l
mycustomer.hbm.xml not found
language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding...;"); Thanks.jsp print("<%@ page language="java" contentType...(); org.hibernate.Session s=sf.openSession(); Transaction t=s.beginTransaction(); //Query q
pass method reference in java
pass method reference in java  How to pass method reference in Java
java method - Java Beginners
java method  Plz help me on toString() in java  Hi Friend, The Object class provides the method toString() that returns the string..., the toString() method of the object is automatically called. Thanks
class method in java
class method in java  How to write a class method in Java?   You must read Java - Class, Object and Methods in Java
java method - Java Beginners
java method  i wanna explation about a method for example... Mail[] getAllMails(String userName) I WANNA EXPLATION ABOUT ABOVE METHOD CAN U... and Tutorials on Java Mail visit to : http://www.roseindia.net/javamail/ Thanks
Using throw in java method
Using throw in java method  using throw with method implies what
try catch method in java
try catch method in java  try catch method in java - when and how should i use the try and catch method in Java ?   Please visit the following links: http://www.roseindia.net/help/java/t/java-try.shtml http
Java making a method deprecated
Java making a method deprecated  java making a method deprecated In Java how to declare a method depricated? Is it correct to use depricated... or method in Java. Instead of it you can use alternatives that exists. Syntax
class not found exception
class not found exception  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterprint("code sample
Static Method in Java
Static Method in Java  Is Overriding Static methods possible in java? If Yes, How
Generic Method - Java Beginners
Generic Method  I want simple java program for Generic Method with explanation
getch() method in java
getch() method in java  does someone know how can i obtain the getch() function in java
Class and method question, Java?
Class and method question, Java?  Consider a Java class that you..., the method should display an error message and ask the user for a new value... Prompt string** and the following method: getValue displays the prompt and reads
java method - Java Beginners
java method  hi friends, Is there any default return type for methods in java?  There is no default return type in java, as a user you have to specify the return type even void
CLASS NOT FOUND EXCEPTION
CLASS NOT FOUND EXCEPTION   I AM USING INTERNET EXPLORER VERSION 6.00... LOGIN IN SITE AND UPDATE DIGITAL CERTIFICATE THE ERROR SHAWN IS BELOW CLASS NOT FOUND EXCEPTION AND THE BOX IS DISPLAYED AND I CLICK ON DETAILS BUTTON
Advertisements
 

 

 

DMCA.com