File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Servlet hosting problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet hosting problem" Watch "Servlet hosting problem" New topic
Author

Servlet hosting problem

Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
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

Joined: Aug 03, 2008
Posts: 9291
    
  17

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Farakh khan
Ranch Hand

Joined: Mar 22, 2008
Posts: 732
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet hosting problem
 
Similar Threads
Class not found exception
wanted to impement file uploading
JSP file Include path fails with tomcat 6.0
Ear Installation error
Probelm in applet/servlet communication