What needs to be done to add a project to a Websphere Server in Eclipse juno?

◇◆丶佛笑我妖孽 提交于 2021-02-18 20:28:41

问题


I have installed the "WebSphere Application Server Developer Tools for Eclipse V8.5.1" as well as "WebSphere Application Server for Developers V8.5" from here: https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download?lang=en.

I am using Eclipse Juno.

I used the First Steps tool to create a profile for application development.

I added a "WebSphere Application Server v8.5" server to the Server view, pointing it at that profile.

When I right click on the Server in the Servers View and select "Add and Remove..." I get a dialog saying "There are no resources that can be added or removed from the server."

I CAN add my project to a Tomcat server or a "WebSphere Application Server V8.5 Liberty Profile" (I need to use the "real" WebSphere for a host of reasons beyond the scope of this question - Liberty isn't good enough).

What am I missing to get it to let me add my project to the server?


回答1:


I use IBM RSA/RDi/Rational Developer for i (which is built off of Eclipse, and has changed names many times) with WAS 8.0 so not sure if this will apply directly to your situation but what you've written sounds very similar to the trouble I've had in the past...

We setup a "parent" sort of project that contains the EAR that will deploy to WAS and then we have a corresponding "web" application that contains the WAR.

In the parent project, under properties -> deployment assembly, add your "web" project. Also check off your "web" project under Project References.

Hopefully this will cause your app to be deployable to WAS...

Edit I
This is how I created my EAR "parent" project using IBM RSA (which is built off of Eclipse - you may have to adjust some of these settings to apply to your version of Eclipse)
1. Go to File -> New -> Project... and choose Java EE -> Enterprise Application Project
2. Put in an appropriate project name and choose your WebSphere App Server as your target runtime
3. I get prompted with a list of Java EE module dependencies and I choose the web app that will be packaged in the ear; I also choose to "Generate application.xml deployment descriptor"

I'm then able to add the ear to my WAS server.




回答2:


I think eclipse is not recognizing our project as a Dynamic Web Application. I have followed the following steps for fixing this issue.

Select Project ==> Properties ==> Project Facets and make sure Dynamic Web Module check box is checked

It should work.




回答3:


WebSphere Application Server Developer Tools Only let you deploy EARs and not WARs on a standard WAS (on Liberty it let you deploy WARs as well) even though it is possible to deploy WARs using the Admin Console. I got no idea why they have that restriction but it is like that in RAD (Rational Application Developer) as well.




回答4:


1 .right click on project name in «Package Explorer» view. 2. select «Properties» 3. Select «Project Facets» 4. Click on «Runtimes» tab 5. check server 6. Click on «OK»

now

  1. right click on server name in «Servers» view
  2. click on «Add and Remove ...»
  3. move resources to the right column



回答5:


You can't deploy a .war, so create a JavaEE Project and include your web project in it. Then you can deploy your name_JavaProjectEE with the war module inside.



来源:https://stackoverflow.com/questions/13828005/what-needs-to-be-done-to-add-a-project-to-a-websphere-server-in-eclipse-juno

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!