• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Problem with the Contextpath in the url

 
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am facing a problem which i am not able to get the complete solution .In my web application i have a folder(this folder name is not fixed ) and inside that i have a HTML page which has images . i am opening that file using an action ( i am not directly opening this as i cant handle filenotfound exceptions and all ) ......and the problem here is i am not getting the images as the browser is looking in for images directly under my context .

my action for opening the doument looks like this
http://localhost:8080/myapp/openfile.do?path= variblefoldername/filename

and in my action class i am just opening that using new ActionForward(path) ..............so in the url as this is a forward and i tries making it a redirect so that url gets updated as http://localhost:8080/myapp/variablefoldername/filename and this works fine but there is a problem with the Excel file as content type in header gets lost on using a redirect .Hence junk comes for Excel file .................


so can any give me a solution for this
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried configuring the MIME type for *.xls in your web.xml?
 
sreenath reddy
Ranch Hand
Posts: 415
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

thanks its working now with that entry in applications web.xml.............earlier i tried by adding this in tomcat\conf\web.xml and this was not working
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!