Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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:How to obtain browser client's IP Address
Next Topic:[ANN] RAP 2.1 RC2 is available
Goto Forum:
  


Current Time: Wed Jul 16 16:24:08 EDT 2025

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

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

Back to the top