@Path(value="/") @Controller public class HelloController extends Object
| Constructor and Description |
|---|
HelloController() |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
language1()
Sets language to "es".
|
javax.ws.rs.core.Response |
language2()
Sets language to "es" when using @View.
|
javax.ws.rs.core.Response |
locale1()
Sets locale to UK.
|
javax.ws.rs.core.Response |
locale2()
Sets locale to UK when using @View.
|
String |
multipleProduces1()
If HTML and XHTML are equally preferred, the latter should be chosen
given the lower qs on the former.
|
void |
multipleProduces2()
If HTML and XHTML are equally preferred, the latter should be chosen
given the lower qs on the former when using @View.
|
String |
noProduces1()
Default content type should be text/html.
|
void |
noProduces2()
Default content type should be text/html when using @View.
|
javax.ws.rs.core.Response |
otherProduces1()
XHTML type should override static HTML one in @Produces in this case.
|
javax.ws.rs.core.Response |
otherProduces2()
XHTML type should override static HTML one in @Produces in this case
when using @View.
|
@GET @Path(value="no_produces1") public String noProduces1()
@GET @Path(value="no_produces2") @View(value="hello.jsp") public void noProduces2()
@GET
@Produces(value={"text/html;qs=0.9","application/xhtml+xml"})
@Path(value="multiple_produces1")
public String multipleProduces1()
@GET
@Produces(value={"text/html;qs=0.9","application/xhtml+xml"})
@Path(value="multiple_produces2")
@View(value="hello.jsp")
public void multipleProduces2()
@GET @Path(value="other_produces1") @Produces(value="text/html") public javax.ws.rs.core.Response otherProduces1()
@GET @Path(value="other_produces2") @Produces(value="text/html") @View(value="hello.jsp") public javax.ws.rs.core.Response otherProduces2()
@GET @Path(value="language1") @Produces(value="text/html") public javax.ws.rs.core.Response language1()
@GET @Path(value="language2") @Produces(value="text/html") @View(value="hello.jsp") public javax.ws.rs.core.Response language2()
@GET @Path(value="locale1") @Produces(value="text/html") public javax.ws.rs.core.Response locale1()
@GET @Path(value="locale2") @Produces(value="text/html") @View(value="hello.jsp") public javax.ws.rs.core.Response locale2()
Copyright © 2015. All Rights Reserved.