[teiid-issues] [JBoss JIRA] (TEIID-3655) Generated REST Service war do not allow any no-rest url
Kylin Soong (JIRA)
issues at jboss.org
Thu Aug 27 22:28:05 EDT 2015
[ https://issues.jboss.org/browse/TEIID-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kylin Soong resolved TEIID-3655.
--------------------------------
Resolution: Done
Change web.xml confgiration from servlet dispatcher
{code}
<servlet>
<servlet-name>RestDataservice</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RestDataservice</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
{code}
to filter dispatcher
{code}
<filter>
<filter-name>Resteasy</filter-name>
<filter-class>org.jboss.resteasy.plugins.server.servlet.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>Resteasy</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
{code}
which now it support add static file in rest service war.
> Generated REST Service war do not allow any no-rest url
> -------------------------------------------------------
>
> Key: TEIID-3655
> URL: https://issues.jboss.org/browse/TEIID-3655
> Project: Teiid
> Issue Type: Quality Risk
> Affects Versions: 8.12
> Reporter: Kylin Soong
> Assignee: Kylin Soong
> Priority: Blocker
> Fix For: 8.12
>
> Attachments: Screenshot.png
>
>
> Generated REST Service war have the following configuration in web.xml
> {code}
> <servlet-mapping>
> <servlet-name>RestDataservice</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
> {code}
> This means all request be thought as rest request. As attached screen, all shot,
> {code}
> http://localhost:8080/sample_1/swagger/css/typography.css
> http://localhost:8080/sample_1/swagger/lib/jquery-1.8.0.min.js
> http://localhost:8080/sample_1/swagger/lib/highlight.7.3.pack.js
> {code}
> be thought as rest request, but no relevant api define, 404 returned.
> Current design is for guarantee the rest api path like
> {code}
> /{vdbName_vdbVersion}/{modelName}/{procedureName}/{path}
> {code}
> for example
> {code}
> http://localhost:8080/sample_1/view/g1/1
> {code}
> But, I do wonder we really need to treat all are rest request? For example, if we request http://localhost:8080/sample_1, a rude 404 page with stacktrace return, we may consider and a customized 404 page.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the teiid-issues
mailing list