How to get the real content root of (tomcat) server

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

How to get the real content root of (tomcat) server

Postby colinzhao » Sat Jan 27, 2007 4:48 am

In my eclipse project, I created a folder "calc" under public (public/calc) and I imported a few files in there.

In hosted mode, how do I open a file in this directory (public/calc) from within my service servlet? In web mode, I can get the real path to the folder using getServletContext().getRealPath()+"/calc". The problem is that doing so in hosted mode will give me

$myprojectroot/tomcat/webapps/ROOT/calc

which does not exist.

Colin
colinzhao
 
Posts: 24
Joined: Sun Dec 31, 2006 4:03 pm

Re: How to get the real content root of (tomcat) server

Postby chuhan » Mon Feb 12, 2007 12:32 pm

colinzhao wrote:In my eclipse project, I created a folder "calc" under public (public/calc) and I imported a few files in there.

In hosted mode, how do I open a file in this directory (public/calc) from within my service servlet? In web mode, I can get the real path to the folder using getServletContext().getRealPath()+"/calc". The problem is that doing so in hosted mode will give me

$myprojectroot/tomcat/webapps/ROOT/calc

which does not exist.

Colin


Hi,

I had the same problem, and I solved it by using external tomcat.

See this http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/338c4b765d7dfc39/c9382d0e65266248?lnk=gst&q=external+tomcat&rnum=1#c9382d0e65266248

I hope this will help you.

chuhan
chuhan
 
Posts: 28
Joined: Tue Nov 14, 2006 3:28 pm


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests