Application works locally, but not from remote server?

214 views
Skip to first unread message

BobWirka

unread,
Apr 28, 2011, 2:32:54 PM4/28/11
to Google Web Toolkit
I've created a GWT Java Application from the wizard (the one with the
Click Me! button). It compiles, and if I open the html file from
Firefox, all is good; the button appears as does the popup dialog box
when the button is clicked.

However, when the files are ftp'd to my web hosting service the button
does not appear. The web page is found and loaded, but the GWT button
does not display.

Windows Internet Explorer behaves the same way.

Google Chrome will not even display the button locally, though the
page does load.

There are no elements in the html <body>, as I'd like to generate a
purely javaScript html element to be a part of a larger html page.

Would anyone know why this may be happening? I've transferred the
whole war directory to the web host, but no luck yet.

Thanks,

Bob Wirka

BobWirka

unread,
Apr 28, 2011, 7:26:41 PM4/28/11
to Google Web Toolkit
UPDATE: The problem was that the contents of the war folder were
placed in a sub folder one level below the root of my hosting area.
Apparently, you could load the html file, but the javascript was not
found. When the files were placed at the root of my area, it worked
properly.

I've tried various combinations of path for the javascript within the
html file, but nothing seems to work when the files are not at root
level. I'd really like to know "the rules" regarding where the html
can be located, how the javascript is pathed, and whether this problem
can be avoided by creating a source code path that generates a proper
path within the war folder.

Thanks,

Bob Wirka

Karl Meiser

unread,
Apr 28, 2011, 6:56:06 PM4/28/11
to google-we...@googlegroups.com
Bob,

Does your hosting service provide Tomcat or something similar? The HTML won't just work by itself unfortunately.

I can try to help you more but I need more information.

Karl


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Bob Wirka

unread,
Apr 29, 2011, 11:27:06 AM4/29/11
to google-we...@googlegroups.com
Karl,

I'm hosted by GoDaddy; it's their Linux host, and I don't know which http server they're running. I do not have any server-side cgi capabilities (I've got the basic package).

What I tried to do was put the GWT application in a folder under the root of my ftp area:

/
  |
  |
  /cgi
     
TestModule.html
     
TestModule.css
      /com.TestModule
         com.
TestModule.nocache.js
         <other stuff from war>

So, I'd direct my browser to "www.rtcworks.com/cgi/TestModule.html". The browser would find the html, but not the javascript.

If the files are moved to the root directory:

/
  |
  |
  
TestModule.html
  
TestModule.css
   /com.
TestModule
     com.TestModule.nocache.js
      <other stuff from war>

The whole thing works.

Since my application is in the "com" package in my Eclipse project, I'm wondering if there's a problem associated with the package path?

I've tried changing the html link from <script language="javascript" src="com.TestModule/com.TestModule.nocache.js"></script> to <script language="javascript" src="cgi/com.TestModule/com.TestModule.nocache.js"></script> (and other variations of path), but without success. It's up there now, so you could actually go to rtcworks.com/cgi/TestModule.html and see it misbehaving.

I'd just like to understand this so I can partition my host data and reduce clutter.

Thanks again for your response.

Best regards,

Bob Wirka

Bob Wirka

unread,
Apr 29, 2011, 11:29:35 AM4/29/11
to google-we...@googlegroups.com
Karl,

The application is under the root, too; so you can go to http://www.rtcworks.com/TestModule.html and see it working.

Bob

On Thu, Apr 28, 2011 at 5:56 PM, Karl Meiser <karl...@gmail.com> wrote:

Bob Wirka

unread,
Apr 29, 2011, 11:42:19 AM4/29/11
to google-we...@googlegroups.com
Karl,

Don't mean to pester, but interestingly the subdirectory setup works on one of my local machines running Boa (a small web server).

So, *some* web servers can handle the subfolder location.

Thanks again,

Bob

On Thu, Apr 28, 2011 at 5:56 PM, Karl Meiser <karl...@gmail.com> wrote:

David Chandler

unread,
Apr 29, 2011, 12:19:39 PM4/29/11
to google-we...@googlegroups.com
Bob, someone else on the forum recently had an issue with GoDaddy hosting, too. If you want to try to debug, have a look at 


Otherwise may I recommend Google App Engine? ;-)

/dmc
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools
Reply all
Reply to author
Forward
0 new messages