Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Browser.setText causes 404 in Tomcat(RAP app with Browser.setText deployed as WAR in Tomcat leads to 404 - .../rwt-resources/org.eclipse.swt.browser/text-....html)
Browser.setText causes 404 in Tomcat [message #1692656] Fri, 17 April 2015 09:17 Go to next message
Björn Harmen Gerth is currently offline Björn Harmen GerthFriend
Messages: 4
Registered: December 2014
Junior Member
Hello,

I have a strange problem with Browser.setText that occurs in Tomcat.

Scenario:
- RAP 2.3 application with OSGi
- Entry point "/results" with
Browser browser = new Browser(parent, SWT.NONE);
browser.setText("Loaded");

- Maven 3.1.1 + Tycho 0.22 build, creates a WAR file (pdr.war)
- equinoxbridgeservlet
- WAR file is deployed in Tomcat (v8.0.15 on Win, v7 on Ubuntu)

When I run the application internally in Eclipse (Jetty), it works as expected.

When loading the application from Tomcat, it gives
Quote:
HTTP Status 404 - ProxyServlet: /pdr/rwt-resources/org.eclipse.swt.browser/text-2013651931.html
type Status report
message ProxyServlet: /pdr/rwt-resources/org.eclipse.swt.browser/text-2013651931.html
description The requested resource is not available.
Apache Tomcat/8.0.15


As far as I understood, Browser.setText(...) dynamically registers a resource in the web server. So I suppose that dynamic registration somehow fails in my web app.

I created a simple RAP app which only does that, created a WAR product config and exported it. Somehow, that app does not cause the problem in Tomcat, it works there as expected.

My questions:
What can I do to find out why that resource is not available?
Which are potential debug points, for example where does the dynamic registration take place?
Re: Browser.setText causes 404 in Tomcat [message #1692899 is a reply to message #1692656] Mon, 20 April 2015 13:36 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
just checked our Controls Demo -> Browser Tab (based on RAP 3.0M6+) in
Tomcat 8.0.21 under Windows and Browser#setText is working as expected.
Could you try with RAP 3.0M6? Can you provide a simple test project (and
war for deployment) that demonstrates the issue?
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
icon10.gif  Re: Browser.setText causes 404 in Tomcat [message #1692988 is a reply to message #1692899] Tue, 21 April 2015 06:15 Go to previous messageGo to next message
Björn Harmen Gerth is currently offline Björn Harmen GerthFriend
Messages: 4
Registered: December 2014
Junior Member
Hi Ivan,

as I wrote, I already tested the basic functionality with a simple app and the error did not occur. So that was a hint that something might be wrong with my WAR file configuration.
However, I did as you suggested and ran my app against 3.0 M6. Same problem.

Analysis

A breakpoint in org.eclipse.swt.internal.browser.browserkit.BrowserLCA.registerHtml() revealed that the internal registration of the dynamic HTML resource seemed to be working. org.eclipse.rap.rwt.internal.resources.ResourceManagerImpl.register() did not cause any error, some file was indeed created on the hard disk.

However, I then noticed that the constructor of ResourceManagerImpl was called twice when the app was redeployed. That was a fairly large number for a singleton.
Investigation of the stack traces led to the...

Solution

It turned out that the feature.xml contained the plugin org.eclipse.rap.ui.workbench, which was not necessary because my app declares an application configuration. After removing it (and fellow plugin org.eclipse.rap.ui), Browser.setText() was finally working.
Re: Browser.setText causes 404 in Tomcat [message #1692993 is a reply to message #1692988] Tue, 21 April 2015 06:58 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Great that it's working now!

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Browser.setText causes 404 in Tomcat [message #1743434 is a reply to message #1692993] Thu, 15 September 2016 12:32 Go to previous message
Jan Reimann is currently offline Jan ReimannFriend
Messages: 140
Registered: July 2009
Senior Member
@Björn: I had exactly the same problem. Your hint regarding the unnecessary org.eclipse.rap.ui.workbench plugin solved it for me. Thank you so much!
Previous Topic:Quirks Mode or Standard Mode in RAP?
Next Topic:launch EMF editor with RAP
Goto Forum:
  


Current Time: Tue Apr 16 10:49:47 GMT 2024

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

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

Back to the top