File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

403 Forbidden Error - Will only serve files, not servlets?

 
Pranit Sonawane
Ranch Hand
Posts: 171
Java MySQL Database Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my HTML code



And Here is My Servlet Code



Giving me 403 Forbidden error Please help...!!!
Many Thanks!!!
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the other html examples in the tomcat servlets examples directory. Their paths to their servlets are a bit different from yours. What happens if you emulate those paths? (i.e. change the action attribute of your form)
 
Pranit Sonawane
Ranch Hand
Posts: 171
Java MySQL Database Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim McGuire wrote:Look at the other html examples in the tomcat servlets examples directory. Their paths to their servlets are a bit different from yours. What happens if you emulate those paths? (i.e. change the action attribute of your form)


I understand that sir but unfortunately am using the servlet runner as a server for my servlet programs..!!
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pranit Sonawane wrote:
Tim McGuire wrote:Look at the other html examples in the tomcat servlets examples directory. Their paths to their servlets are a bit different from yours. What happens if you emulate those paths? (i.e. change the action attribute of your form)


I understand that sir but unfortunately am using the servlet runner as a server for my servlet programs..!!


The same idea still applies. I've never used ServletRunner, but I'm going to guess that it won't like your paths either. 403 errors can be caused by many things, one of which is that the filesystem prevents the server from accessing a directory, in this case maybe the
examples directory.

I will guess that your URL:



should instead be something like
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pranit Sonawane wrote:
I understand that sir but unfortunately am using the servlet runner as a server for my servlet programs..!!


So, I looked up ServletRunner. That is some ancient stuff. Why are you using that?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic