Servlet Mapping in Equinox Webapp [message #80701] |
Thu, 11 January 2007 16:28 |
Eclipse User |
|
|
|
Originally posted by: jason.duley.gmail.com
Hi,
I have a web application where I defined the following items in plugin.xml ...
<extension point="org.eclipse.equinox.http.registry.servlets">
<servlet alias="/ajax" class="org.foo.bar.MyServlet"/>
</extension>
<!-- html pages -->
<extension
point="org.eclipse.equinox.http.registry.resources">
<resource alias="/" base-name="/web_files"/>
</extension>
given these two items, I want to configure the app such that a request to the html page:
"http://myserver.org/html_files/myhtml.html"
will first be intercepted by the servlet (defined by /ajax). What is the best way to accomplish this in the equinox framework?
Thanks.
Jason
|
|
|
Re: Servlet Mapping in Equinox Webapp [message #80757 is a reply to message #80701] |
Thu, 11 January 2007 22:58 |
Eclipse User |
|
|
|
Originally posted by: jason.duley.gmail.com
these are the items, sorry about that:
< extension
point="org.eclipse.equinox.http.registry.servlets">
< servlet
alias="/ajax"
class="org.foo.bar.MyServlet"/>
</ extension>
< extension
point="org.eclipse.equinox.http.registry.resources">
< resource
alias="/"
base-name="/web_files"/>
</ extension>
|
|
|
|
Re: Servlet Mapping in Equinox Webapp [message #80781 is a reply to message #80701] |
Fri, 12 January 2007 01:59 |
Eclipse User |
|
|
|
Originally posted by: skaegi.sympatico.ca
Hi Jason,
I'm unsure what you're asking for.
Are you looking for a ServletFilter to be applied before reaching your file
or ... ?
Perhaps it might help if you could describe how would you would configure
this in a regular web.xml.
-Simon
"Jason Duley" <jason.duley@gmail.com> wrote in message
news:7206165.1168532937413.JavaMail.root@cp1.javalobby.org...
> Hi,
> I have a web application where I defined the following items in plugin.xml
....
>
> <extension point="org.eclipse.equinox.http.registry.servlets">
> <servlet alias="/ajax" class="org.foo.bar.MyServlet"/>
> </extension>
>
> <!-- html pages -->
> <extension
> point="org.eclipse.equinox.http.registry.resources">
> <resource alias="/" base-name="/web_files"/>
> </extension>
>
> given these two items, I want to configure the app such that a request to
the html page:
>
> "http://myserver.org/html_files/myhtml.html"
>
> will first be intercepted by the servlet (defined by /ajax). What is the
best way to accomplish this in the equinox framework?
> Thanks.
> Jason
|
|
|
Re: Servlet Mapping in Equinox Webapp [message #80871 is a reply to message #80781] |
Fri, 12 January 2007 18:04 |
Eclipse User |
|
|
|
Originally posted by: jason.duley.gmail.com
------=_Part_4263_27275313.1168625128184
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Simon,
Thanks for your help. I am trying to intercept calls to the items I defined in the plugin.xml file using a Filter.
Jason
------=_Part_4263_27275313.1168625128184
Content-Type: application/octet-stream; name=web.xml
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>LoginFilter</filter-name>
<filter-class>org.foo.bar.LoginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LoginFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<servlet>
<display-name>MyServlet</display-name>
<servlet-name>MyServlet</servlet-name>
<servlet-class>org.foo.bar.MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/ajax</url-pattern>
</servlet-mapping>
</web-app>
------=_Part_4263_27275313.1168625128184--
|
|
|
|
Powered by
FUDForum. Page generated in 0.05194 seconds