| 
| configuration of servlet-mapping in web.xml [message #65870] | Wed, 12 December 2007 07:55  |  | 
| Eclipse User  |  |  |  |  | The standard configuration for the servlet mapping to the equinox bridet servlet looks like this:
 
 <servlet-mapping>
 <servlet-name>equinoxbridgeservlet</servlet-name>
 <url-pattern>/*</url-pattern>
 </servlet-mapping>
 
 If the url pattern is limited to a certain path, always a 404 error is
 returned when trying to access the RAP application.
 
 This can be reproduced with the rapdemo.war file from CVS. The
 configuration looks like this:
 
 <servlet-mapping>
 <servlet-name>equinoxbridgeservlet</servlet-name>
 <url-pattern>/rap</url-pattern>
 </servlet-mapping>
 
 The leads to the following error page:
 
 HTTP Status 404 - ProxyServlet: /rapdemo/rap
 
 
 type Status report
 
 message ProxyServlet: /rapdemo/rap
 
 description The requested resource (ProxyServlet: /rapdemo/rap) is not
 available.
 Apache Tomcat/5.5
 
 
 
 The errors seems to come from the equinox http service. Any suggestions?
 
 Regards,
 Stefan.
 |  |  |  | 
|  | 
|  | 
| 
| Re: configuration of servlet-mapping in web.xml [message #66684 is a reply to message #66261] | Sun, 16 December 2007 13:29   |  | 
| Eclipse User  |  |  |  |  | Originally posted by: rherrmann.innoopract.com 
 Hi Stefan,
 
 you are right, it's easy to reproduce - and just doesn't work.
 Could you file a bug report to track the progress on that issue?
 
 Cheers,
 Rüdiger
 
 Stefan Röck wrote:
 > Hi Rüdiger,
 >
 > I did what you suggested and the response was, that it should work :-(
 > See
 >  http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.techno logy.equinox/msg04083.html
 >
 >
 > Could you maybe take a short look at this issue? It is quite easy to
 > reproduce with the RAP-demo war file as I wrote in my first posting.
 >
 > Thanks,
 > Stefan.
 >
 >
 >
 > Rüdiger Herrmann schrieb:
 >> Hi Stefan,
 >>
 >> to me, this seems to be an Equinox question. Did you try the Equinox
 >> newsgroup (eclipse.technology.equinox)?
 >>
 >> Cheers,
 >> Rüdiger
 >>
 |  |  |  | 
|  | 
|  | 
| 
| Re: configuration of servlet-mapping in web.xml [message #73507 is a reply to message #69446] | Mon, 11 February 2008 16:27  |  | 
| Eclipse User  |  |  |  |  | Hi, For my application, running under Tomcat, I wanted to be able to only
 send some URL requests to Equinox and have others be handled normally.
 I ran into the same problem you describe, and the way I found to get
 around it was to use a pattern which was not simply '/*' but which did
 contain a *:
 
 <servlet-mapping>
 <servlet-name>equinoxbridgeservlet</servlet-name>
 <url-pattern>/app/*</url-pattern>
 </servlet-mapping>
 
 
 You can then send some URL's to Equinox:
 
 http://localhost:8080/rapdemo/app/rap
 
 And others not:
 
 http://localhost:8080/rapdemo/index.html
 
 
 I imagine that the recommended way to serve static HTML files in a RAP
 application would be to put them in the application's exported plugin
 JAR and address them through the extension point redirection in the
 application's plugin.xml.  For example:
 
 <extension
 point="org.eclipse.equinox.http.registry.resources">
 <resource alias="/help" base-name="/help_files"/>
 </extension>
 
 
 Then for the following request:
 
 http://localhost:8080/rapdemo/help/index.html
 
 It will find the file under the classpath (e.g. in the plugin's
 exported JAR):
 
 /help_files/index.html
 
 
 I used this for static HTML files (help files in my app).  However, for
 dynamically generated HTML files, I used the method described above,
 ensuring that the URL's do not get sent through to Equinox:
 
 http://localhost:8080/rapdemo/index.html
 
 
 Thanks,
 
 Ryan
 
 
 
 Frank Appel wrote:
 > Hi,
 >
 > after reading Simon's answer  to the problem I do have an annotation to this
 > thread. It's true that the 404 is strange and probably should not happen.
 > But even if RAP wouldn't produce the 404, the '/rap' URL-pattern approach
 > does not work with RAP and Equionx in general. The reason for this is that
 > static resources (images, js libraries etc) registered via the OSGi service
 > are not delivered by the servlet container itself. This is ensured by the
 > '/*' URL-pattern, which forwards requests on such resources to the
 > resources-servlet of the Http-OSGi service implementation.
 >
 >
 > Ciao
 > Frank
 >
 > "Stefan Röck" <stefan.roeck@cas.de> schrieb im Newsbeitrag
 > news:fk5jrr$s20$1@build.eclipse.org...
 >> Thanks for the confirmation :-)
 >>
 >> https://bugs.eclipse.org/bugs/show_bug.cgi?id=213152
 >>
 >> Regards,
 >> Stefan.
 >>
 >> Rüdiger Herrmann schrieb:
 >>> Hi Stefan,
 >>>
 >>> you are right, it's easy to reproduce - and just doesn't work.
 >>> Could you file a bug report to track the progress on that issue?
 >>>
 >>> Cheers,
 >>> Rüdiger
 >>>
 >
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.53947 seconds