• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem running webapp on remote server

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got tomcat 6 installed on my server,
so the address http://<server ip>:8080/
gives me the tomcat page, that's good.

I created a simple test app for tomcat that I run on my ubuntu desktop (tomcat is also installed on the desktop machine) so the link:

http://localhost:8080/EclipseServlet...pseFirstSevlet

gives me the proper output (note the misspelled "sevlet", whoops...)

however the link:

http://<ip address of server>:8080/EclipseServletTest/EclipseFirstSevlet

does not give me the correct output. I have the Webapp folder copied to the tomcat/webapps folder and I restarted the server...any idea what the problem might be?
bp
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Edmund Castermund wrote:http://localhost:8080/EclipseServlet...pseFirstSevlet
gives me the proper output (note the misspelled "sevlet", whoops...)
however the link:
http://<ip address of server>:8080/EclipseServletTest/EclipseFirstSevlet
does not give me the correct output. I have the Webapp folder copied to the tomcat/webapps folder and I restarted the server...any idea what the problem might be?



I don't think I understand it well, Are you talking about two machines (server & Desktop) ? If so are you able to access the index page of the Tomcat in your Desktop?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anything in the logs? You're giving us essentially nothing to go on.
 
Edmund Castermund
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
thanks for the replies.
I first created the test webapp on my desktop with tomcat running there...it worked. I then installed tomcat on my server, and got the tomcat startup page to appear, so tomcat was installed correctly and running on my server.

I then copied the test-webapp folder from my desktop/tomcat-install-folder/webapps to my server/tomcat-install-folder/webapps and tried to run it from there....I wasn't able to.
I get the following 404 message

HTTP Status 404 - /EclipseServletTest/EclipseFirstSevlet

type Status report

message /EclipseServletTest/EclipseFirstSevlet

description The requested resource (/EclipseServletTest/EclipseFirstSevlet) is not available.

there is this in the log....


I haven't seen the "address already in use" error before...that has to do with startup, not copying the webapp folder, right?
hope that clarifies
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That means there's already a server running on that address (port). Maybe you need to shut it down before starting it.
 
Edmund Castermund
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but why would the regular startup screen work fine, while the testapp webapp wasn't visible?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No clue. Maybe because the server's already running and has an index.html in the root webapp, and it's *still* running, because it was never shut down.

At least one port is in contention.
 
Edmund Castermund
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
theoretically, though....
I should be able to copy some app folder from the tomcat/webapps folder on one machine to the tomcat/webapps folder on another machine and have it run, right?

I'm assuming that's how people deploy their actuall apps....
bp
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In theory, sure, although it often requires a restart.
 
Edmund Castermund
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
that's the thing....I did restart the server....I'll have to look through the web.xml more carefully, or just try a new one.
bp
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java-based web applications are typically "deployed" by dropping the WAR file in the webapps folder. Copying entire folders with source code is typically not the normal course of action.

I would suggest that you create a WAR file for the web application and put that in the webapps folder. The web server should see the new WAR and "explode" it automatically.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Edmund Castermund wrote:that's the thing....I did restart the server....I'll have to look through the web.xml more carefully, or just try a new one.


It didn't restart if there was a port contention issue.
 
reply
    Bookmark Topic Watch Topic
  • New Topic