• 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

Calling a servlet which contains so many different files

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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?
 
Pankaj Patro
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic