File tree Expand file tree Collapse file tree 3 files changed +23
-6
lines changed
MVC1.0-samples/MVC-TiposRetornos
src/main/java/br/org/soujava/rio Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export PATH=${JAVA_HOME}/bin:${PATH}
2222export MAVEN_HOME=/home/daniel/desenvolvimento/apache-maven-3.5.4
2323export PATH=${MAVEN_HOME} /bin:${PATH}
2424
25- mvn clean package payara-micro:bundle
25+ mvn clean package -Ppayara payara-micro:bundle
2626
2727printf " \n"
2828
Original file line number Diff line number Diff line change 2222 */
2323package br .org .soujava .rio .application ;
2424
25+ import java .util .HashMap ;
26+ import java .util .Map ;
27+
2528import javax .ws .rs .ApplicationPath ;
2629import javax .ws .rs .core .Application ;
2730
31+ import org .mvcspec .ozark .Properties ;
32+
2833/**
2934 * @author Daniel Dias
3035 * github:Daniel-Dos
3136 * daniel.dias@soujava.org.br
3237 * twitter:@danieldiasjava
3338 */
3439@ ApplicationPath ("app" )
35- public class APP extends Application {}
40+ public class APP extends Application {
41+
42+ /* (non-Javadoc)
43+ * @see javax.ws.rs.core.Application#getProperties()
44+ */
45+ @ Override
46+ public Map <String , Object > getProperties () {
47+ Map <String ,Object > ma = new HashMap <>();
48+ ma .put (Properties .DEFAULT_VIEW_FILE_EXTENSION , "jsp" );
49+ return ma ;
50+
51+ }
52+ }
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public class RetornosController {
4646private Models models ;
4747
4848@ GET
49- @ View ("retorno.jsp " )
49+ @ View ("retorno" )
5050@ Path ("void" )
5151public void getView () {
5252this .models .put ("retorno" , "Retorno do tipo void usando @View" );
@@ -56,20 +56,20 @@ public void getView() {
5656@ Path ("String" )
5757public String getString () {
5858this .models .put ("retorno" , "Retorno do tipo String" );
59- return "retorno.jsp " ;
59+ return "retorno" ;
6060}
6161
6262@ GET
6363@ Path ("Response" )
6464public Response getResponse () {
6565this .models .put ("retorno" , "Retorno do Tipo Response do Jax-RS" );
66- return Response .status (Response .Status .OK ).entity ("retorno.jsp " ).build ();
66+ return Response .status (Response .Status .OK ).entity ("retorno" ).build ();
6767}
6868
6969@ GET
7070@ Path ("ViewAble" )
7171public Viewable getViewAble () {
7272this .models .put ("retorno" , "Retorno do Tipo Viewable,especifico da RI OZARK" );
73- return new Viewable ("retorno.jsp " );
73+ return new Viewable ("retorno" );
7474}
7575}
You can’t perform that action at this time.
0 commit comments