examples package: Using Gloop to render a JSP
Please see the following articles for more information:
To see the JSP page live: ensure that the
examples package is started and then visit
<host>/api/jspResponse/page2 or visit the
examples package web examples at
on your browser.
There, you will see the form above. Fill up the form and submit to see data get rendered. You will notice that upon submission, the data you entered will be visible above the form.
To see the files related to this example (and play around with the results), expand the
examples package under the Navigator and navigate to the
code folder. Afterwards, look for the
jspResponse package. This package contains the
.api file that defines the controller and the
Gloop service responsible for mapping the values shown in the view.
1 2 3 4 5 6 7 8 9 10
examples ├── ... ├── code │ ├── ... │ ├── jspResponse │ │ ├── api │ │ │ └── JspController.api │ │ └── SendJspPage.gloop │ ├── ... ├── ...
In addition to this, the JSP page, named
sample.jsp, is visible in the
To serve web content via Spring and Gloop, here are the steps you should follow:
- Put your JSP file under your package's
- Create a Gloop service with an output variable named
- Set the
$gloopViewvariable's value so that it is equal to the basename3 (extension-excluded filename) of the JSP file.
Although in general, what you should return also depends on the requirements of the configured