| Author |
cannot access site from subdirectory
|
nimo frey
Ranch Hand
Joined: Jun 28, 2008
Posts: 580
|
|
Hello, I have put a site hello.xhtml into a subdirectory called "category" and put a link going to this site: <h utputLink value="category/hello.xhtml" title="hello"> Now, I want to access the page via: But it does not work. The browser cannot find this site (HTTP Status 404) although my WAR has this site into this directory. When I put the site out of the subdirectory, then it works: <h utputLink value="/hello.xhtml" title="hello"> But I want to have subdirectories. How can I do that?
|
 |
Himanshu Gupta
Ranch Hand
Joined: Aug 18, 2008
Posts: 598
|
|
|
Give the full path and it will work. Don't give the relative path. Or if you want to give relative path use / at the start of the URL, It may work as I am not very sure. But complete or absolute URL will work for sure.
|
My Blog SCJP 5 SCWCD 5
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
Looks like another one of those cases where people think just because a URL has slashes in it that it's exactly the same thing as a file path. It's not. Check your web.xml and see how it decodes URLs with ".xhtml" in them.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
nimo frey
Ranch Hand
Joined: Jun 28, 2008
Posts: 580
|
|
cool, that helps! thanks
|
 |
 |
|
|
subject: cannot access site from subdirectory
|
|
|