• 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

Servlet works on WebSphere but not on Tomcat

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just worked through my first servlet, and it was looking good on my local development machine (WebSphere server). So then I was saddened to see that it didn't work on Tomcat 5.5.

I am opening a Word document and it now works fine in WebSphere (local machine), with this URL:
http://localhost:9080/edw/getDoc?filename=R:/FTP/Highmark/data/test/ods_cdr_tab_cnt_104_2011_04_26_at_17_02.doc

but when moving to Tomcat (to another machine that the organization can use), this doesn't work:
http://xpc-120268/edwdev/getDoc?filename=R:/FTP/Highmark/data/test/ods_cdr_tab_cnt_104_2011_04_26_at_17_02.doc

both environments are pointing to the same database, so it seems like it's a Tomcat thing.

I am sure the file is there as it opens from WebSphere (and from Windows explorer)

Below is my servlet and web.xml.

this is the error message on local development when the file name is bad:
Error 404: The file R:/FTP/Highmark/data/test/ods_cdr_tab_cnt_104_2011_04_26_XXX_17_02.doc could not be found.

it shows up just as written above on a white screen inside a "thick-box" (I forced it to be bad with "XXX")

on the Tomcat server, I get this more detailed message, also inside the thick-box
HTTP Status 404 - The file R:/FTP/Highmark/data/test/ods_cdr_tab_cnt_104_2011_04_26_at_17_02.doc could not be found.

type Status report

message The file R:/FTP/Highmark/data/test/ods_cdr_tab_cnt_104_2011_04_26_at_17_02.doc could not be found.

description The requested resource (The file R:/FTP/Highmark/data/test/ods_cdr_tab_cnt_104_2011_04_26_at_17_02.doc could not be found.) is not available.
Apache Tomcat/5.5.31


servlet:



/********* Web xml entry **********/


/********* JSP **************/
 
William Peck
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
got it, I had to allow tomcat to run using a user that had access to network drives, then my link needed to be full UNC path, not a mapped drive.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's right. Just for reference, you would have had to do exactly the same thing for a Websphere instance running as a service.
 
William Peck
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, thank you.
 
No more fooling around. Read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic