aspose file tools*
The moose likes Servlets and the fly likes method POST not allowed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "method POST not allowed" Watch "method POST not allowed" New topic
Author

method POST not allowed

NIKO.DEM.STLOUIS
Greenhorn

Joined: Jul 22, 2001
Posts: 8
I am having trouble running a servlet(.class) I wrote. If I put itin the path specified by alias in the tomcat-apache.conf file or in the active directory I get the error
METHOD NOT ALLOWED
the requested method POST not allowed for the URL /examples/Rot13.class
I have restarted both apache and tomcat several times.
Do I have to include a reference to the class file in the Web.xml file? If so where can I get instruction on how to do so?
anyhelp would be greatly appreciated,
Nik
Beksy Kurian
Ranch Hand

Joined: Jul 11, 2001
Posts: 254
Aren't you putting the classes in the
WEB-IF/classes directory?
URL for tomcat docs http://jakarta.apache.org/tomcat/tomcat-3.2-doc/index.html
Regards
Beksy
Sam Dalton
Author
Ranch Hand

Joined: Jul 26, 2001
Posts: 170
Silly question I know but does you servlet actually have a doPost (or service) method? This is a common problem of posting to servlets that only implement the doGet method...
S

<a href="http://www.samjdalton.com" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of [http://www.amazon.com/exec/obidos/tg/detail/-/1590592255/qid=1068633302//ref=sr_8_xs_ap_i0_xgl14/104-4904002-9274339?v=glance&s=books&n=507846]Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861007701/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/186100561X/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>
 
wood burning stoves
 
subject: method POST not allowed