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



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

Have Programming Question? Ask it here!
 
 
 


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

}

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
(); <% } 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
getting an error "emp_code.doc"(specified file not found)  Hi Friend
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
File not found
;% } this is my code part getting an error "emp_code.doc"(specified file not found)  Hi Friend, Visit Here Thanks
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
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
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
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
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
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
getch() method in java
getch() method in java  does someone know how can i obtain the getch() function in java
Generic Method - Java Beginners
Generic Method  I want simple java program for Generic Method with explanation
Static Method in Java
Static Method in Java  Is Overriding Static methods possible in java? If Yes, How
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 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
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
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
Error:No Class Found Exception:org.postgresql.driver
Error:No Class Found Exception:org.postgresql.driver  Error:No Class Found Exception:org.postgresql.driver while connecting JDBC With PostgreSQL 8.4 I m running My Program with java 6.0
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
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
javax.servlet not found error
javax.servlet not found error  why iam getting javax.servlet error while running my servlet program...after setting the classpath also i am finding that problem
javascript image not found
javascript image not found  javascript if image not found   <a href='$image'> <img alt='No Image' src='$image' onError="this.parentNode.onclick=function() {return(false);}"> </a>
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
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
Java Method with arrays
Java Method with arrays  My assignment is to write a java method..., write a program to test your method. my main method code is : public class...]; currentSmallestIndex = i; } } return currentSmallestIndex; } //main method
method overriding in java
method overriding in java  program to compute area of square,rectangle,triangle,circle and volume of sphere,cylinder and perimeter of a cube using method overriding
method overriding in java
method overriding in java  program to compute area of square,rectangle,triangle,circle and volume of sphere,cylinder and perimeter of a cube using method overriding
no def found - JSP-Servlet
no def found  i have used the code of file upload from rose india but when i run no def found for fileupload exception although i have put jar file... error
class not found error - JDBC
class not found error  thanks for your response. please clarify the following doubts. i am having the specified mysql connector jar file. where that jar file has to be placed. also does the jdbc driver need to be installed
customize method in java
customize method in java  hi there i want to create one customize method in which any no of parameters can be pass e.g the limit is 13 and if user wants to enter 3 inputs then that much can only be proceed so can i have solution
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
Java static method
Java static method  Can we override static methods
Java synchronized method
Java synchronized method  What are synchronized methods and synchronized statements
 

 

 

DMCA.com