I have 2 different web projects in eclipse..For a jsp file in one web project, I am able to select Run As-->Run on Server. But, For a jsp file in other web project, I am NOT able to select Run As-->Run on Server. I see Run Configurations instead of Run on Server..Tomcat is installed..If I deploy both of these projects, they are working fine. Please le me know why I am not able to see Run As-->Run on Server.Thanks !!
Has the second project, the one that doesn't present the "Run As > Run on Server" option, been added to the server? You can determine whether the project has been added to the server and add it if it hasn't been by:
Add the server(s) view: select the Eclipse main menu item Window, Show View, Servers
With the servers tab selected in the bottom panel, right click on your server, select "Add and Remove"
You can use the resulting Add/Remove tool to add the second project to the Server.
Once the project has been added to the server, you should get the "Run As>Run on Server" option.
Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
Joined: Sep 23, 2010
Hi Greg, I tried that option already. I have attached the screenshots for the same. Please let me know if I need to do anything else.
Joined: Oct 24, 2010
I can't read your screenshots too well, but it's not your fault. It's a combination of bad eyes and low-res monitor at my end. Even so, I can tell from the pictures that I would be doing what you're trying to do differently. Mine may not be the right way or yours the wrong - just different.
To "run" that jsp file on the Tomcat server, I would open a browser and point to it using the address:
8080 - you may have changed this to another port as occasionally suggested by some
projectname - change this to you project name
filename.jsp - change this to the name of the jsp that you're trying to run
This assumes your server has been started, no errors, the project has been added to it, etc., etc. If there is something wrong with those assumptions, you'll get an error message from either the browser or the server to get you pointed in the right direction.
I apologize if my answer is limited by my own minimal experience. I'm new at this myself so struggling through many of the same adventures.
Also, I've been having good luck with the typical Eclipse setup, using Web Tools Platform (WTP) and Eclipse's otherwise built-in server support. I've seen others complain about the limitations or bugginess of that setup, recommending the sysdeo Eclipse plugin for Tomcat as a solution. I have no experience with sysdeo so can't recommend one setup over the other.
Joined: Sep 23, 2010
Hi Greg, It works if I deploy into Web/Application server. But, My concern is why I am not able to leverage Run As--> Run on Server feature for only one project. Rest everything works fine.