I would like to create a user login using restful WS and a primefaces webpage.
The idea is to write: www.mysite.com/mycompany/login.xhtml
Using a restful WS i would read the company name and ask for an username and password. It would be good if the company name would stay in the url for every other page. e.g.
I know how to read with rest
@GET
@Path("/{param}")
public Response printMessage(@PathParam("param") String company) {
//??
}
But i don't really know what to do then. Where should i save the company name? Where should i place my xhtml pages? Should that happen everytime a page is loaded? Does it costs lots of money? is there a better way?