Are you trying to access this servlet through the GET method? It looks like
it is complaining because you don't have a doGet method...
-----Original Message-----
From: Aaron Prohaska [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 05, 2000 1:03 PM
To: [EMAIL PROTECTED]
Subject: HTTP 405 - Resource not allowed
I have just created a servlet that is supposed to write a file to disk, but
I am now getting this Resource not allowed error. Does anyone know what
might be wrong? Below is the code in my servlet.
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class XmlPdf extends HttpServlet {
public void init(ServletConfig conf) throws ServletException {
super.init(conf);
}
public void doPost (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
String fileName = "something_random.xml";
File file = new File(fileName);
System.out.println("Creating "+fileName);
FileOutputStream fout = new FileOutputStream(file);
PrintWriter out = new PrintWriter(fout);
out.println("Sometimes you have to do things to save your neck");
out.println();
out.println("This is one of those times");
out.println();
out.close();
}
}
Thanks,
Aaron
<<:::..:::...::: Aaron Prohaska :::..:::...:::>>
VerdeSoft Internet Services
mailto:[EMAIL PROTECTED] http://www.verdesoft.net/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets