Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » configuration of servlet-mapping in web.xml
configuration of servlet-mapping in web.xml [message #65870] Wed, 12 December 2007 12:55 Go to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
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 #65987 is a reply to message #65870] Wed, 12 December 2007 15:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

Hi Stefan,

to me, this seems to be an Equinox question. Did you try the Equinox
newsgroup (eclipse.technology.equinox)?

Cheers,
Rüdiger

Stefan Röck wrote:
> 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 #66261 is a reply to message #65987] Fri, 14 December 2007 08:19 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
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 #66684 is a reply to message #66261] Sun, 16 December 2007 18:29 Go to previous messageGo to next message
Eclipse UserFriend
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 #66910 is a reply to message #66684] Mon, 17 December 2007 10:43 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
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
>
Re: configuration of servlet-mapping in web.xml [message #69446 is a reply to message #66910] Wed, 09 January 2008 17:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

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
Re: configuration of servlet-mapping in web.xml [message #73507 is a reply to message #69446] Mon, 11 February 2008 21:27 Go to previous message
Ryan Donnelly is currently offline Ryan DonnellyFriend
Messages: 35
Registered: July 2009
Member
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
>>>
>
>
Previous Topic:custom javascript code in RAP
Next Topic:Slow ListViewer
Goto Forum:
  


Current Time: Thu Apr 25 02:17:57 GMT 2024

Powered by FUDForum. Page generated in 0.03376 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top