• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet hosting problem

 
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic