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 Calling a servlet which contains so many different files 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 "Calling a servlet which contains so many different files" Watch "Calling a servlet which contains so many different files" New topic
Author

Calling a servlet which contains so many different files

Pankaj Patro
Ranch Hand

Joined: Apr 20, 2005
Posts: 35
Hi All,

How can I call a specific file which is in side of a servlet which contains so many different types of files.
My request is like this http://localhost:8080/ab.xyz
where ab.xyz is the file name with extention.

Please suggest me what steps should I take care to sucessed my application.

Advance ThankQ.


Thanks & Regards,
Pankaj Patro
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


which is in side of a servlet which contains so many different types of files

Not sure what you mean by this. Can you explain?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Pankaj Patro
Ranch Hand

Joined: Apr 20, 2005
Posts: 35
Hi Paul,


Let assume that my application have a Controler Servlet, the jar file of this application contains so many files(including ab.xyz ,it may have different extention mean types) One of the file name is ab.xyz.

I wants to call that file like this request http://localhost:8080/ab.xyz

Insted of calling http://localhost:8080/jarfilename/ab.xyz
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
Exactly what do you mean by "call that file"? Do you want the server to return it or execute it?
If you want the "Controller Servlet" to return that file, is your controller servlet configured to execute ALL requests to localhost:8080/
Bill
Yong Bakos
Greenhorn

Joined: Jul 18, 2005
Posts: 29
Aryan, you should really make your life simple and use servlet-mappings in your web.xml. That way you can have

http://yourdomain.com/anypathyoulike

invoke any servlet you want.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a servlet which contains so many different files