0

I Have a Project Structure like this :-Project Structure

I want only the home.xhtml to be accesible when user hits the url and the healthCheck and error should not be (test is temporary will be deleted).

I tried Placing the two xhtml files in detailed info folder but the css wont work my css linking style -<link rel="stylesheet" href="../css/normalize.css"></link>

and also if we put he css apart the page loads but when i referesh the page eg - localhost:9080/Dashboarddetails/detailedinfo/healthcheck.xhtml

it gives http 403 error as access in denied it only loads the first time.

I have used security constraint but it not working please help

<security-constraint>
    <display-name>Restrict raw XHTML Documents</display-name>
    <web-resource-collection>
        <web-resource-name>XHTML</web-resource-name>
        <url-pattern>/detailedinfo/*</url-pattern>
    </web-resource-collection>
    <auth-constraint />
</security-constraint>

<url-pattern>/detailedinfo/*.xhtml</url-pattern> did not work so used the above one

  • I guess you mixed up concepts. You don't seem to have any authentication configured, right? All pages are just public without that any login is required, right? Security constraints are there not for, particularly not the one you configured (that's only if `FacesServlet` is not mapped on `*.xhtml`, but on e.g. `*.jsf`). As to the CSS "problem", just use `` usual way: http://stackoverflow.com/q/8367421 – BalusC Mar 01 '16 at 11:14
  • So you are telling that i cannot have such a link yes i do not have a login page but still i donot want others to go to other pages directly as the home.xhtml passes a value to other pages and if that values is not passes and the user directly opens the page the values pops up as null – Rama Kant Singh Mar 01 '16 at 13:43
  • Then just check if that value is passed and if not then redirect back? Something like this: http://stackoverflow.com/q/7488211 – BalusC Mar 01 '16 at 13:44

0 Answers0