1 person found this helpful
I suspect this problem is caused because anonymous read access is not allowed for the node at /content/myapps/en. As a result, when openStream() is called on the URL, it gets a 404 response which manifests itself as a FileNotFoundException. You could provde this out by executing:
curl -v http://localhost:4502/content/myapps/en/test.xhtml.html
from a shell.
Configuring java.net.URL to use authentication (especially preemtive authentication) is kind of a pain, so I'd recommend using the HttpClient from Apache. You can read about how to configure preemtive authentication here: http://hc.apache.org/httpclient-3.x/authentication.html#Preemptive_Authentication
I do not understand your reply. Why I have to use authentication to read some page(rendition) from servlet? When I put the link to web browser I can see this rendition without any authentication.
Could you explain me why?
Did you run the curl command? That would be more authoratitive than me guessing about your configuration.
As for why you can see this content in your browser perhaps you are already authenticated.
In general, port 4502 is used for an author server. And by default, an author server will require authentication to access any content, returning a 404 otherwise.
Try the curl command, it'll clarify exactly what is going on.