[jboss-user] [Beginner's Corner] - How to prevent direct access to files?
Francisco Palma
do-not-reply at jboss.com
Wed Jul 18 14:30:35 EDT 2012
Francisco Palma [https://community.jboss.org/people/fpalma] created the discussion
"How to prevent direct access to files?"
To view the discussion, visit: https://community.jboss.org/message/748845#748845
--------------------------------------------------------------
Hello to all,
I'm using JSF 2, and I have all my xhtml files under "/src/main/webapp/", so I can access directly to this files writing his name on the navigator.
I want to hide the files in "/src/main/webapp/WEB-INF/views" for example.
If I modify the file faces-config.xml with this:
<from-view-id>/home.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/WEB-INF/views/welcome.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>nowelcome</from-outcome>
<to-view-id>/WEB-INF/views/nowelcome.xhtml</to-view-id>
</navigation-case>
It functions halfway, for example I can navigate from home.xhtml to welcome.xhtml, but I can not make actions from welcome.xhtml to itself (this works with the files under /src/main/webapp/)
How can I do to prevent direct access to the files? I'm not using web.xml.
Thank you very much,
Fran
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/748845#748845]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120718/ce92642b/attachment.html
More information about the jboss-user
mailing list