• 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

Trying to access a file within another web context

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have 2 applications deployed on the same JRun 4 app server. The first application is built to do nothing more than host a rather large xml file from its context as a resource. The second application then references that first application's xml file like this: http://tdmforms-dev/xmlHolder/largeData.xml. I'm attempting to centralize the location of the xml file so that multiple applications could access it. The problem is, I get a http 401, basically an authentication error on the application attempting to stream in the xml file. The first app returns the xml fine, if you retrieve it from your browser. I think the problem lies in 2 applications on the same box, where one application is trying to access a resource of the other application's. I've also had luck in hosting the xml file on my localhost and having my dev app server retrieve it from there, no problem with that. I've been told that the web application might be running as a user that doesn't have privileges to access resources of the same box. Has anybody ever done something like this before?
 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike,

You are doing this correctly. Check the permissions on the file itself. Unless you are going through a portal or something, this should be OK.
 
Mike Ottinger
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think checking the permissions for the file isn't that easy. First, the app is deployed as a war file, I'm not sure how specific file permissions are handled. The JRun 4 box I'm almost sure runs within an NT environment, I'm given a mapping within my network to an NT server to copy files to, the actual JRun exe might be within unix, not sure though. Somebody had mentioned there might be settings in a jrun.policy file that might need to be changed. Also, this xml file will be getting uploaded by the users, is it possible to change permissions programatically? If I'm not in unix, I'm not sure if there is like a unix 777 equivalent to grant all permissions.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic