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

Need suggestion regarding an issue related to content type header

 
Ranch Hand
Posts: 63
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi All,

I have web application and I prepare war file for deployment. Classes are put inside {location}/WEB-INF/classes location and static contents like images, javascript files, static jsps, etc. are put at following location {location}/resources/.
When I tried to access static resources from browser (url : http://{domain name}/resource/{resource name}), no filter of web app is called. Even filter which is set for every request is not getting called. Can anybody provide some suggestion on this?
And one more thing, if I want to set content type in response header for static resource then how can I set that?

I need help on this.Please provide your views on this.

Thanks to all in advance for their suggestions.
 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
url for static resource should be like,
http://{domain name}:{port-number}/{application-context}/resources/{path of static file(html/images)}

and these static resources should not be in WEB-INF.

if you you still not able to access any page. Please check the server port number on which application is running. It may possible that server is running on some other port and you are trying to access application using different port.
 
Abhishek Purwar
Ranch Hand
Posts: 63
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
@Ravishanker : My issue is related to content-type of response header and not an accessing issue. I have fixed my issue and it is working fine now.

Thanks for your response.
 
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic