0

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?

jobe
  • 325
  • 2
  • 14
  • 25
  • I don't know exactly what you wanna do but, Authentication and Authorization is a complex topic and you should not try to implement something new on your own. A better way is using standard auth ways like security realms. http://stackoverflow.com/questions/2206911/best-way-for-user-authentication-on-javaee-6-using-jsf-2-0/2207147#2207147 – Sonic Jul 04 '13 at 16:22
  • My goal is to do something like that:http://stackoverflow.com/questions/9862584/programmatically-create-subdomains-with-jboss-and-java – jobe Jul 04 '13 at 20:16

0 Answers0