I have two pages:
String page1 = "user/newuser.jsf";
String page2 = "department/newdepartment.jsf";
If I redirect to page1 like this:
FacesContext.getCurrentInstance().getExternalContext().redirect(page1);
URL changes to localhost:8080/NavFile/user/newuser.jsf.
On this page I  redirect to page2:
FacesContext.getCurrentInstance().getExternalContext().redirect(page2);
URL changes to localhost:8080/NavFile/user/department/newdepartment.jsf. But there is no user/department directory in my application. My goal was to redirect to localhost:8080/NavFile/department/newdepartment.jsf.
How is this caused and how can I solve it?
 
     
     
    