Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Can't launsch as RWT application in eclipse because Maven dependency "javax.servlet"
Can't launsch as RWT application in eclipse because Maven dependency "javax.servlet" [message #1061346] Fri, 31 May 2013 06:03 Go to next message
Moritz Wilde is currently offline Moritz Wilde
Messages: 3
Registered: May 2013
Junior Member
I have written an application which is deployed on a tomcat server. The application establish a connection with a postgresql database and shows some values etc. in some comboboxes. You can choose a project and you have the chance to create a report (requirements, bugs, etc.) with jasperreports. When the creation of the report is ready, you can use an automatically created download link. This works on the tomcat server without any problem.

The problem is, when I want to start the application in eclipse as RWT application, it doesn't work. You get no problem report. In my pom.xml I have a dependency

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>

I need this dependency for the creation of the download link. I followed the introduction on: http://wiki.eclipse.org/RAP/FAQ#How_to_provide_a_download_link.3F under the point: How to provide a download link?

This works on the tomcat but not in my eclipse as RWT application!
When you comment the dependency out, you get errors, because the Class with the DownloadHandler is buggy. But now when I start it as RWT application, it works (proceed with errors).

What can I do?
Re: Can't launsch as RWT application in eclipse because Maven dependency &quot;javax.servlet& [message #1061747 is a reply to message #1061346] Mon, 03 June 2013 13:47 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger Herrmann
Messages: 563
Registered: July 2009
Senior Member
Moritz,

this is most likely an issue not related to RAP but to your project
setup. The servlet API is required at compile time but at runtime it is
provided by the servlet engine. You can tell that maven with the
<scope>provided</scope> element.

HTH
Rüdiger

On 31.05.2013 21:40, Moritz Wilde wrote:
> I have written an application which is deployed on a tomcat server. The
> application establish a connection with a postgresql database and shows
> some values etc. in some comboboxes. You can choose a project and you
> have the chance to create a report (requirements, bugs, etc.) with
> jasperreports. When the creation of the report is ready, you can use an
> automatically created download link. This works on the tomcat server
> without any problem.
>
> The problem is, when I want to start the application in eclipse as RWT
> application, it doesn't work. You get no problem report. In my pom.xml I
> have a dependency
> <dependency>
> <groupId>javax.servlet</groupId>
> <artifactId>servlet-api</artifactId>
> <version>2.5</version>
> </dependency>
>
> I need this dependency for the creation of the download link. I followed
> the introduction on:
> http://wiki.eclipse.org/RAP/FAQ#How_to_provide_a_download_link.3F under
> the point: How to provide a download link?
> This works on the tomcat but not in my eclipse as RWT application!
> When you comment the dependency out, you get errors, because the Class
> with the DownloadHandler is buggy. But now when I start it as RWT
> application, it works (proceed with errors).
>
> What can I do?
>


--
Rüdiger Herrmann
http://codeaffine.com
Re: Can't launsch as RWT application in eclipse because Maven dependency &quot;javax.servlet& [message #1061959 is a reply to message #1061747] Wed, 05 June 2013 03:20 Go to previous message
Moritz Wilde is currently offline Moritz Wilde
Messages: 3
Registered: May 2013
Junior Member
Hi Rüdiger

Thanks for your comment. Now my pom.xml dependency looks like:

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1-b09</version>
<scope>provided</scope>
</dependency>

First I had the javax.servlet version 2.5. For that version it doesn't work. But with the change to version 3.1-b09 it works fine.

Thank you
Previous Topic:SWT.ICON_SEARCH and SWT.ICON_CANCEL not work in the dialog
Next Topic:RAP and Tabris
Goto Forum:
  


Current Time: Wed Aug 20 10:48:46 EDT 2014

Powered by FUDForum. Page generated in 0.11864 seconds