Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Trouble getting code to run on local Apache
Trouble getting code to run on local Apache [message #871676] Mon, 14 May 2012 17:04 Go to next message
Ben Green is currently offline Ben GreenFriend
Messages: 3
Registered: May 2012
Junior Member
Fresh install of latest JDK, Eclipse EE, and Tomcat Apache 7.

I have added the Tomcat server in the server view in Eclipse. I can start and stop the server.

I have created a dynamic web project named HelloWorld. I created one file in the WebContent folder called demo.html. Contents of file:

Quote:

<html>
<head>
<title>Simple</title>
</head>
<body>
<script>
alert("Hello World!");
</script>
</body>
</html>


I right-click on demo.html and choose Run As > Run on Server. I select my only server, Tomcat v 7.0 Server at localhost (which shows is started), and click Finish. A new tab opens in the editor? view. I'm not sure what this view is called, but it's the main one in the middle where all the code editing occurs. This is the result:

The URL is: h t t p : //localhost:8080/HelloWorld/demo.html
** This is my first post so I guess I am not allowed to post a URL, although that seems like a possible source of the problem. I've include some extra spaces to get through the filter.

Quote:

HTTP 404 Not Found

The webpage cannot be found HTTP 404

Most likely causes:
•There might be a typing error in the address.
•If you clicked on a link, it may be out of date.

What you can try:
Retype the address.
Go back to the previous page.
Go to and look for the information you want.


I know this code works because I can right-click on it and choose open with Web Browser. This opens a new tab also in the editor(?) view, with a pop-up window with title "Message from webpa..." and the window includes the statement "Hello World!" with an OK button.

Can anyone provide any insight as to why I am getting the message "Webpage cannot be found." ??






Re: Trouble getting code to run on local Apache [message #874909 is a reply to message #871676] Mon, 21 May 2012 19:25 Go to previous messageGo to next message
Ben Green is currently offline Ben GreenFriend
Messages: 3
Registered: May 2012
Junior Member
Solution found here around 7:16 --
h t t p://www.youtube.com/watch?v=b42CJ0r-1to&list=PLE0F6C1917A427E96&index=1&feature=plpp_video

The solution is to change the server location settings. Right-click Tomcat server in the Eclipse server list, and click Open. Change server location to "User tomcat installation" and then it works.
Re: Trouble getting code to run on local Apache [message #874910 is a reply to message #874909] Mon, 21 May 2012 19:26 Go to previous message
Ben Green is currently offline Ben GreenFriend
Messages: 3
Registered: May 2012
Junior Member
That's right, OP delivered.
Previous Topic:Have no idea what to do after d/l the zip file
Next Topic:Installing Indigo on a notebook
Goto Forum:
  


Current Time: Thu Apr 25 13:32:47 GMT 2024

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

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

Back to the top