Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

java profram:error 405 method not found

Ads

 
 

Share on Google+Share on Google+

Aayshi Mehrotra
java profram:error 405 method not found
2 Answer(s)      6 years and 7 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>");
}

}
Ads
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


Ads









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 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
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
pass method reference in java
pass method reference in java  How to pass method reference in Java
How do I resolve this Java Class not found exception?
How do I resolve this Java Class not found exception?  Hi, Many time new developer faces the Class not found exception. Why it happens and how... if such error comes in your project then the most possible reason would be un
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
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
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
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
Static Method in Java
Static Method in Java  Is Overriding Static methods possible in java? If Yes, How
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
Is main method compulsory in Java?
Is main method compulsory in Java?  Hi, Can we have a executable class in Java without a main method? I am going to write simple Java program and there is main method. Is main method compulsory in Java? Thanks   Hi
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
Destroy method in java - Java Beginners
Destroy method in java  Hi, What is the implementation of destroy method in java.. is it native or java code? Thanks   Hi Friend, This method is not implemented. Thanks
getch() method in java
getch() method in java  does someone know how can i obtain the getch() function in java?   Hi Friend, In java, you can use the method next() of Scanner class. Here is an example: import java.util.*; class Hello
Method overloading in java program
Method overloading in java program  How can we use method overloading in java program?   Method overloading:?In method overloading methods have same name but different type of parameters. Here is an example of method
Finalize method - Java Beginners
method, please can you suggest me a way out.   Hi method, finalize : Every class inherits the finalize() method from java.lang.Object the method... to the object exist the Object finalize method performs no actions but it may
Method decleration in java
Method decleration in java  What is the catch or declare rule for method declarations
method overloading - Java Beginners
method overloading   Write a program to demonstrate the method... }  Hi Friend, In Java, the methods having the same name within... is referred to as Method Overloading. In the given example, we have defined
boolean method - Java Beginners
don't know how to throw in the boolean method in my main class. Notebook...; } Below is main class method: String itemNo = JOptionPane.showInputDialog... { JOptionPane.showMessageDialog(null," FAILED! Item is not added. Identical notebook found
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
Static method in java - Java Beginners
Static method in java  What are static method in Java  Hi Friend, Please visit the following link: http://www.roseindia.net/java/beginners/howtoaccessstaticmethod.shtml Hope that it will be helpful for you
identifier not found
identifier not found  Getting compilation error " identifier not found " please explain ?   identifier means variable name,,,,make sure it same as declaration
Java Method Overloading - Java Beginners
Java Method Overloading  can method be overloaded in subclass or not?  Hi Friend, Yes A subclass can overload the methods.For Example...: http://www.roseindia.net/java/master-java/method_overloading.shtml Thanks