Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a requested resource not available Error can it be caused by security

Status
Not open for further replies.

AnthonyGeorge

Technical User
Jun 3, 2004
46
0
0
GB
I have an application, which is run on a dev and a production live box.
One of the functionality is to upload a document into a directory under webapps, and then allow someone to look at the doc through there browser

This works perfectly on the dev box and the UAT box ,but on the production box the document is uploaded ok , but when the browser is pointed at the link I get the follwoing error:

The requested resource (/know_your_customer_docs/1578/1578_1090850952794_TestDoc.doc) is not available.

The document does exist and is in the correct directory. the code works ok on both the dev and uat box I am thinking of ways of debbugging this. As the code works ok, all the paths are correct. Can a security permission cause the above error.

I am using version jakarta-tomcat-4.1.12. I have permission as root to write and read from that directory. I have no problem writing the file to the directory. The problem is reading it through the browser. The permissions are the same rw on both the dev, uat and production box.

Is there any code similar to checkread from the Security Manager that can take a link and test that it exists and that you have permission to view that page. Not been able to look at the log files on the production box but will do as soon as I get the chance.


Thanks for any help Tony
 
I doubt its anything to do with security managers/policies in tomcat, because if you can write, you can definitly read. Also you would get a different error than you are seeing.

Its probably something daft like a hardcoded IP address, or a host file pointing to the wrong server or something silly like that.

--------------------------------------------------
Free Database Connection Pooling Software
 
Re: a host file pointing to the wrong server or something silly like that.

That may be the problem, I have put some debug code in which when I get the chance to run it may show up the problem>

String urlName = (String)session.getAttribute("urlName");
System.out.println("urlName "+urlName);
InetAddress addr = null;

try
{
addr = InetAddress.getLocalHost();
System.out.println("upload Host Name: "+addr.getHostName());
System.out.println("upload Host Address: "+addr.getHostAddress());
}
catch(UnknownHostException e)
{
}
 
No, I mean the hosts file of the client - ie /etc/hosts or C:\system32\drivers\etc or wherever it is in Win32.

Your UAT env should be a direct copy of live, so I expect it is either a dumb programming mistake, or a client setup error.

--------------------------------------------------
Free Database Connection Pooling Software
 
Hi Sedji,

The unix guys tried to ping the server but could not so it looks as of it is a server name IP address which could not be resolved problem.

Thanks.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top