Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot access site from subdirectory

 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have put a site hello.xhtml into a subdirectory called "category" and put a link going to this site:

<hutputLink 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:
<hutputLink value="/hello.xhtml" title="hello">

But I want to have subdirectories. How can I do that?
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cool, that helps!

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic