War file working on windows and not on linux

348 views
Skip to first unread message

clo

unread,
Nov 11, 2007, 3:48:14 PM11/11/07
to Google Web Toolkit
Hi

I am new to GWT and i would greatly appreciate some help.

I created MyApplication as described in the 'Creating an Application
from scratch with eclipse'

I packaged it at as a war that i deployed to my local jboss app server
and everything works fine
http://localhost:8080/MyApplication/ ------> displays the
MyApplication web page

I copied the same exact war file to jboss app server running on linux
fedora core and i get
http://www.myserver.com/MyApplication/ ---->Error404 The requested
URL /MyApplication/ was not found on this server.

Other war files are running fine on this specific jboss instance

I tried to change uppercase/lower case ... nothing worked

My web.xml is

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<display-name>MyApplication</display-name>

<welcome-file-list>
<welcome-file>MyApplication.html</welcome-file>
</welcome-file-list>

</web-app>

Eric Ayers

unread,
Nov 11, 2007, 8:20:52 PM11/11/07
to Google-We...@googlegroups.com
here is a FAQ about moving off of hosted mode that might help:

http://code.google.com/support/bin/answer.py?answer=55200

And a recent post from another user about migrating to another Tomcat server:

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/d6076e4da1e300dc/1aced416ce03ec49?lnk=gst&q=%2312+tomcat#1aced416ce03ec49


If I had to guess, one thing is that you're not specifying enough
information in your web.xml for JBoss to find your servelet class
files, but I've never used JBoss before.

Hope that helped,
-Eric.

--
Eric Z. Ayers - GWT Team - Atlanta, GA USA - +1 404 487 9229
http://code.google.com/webtoolkit/

kilkenny

unread,
Nov 12, 2007, 2:28:27 AM11/12/07
to Google Web Toolkit
Hi

What you are describing sounds very much like a uppercase/lower case
issue. The welcome-file is called 'MyApplication.html' in the
descriptor file, maybe it is 'myapplication.html' on the disk? The
server on Windows will find the file just fine, the one on Linux
won't. It is not necessary the welcome-file itself, but most likely
some resource your application depends on. Check the naming of the JS,
HTML, CSS and graphics files your application is using.

Install http://www.getfirebug.com/ and see what your application is
trying to load (Check the 'Net' tab).

Regards, Adrian
--
http://traceurl.com

Milan Jaric

unread,
Nov 12, 2007, 3:05:09 AM11/12/07
to Google-We...@googlegroups.com
did you go to tomcat manager to see if war is deployed on server ( if you use ide to deploy application ). If you have deployed your app and it is in stoped state that means that maybe gwt-dev-<os platform>.jar making problems, or any jar that depends on platform specific modules. Rename war to zip and unpack it, replace jars and thane rewers proces. :) I hope it will help.

Milan Jaric

unread,
Nov 12, 2007, 3:07:56 AM11/12/07
to Google-We...@googlegroups.com
oups. I didnt notece that is Jboss, sory, but check your jars anyway

--
Milan Jaric



--
Milan Jaric

clo

unread,
Nov 12, 2007, 8:35:11 AM11/12/07
to Google Web Toolkit
Hi Adrian

Thank you for your reply

Like you, i thought it was a lower case/ upper case issue but i don't
seem to find it.

Really what i try to do is see if the war file for the simple
MyApplication sample provided by GOOGLE generated on windows would
work on linux.

The only thing i added to it is the web.xml that i posted in my
original post.

Here is the war file exploded on linux followed by firebug trace that
doesn't say much

Thank you for your help

-Clo

unzip MyApplication.war
Archive: MyApplication.war
creating: META-INF/
inflating: META-INF/MANIFEST.MF
creating: WEB-INF/
creating: WEB-INF/classes/
creating: WEB-INF/lib/
inflating: 0DD0EDEBCD3C39488F2C17DD2E1730B6.cache.html
inflating: 0DD0EDEBCD3C39488F2C17DD2E1730B6.cache.js
inflating: 0DD0EDEBCD3C39488F2C17DD2E1730B6.cache.xml
inflating: 636A0A573F610A83B75076421D65644D.cache.html
inflating: 636A0A573F610A83B75076421D65644D.cache.js
inflating: 636A0A573F610A83B75076421D65644D.cache.xml
inflating: 9FB13D346DA1497DEDEEF312A0133931.cache.html
inflating: 9FB13D346DA1497DEDEEF312A0133931.cache.js
inflating: 9FB13D346DA1497DEDEEF312A0133931.cache.xml
inflating: CE0EF31345382F679F9650FFEF634C26.cache.html
inflating: CE0EF31345382F679F9650FFEF634C26.cache.js
inflating: CE0EF31345382F679F9650FFEF634C26.cache.xml
inflating: EB6BF9E885FC07BFF4159C243BF80B03.cache.html
inflating: EB6BF9E885FC07BFF4159C243BF80B03.cache.js
inflating: EB6BF9E885FC07BFF4159C243BF80B03.cache.xml
inflating: MyApplication.html
inflating: WEB-INF/classes/MyApplication.html
inflating: WEB-INF/lib/gwt-servlet.jar
inflating: WEB-INF/web.xml
inflating: clear.cache.gif
inflating: com.mycompany.MyApplication-xs.nocache.js
inflating: com.mycompany.MyApplication.nocache.js
inflating: gwt.js
inflating: history.html
inflating: hosted.html

Date Mon, 12 Nov 2007 09:25:38 GMT
Server Apache/2.2.6 (Fedora)
Content-Length 293
Connection close
Content-Type text/html; charset=iso-8859-1
Request Headers
Host www.myserver.com
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.9)
Gecko/20071025 Firefox/2.0.0.9
Accept text/xml,application/xml,application/xhtml+xml,text/
html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
Cookie __utmz=179778278.1194370023.1.1.utmccn=(direct)|utmcsr=(direct)|
utmcmd=(none);
__utma=179778278.1720481230.1194370023.1194705113.1194867654.4;
JSESSIONID=C7D466A65A04E42E8C4053A4F02B5455; __utmc=179778278


On Nov 12, 2:28 am, kilkenny <a.bue...@gmail.com> wrote:
> Hi
>
> What you are describing sounds very much like a uppercase/lower case
> issue. The welcome-file is called 'MyApplication.html' in the
> descriptor file, maybe it is 'myapplication.html' on the disk? The
> server on Windows will find the file just fine, the one on Linux
> won't. It is not necessary the welcome-file itself, but most likely
> some resource your application depends on. Check the naming of the JS,
> HTML, CSS and graphics files your application is using.
>

> Installhttp://www.getfirebug.com/and see what your application is

Milan Jaric

unread,
Nov 12, 2007, 2:19:52 PM11/12/07
to Google-We...@googlegroups.com
it looks like you have made an application without namespace, try this:
unpack war file, then open MyApplication.html file
find script tag witch may look like this:
<script type="text/javascript" src="/gwt.js"></script>
or it is like this
<script type="text/javascript" src="gwt.js"></script>

if it is as in first case, remove extra slash so it looks like other one.
or try this:
http://www.myserver.com/MyApplication/gwt.js to see if you are geting 404 File not found... blabla

I sugest you to, if you are using windows, install fiddler so you can proxy and sniff all http request from your browser. That way you can see what file is missing (or request is refered to wrong url) or if you are using mozilla firefox install firebug extension ( same reson )

Accept-Charset  ISO-8859-1,utf-8;q= 0.7,*;q=0.7
Reply all
Reply to author
Forward
0 new messages