This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet hosting problem

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Everything is running fine in my computer tomcat but when I uploaded on my dedicated server then its throwing File not found error

I installed modJK to read html files from apache and java files from tomcat on dedicated server may be this is the problem because when I am using the path as www.mywebsite.com/servlet/Filename then it shows the file. without writing /servlet its throwing file not found error

any suggestion please

Best regards
 
Ankit Garg
Sheriff
Posts: 9528
32
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I personally cannot make sense of what you are trying to say. Are you trying to say that if you try to directly access a file using a URL, then you are able to access the file but if you try to access the file from a servlet, then you are getting a FileNotFoundException?? In that case you'll have to show us the code of your servlet where you are trying to access the file...
 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Garg wrote:I personally cannot make sense of what you are trying to say. Are you trying to say that if you try to directly access a file using a URL, then you are able to access the file but if you try to access the file from a servlet, then you are getting a FileNotFoundException?? In that case you'll have to show us the code of your servlet where you are trying to access the file...

Thanks for your reply

actually there is a problem with deployment descriptor. when am running the same web.xml on my computer then all the file paths working very well but when am putting the stuff online to my dedicated server then am getting this error. e.g.
http://127.0.0.1:7070/LoginAdmin.PERL is working fine but as http://www.mysite.com/LoginAdmin.PERL is throwing fnf exception. In my view that's why because online the modJK serves "/" path for apache httpdocs and "/servlet" to tomcat

Best Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic