[undertow-dev] Adding JSP support
Stuart Douglas
sdouglas at redhat.com
Tue May 6 22:13:56 EDT 2014
You need to make sure you have included the jastow artifact:
<dependency>
<groupId>io.undertow.jastow</groupId>
<artifactId>jastow</artifactId>
<version>1.0.0.Final</version>
</dependency>
Then you can call io.undertow.jsp.JspServletBuilder#createServlet() to
create a ServletInfo that represents the JSP servlet, and then use that
to create any mappings you require (generally *.jsp).
Make sure that you have set a ResourceManager on the deployment info
(usually FileResourceManager or ClassPathResourceManager), as this is
what is used to resolve the JSP pages.
I have created a JIRA issue to improve the docs for this:
https://issues.jboss.org/browse/UNDERTOW-234
Hopefully will get to it this week.
Stuart
Tomaž Cerar wrote:
> JSP support is just another servlet you need to map, noting more.
>
> for example see how we create SevletInfo for JSP servlet
> https://github.com/wildfly/wildfly/blob/master/undertow/src/main/java/org/wildfly/extension/undertow/JSPConfig.java
> then all you need to do is add mappings where jsp servlet will listent
> to, usualy *.jsp...
>
> see
> https://github.com/wildfly/wildfly/blob/master/undertow/src/main/java/org/wildfly/extension/undertow/deployment/UndertowDeploymentInfoService.java#L553
> to see what we do in WildFly to wire everything up, to be fair you
> probably don't need Injection stuff.
>
> --
> tomaz
>
>
>
> On Mon, May 5, 2014 at 12:08 PM, Dragan Jotanovic <draganj at gmail.com
> <mailto:draganj at gmail.com>> wrote:
>
> Hi,
> does anyone have code example of how to configure Undertow with JSP
> support? I didn't find any information on this in documentation.
>
> Thanks,
> Dragan
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org <mailto:undertow-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/undertow-dev
>
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev
More information about the undertow-dev
mailing list