Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to access a file within another web context

 
Mike Ottinger
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • 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?
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Message for you sir! I think it is a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!