Reputation: 27296
I am using Eclipse 3.7.2 with JBoss Tools 3.3 under Ubuntu 12 and have configured a locally installed copy of JBoss AS 7.1.1 in Eclipse under "Preferences::Server::Runtime" Environments.
However, when trying to run a Java EE application by double-clicking on the project or an .xhtml page I only see "Run As / Run" on Server as an option and I get an HTTP 404 from Apache Tomcat/7.0.26 at localhost:8080. That is, it seems like Eclipse is trying to deploy to a Tomcat server as opposed to the JBoss AS I have configured in "Preferences::Server::Runtime" and I don't get an option like "Run on JBoss" or anything. When I export my application as a war and manually deploy to JBoss AS the app runs fine.
Upvotes: 0
Views: 1046
Reputation: 38163
The idea is to add your application to a specific server that you have configured. Additionally; just adding the server runtime isn't enough.
You need to open the Servers view, and from there right click on the background and select New
, and then Server
. If you choose JBoss Community -> JBoss AS 7.1 here, you can select your previously created Server runtime in the Server runtime environment
, or optionally create a new one.
Then comes the mental twist that you need to make. In WTP you don't use the Run As
command, but instead right click the server in the Servers view (default name should be JBoss 7.1 Runtime Server
, and select Add and Remove
. Select one or more applications from your workspace that you would like to run on your server. Click finish when done.
Now right click again on your server, and choose either Start
or Debug
.
Upvotes: 2