Thoughts about servlets, resources, httpcontexts extension points [message #59729] |
Mon, 06 February 2006 00:33  |
Eclipse User |
|
|
|
Originally posted by: newsreader.infonoia.com
I've been playing with these extension points, and I wonder if they
could/should be grouped into one "web-resource" extension point.
Ideally, the extension point would understand "web.xml" snippets,
as in
<pre><servlet id="struts">
<servlet-name>action</servlet-name>
<display-name>Struts Action Servlet</display-name>
<description>Struts Action Servlet</description>
<servlet-class>org.rsp.framework.struts.base.BundleActionServlet </servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/config/struts.xml</param-value>
</init-param>
<init-param>
<param-name>chainConfig</param-name>
<param-value>/WEB-INF/config/chain.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>/do/*</url-pattern>
</servlet-mapping></pre>
Now I do this in the extension point<pre><alias>
/do
</alias>
<servlet-class>
org.rsp.framework.struts.base.BundleActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>*/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>chainConfig</param-name>
<param-value>/WEB-INF/config/chain.xml</param-value>
</init-param></pre>
I see that <alias>/do</alias> corresponds to
<url-pattern>/do/*</url-pattern> under "classic web".
Of course, we still need httpcontext path info somewhere in there as an
attribute, but the rest would probably gain by being modeled web.xml
style. If we adhere to that, we might in some cases just specify the
path to a web.xml snippet in the extension point.
My point is, the closer to classic web, the simpler to do.
I am sure you have already had your thoughts about the above. Just 2c.
On a side note, the httpcontext impl. might want to prohibit remote
access to items under /WEB-INF/* (if I have a WEB-INF folder on the path.
Wolfgang Gehner
|
|
|
Re: Thoughts about servlets, resources, httpcontexts extension points [message #59826 is a reply to message #59729] |
Mon, 06 February 2006 11:22  |
Eclipse User |
|
|
|
Originally posted by: skaegi.sympatico.ca
Hi Wolfgang,
I think finding a deployment descriptor that's close to a "classic" web-app
is a good goal.
Currently, the extensions mimic the OSGi HttpService but moving forward
mimicking the Servlet API is the right direction.
I'd really like to have a good look at supporting for Filters and maybe
listeners too. This is probably longer-term though.
-Simon
"Wolfgang Gehner" <newsreader@infonoia.com> wrote in message
news:ds6n3d$7df$1@utils.eclipse.org...
> I've been playing with these extension points, and I wonder if they
> could/should be grouped into one "web-resource" extension point.
> Ideally, the extension point would understand "web.xml" snippets,
> as in
> <pre><servlet id="struts">
> <servlet-name>action</servlet-name>
> <display-name>Struts Action Servlet</display-name>
> <description>Struts Action Servlet</description>
>
>
<servlet-class>org.rsp.framework.struts.base.BundleActionServlet </servlet-cl
ass>
> <load-on-startup>1</load-on-startup>
> <init-param>
> <param-name>config</param-name>
> <param-value>/WEB-INF/config/struts.xml</param-value>
> </init-param>
> <init-param>
> <param-name>chainConfig</param-name>
> <param-value>/WEB-INF/config/chain.xml</param-value>
> </init-param>
> </servlet>
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>/do/*</url-pattern>
> </servlet-mapping></pre>
>
> Now I do this in the extension point<pre><alias>
> /do
> </alias>
> <servlet-class>
> org.rsp.framework.struts.base.BundleActionServlet
> </servlet-class>
> <init-param>
> <param-name>config</param-name>
> <param-value>*/WEB-INF/struts-config.xml</param-value>
> </init-param>
> <init-param>
> <param-name>chainConfig</param-name>
> <param-value>/WEB-INF/config/chain.xml</param-value>
> </init-param></pre>
>
> I see that <alias>/do</alias> corresponds to
> <url-pattern>/do/*</url-pattern> under "classic web".
>
> Of course, we still need httpcontext path info somewhere in there as an
> attribute, but the rest would probably gain by being modeled web.xml
> style. If we adhere to that, we might in some cases just specify the
> path to a web.xml snippet in the extension point.
> My point is, the closer to classic web, the simpler to do.
>
> I am sure you have already had your thoughts about the above. Just 2c.
> On a side note, the httpcontext impl. might want to prohibit remote
> access to items under /WEB-INF/* (if I have a WEB-INF folder on the path.
>
> Wolfgang Gehner
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04724 seconds