Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » application root
application root [message #536456] Fri, 28 May 2010 10:45 Go to next message
Tobias Semmet is currently offline Tobias SemmetFriend
Messages: 37
Registered: July 2009
Member
Hi i deployed my application on a linux server (tomcat).

how can i find images or files, where is my contextPath or application path ?

Thanks
Re: application root [message #539113 is a reply to message #536456] Wed, 09 June 2010 16:38 Go to previous messageGo to next message
yadongsun  is currently offline yadongsun Friend
Messages: 2
Registered: June 2010
Junior Member
hi
i have got the same problem,do you find any solution?
Re: application root [message #539279 is a reply to message #539113] Thu, 10 June 2010 09:10 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

yadongsun wrote:
> hi i have got the same problem,do you find any solution?

Can you explain your problem in more detail? What files or locations are
you looking for? All runtime data are kept inside the tomcat work
directory (but there should be no need to mess around with this):

<tomcat>/work/Catalina/localhost/<appname>/eclipse/

Ralf
Re: application root [message #539314 is a reply to message #539279] Thu, 10 June 2010 11:30 Go to previous messageGo to next message
yadongsun  is currently offline yadongsun Friend
Messages: 2
Registered: June 2010
Junior Member
Thanks so much for your reply.
I run my application using the RAP Launcher, there was a birt project in my application.
The server is eclipse's default server jetty.When birt produce an image in my app context directory in my OS. e.g. "e:/workspace/myapp/.. .. ../abc.jpg" I can not display it in browser using URL "http://localhost:myport/myappname/abc.jpg"
In the java file i wrote:
                ServletContext sc = RWT.getRequest().getSession().getServletContext();
		String contextPath = RWT.getRequest().getContextPath();

		String realPath = sc.getRealPath("/");
But the realPath was "" every time.Is there anything wrong with jetty?
Re: application root [message #539541 is a reply to message #539314] Fri, 11 June 2010 08:43 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

I'd say that the correct way to implement this is to either create and
use an SWT Image from the file path:

new Image( display, filename );

or, if you need a certain URL to the image, to register it using

RWT.getResourceManager().register( ... );

The Jetty Bundle is not a classic web server that delivers static
resources from a path, it is an implementation of the OSGi HTTP service
that requires you to register resources.

Ralf

yadongsun wrote:
> Thanks so much for your reply.
> I run my application using the RAP Launcher, there was a birt project in
> my application.
> The server is eclipse's default server jetty.When birt produce an image
> in my app context directory in my OS. e.g. "e:/workspace/myapp/.. ..
> ../abc.jpg" I can not display it in browser using URL
> "http://localhost:myport/myappname/abc.jpg"
> In the java file i wrote:
>
> ServletContext sc =
> RWT.getRequest().getSession().getServletContext();
> String contextPath = RWT.getRequest().getContextPath();
>
> String realPath = sc.getRealPath("/");
> But the realPath was "" every time.Is there anything wrong
> with jetty?
Previous Topic:How to get the entrypoint id?
Next Topic:StatusLineManager
Goto Forum:
  


Current Time: Mon Mar 04 03:14:53 GMT 2024

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

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

Back to the top