如何在Oracle Weblogic管理员控制台上正确部署EAR文件 [英] How to correctly deploy a EAR file on Oracle Weblogic administrator console

查看:169
本文介绍了如何在Oracle Weblogic管理员控制台上正确部署EAR文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从我现有的 maven Web应用程序构建的 EAR 文件。我想在 Oracle Weblogic Server管理控制台上部署相同。为了继续下去,我在 http:// localhost:7001 / console 上登录到weblogic conole,并转到部署选项卡。以前,我已将 EAR 文件放在我的 Oracle_Middleware\domain\mydomain\base\applications 文件夹中。在部署部分的控制台上,我可以选择 myprojectname.ear ,当我选择我可以选择 install 。所以在我安装完毕后,一切正常,我如何访问我的 web项目中的第一个屏幕的 index.jsp / code>?当我在部署选项卡中展开 myprojectname 的树时,我会找到一些东西 - >选择 myprojectnameWAR module-> go到测试标签 - >和测试点下,我看到一个出现的URL。但是当我点击该网址进行访问时,打开的网页会显示错误403 - 禁止。有关如何访问管理员控制台上的 index.jsp 的帮助?

I have an EAR file that I have built from my existing maven web application. I want to deploy the same on the Oracle Weblogic Server Administration Console. To go ahead with that, I logged in to the weblogic conole on http://localhost:7001/console and went to the deployments tab. Previously, I had placed the EAR file in my Oracle_Middleware\domain\mydomain\base\applications folder. In the deployments section, on the console, I get to chose myprojectname.ear and when I select that I get an option to install. So after I install the same, and everything happens properly, how do I be access my index.jsp that was the first screen in my web project? I do find something when I expand myprojectname's tree in the deployment tab-> select the myprojectnameWAR module-> go to the testing tab-> and under test point I see a URL that is present it. but when I click that URL to access it, the webpage that opens up says Error 403--Forbidden. Any help on how I can access the index.jsp on the administrator console?

更新-1

我想指出,我试图使用URL http:// localhost:7001访问应用程序/ projectnameEAR http:// localhost:7001 / projectname 等等,但只是看看它,我尝试导入 EAR 文件到eclipse的新工作区也可以看到 index.jsp 实际上是否存在于 EAR 。但是当我导入它,我可以看到的是$ code> WARModule快照 JAR模块。我希望 index.jsp 在那里,因为我从现有的Web应用程序中获得了 EAR code> index.jsp的。或者也许,它在那里,但是$ EAR 文件不允许我看到它?请帮助您了解如何访问 index.jsp 页面。
我非常需要。

I'd like to point out that I was trying to access the application using the URL http://localhost:7001/projectnameEAR and http://localhost:7001/projectname etc. But just to take a look at it, I tried importing the EAR file into a new workspace on eclipse too see if the index.jsp actually existed in the EAR. But when I import it, all I can see is the WARModule snapshot and the JAR Module. I expected the index.jsp to be there because I obtained the EAR file from an existing web application that had the index.jsp. Or perhaps, it is there but the EAR file does not allow me to see it? Please help regarding how to access the index.jsp page. Im in much need.

更新-2

所以在尝试了一切之后,我创建了一个空白在eclipse中的maven项目,构建了 .war .jar .ear 模块,将 .jar .war 模块添加为 ear 项目,并通过eclipse运行一个maven clean安装。此外,我把 .ear 文件放在应用程序文件夹中,并运行URL访问 index.jsp war 模块中,放在 src / main / webapp / 它工作。

So after trying everything out, I created a blank maven project in eclipse, built .war, .jar and .ear modules out of it, added the .jar and the .war modules as dependencies to the ear project and ran a maven clean install through eclipse. Further, I took the .ear file and put it in the applications folder and ran the URL to access the index.jsp in the war module, placed at src/main/webapp/ and it worked.

我继续复制粘贴了我现有的 maven项目的内容(即 jsps js的到相同的 src / main / webapp / 目录还把我所有的包含我的 java类并将它们放在 warmodule / src中/ main / java 路径,但现在如果我去运行我的 index.jsp ,我可以看到UI,但$ chrome调试器显示一个 404 - 当我尝试访问页面的任何功能(按钮点击等)时,找不到错误是因为我可能把课错了吗?

I went ahead and copy pasted the contents of my existing maven project (i.e. the jsps, the js's, to the same src/main/webapp/ directory. I also took all my packages that contained my java classes and put them in the warmodule/src/main/java path. But now if I go to run my index.jsp, I get to see the UI but the chrome debugger shows me a 404 - Not found error when I try to access any of the functionalities(button click etc.) of the page. Is it because I have probably put the classes in the wrong place?

我现有的项目由 existingproject / src / 路径和所有其他 jsps js的 existingproject / WebContent 路径中的c>

My existing project consists of packages in the existingproject/src/ path and all the other jsps and js's in the existingproject/WebContent path.

有人可以帮助我在哪里$ c>路径中的哪个模块)我应该把我所有的内容放在正确的位置吗?

Could somebody help me with where exactly (at which path in which of the modules) should I be putting all of my content so that it is accessible properly?

非常感谢

推荐答案

而不是填写我的想法我会写这个作为答案,并更新它,因为我们走。

Rather than filling up the comments I thought I would write this as an answer and update it as we go.

看看部署在-jboss-as7>。当我有一个类似的问题时,我发布了一段时间。也许会有所帮助。

Have a look at this question. I posted this a while ago when I had a similar issue. Maybe it will help.

另外,这里是关于weblogic maven插件的另一个链接。可能值得尝试使用。根据我对JBoss的经验,我发现它比使用管理控制台部署更可靠。如果没有其他的话,如果有问题,应该提供更多有用的错误信息。

Also, here is another link about the weblogic maven plugin. It may be worth trying to use this. In my experience with JBoss I found it more reliable than trying to deploy using the admin console. If nothing else it should give more helpful error messages if there is a problem.

更新:

所以我看了我的项目,这里是EAR pom.xml的相关部分。

Ok, so I had a look at my project and here is the relevant part of the EAR pom.xml

<modules>
  <webModule>
    <groupId>com.traintrack</groupId>
    <artifactId>traintrack-web</artifactId>
    <contextRoot>/TrainTrack</contextRoot>
  </webModule>
  <jarModule>
    <groupId>com.traintrack</groupId>
    <artifactId>traintrack-core</artifactId>
    <bundleDir>lib</bundleDir>
  </jarModule>
etc
</modules>

我感觉到contextRoot属性可能是您需要设置的。所以在我的情况下,我会把我的浏览器指向 http:// localhost:8080 / TrainTrack 。然后,EAR将以这样一种方式进行部署,使其知道任何与该上下文根的东西将被转发到WAR。

I get the feeling that the contextRoot attribute may be what you need to set. So in my case I would point my browser to http://localhost:8080/TrainTrack. The EAR will then be deployed in such a way that it knows anything with that context root is to be forwarded to the WAR.

希望有帮助,如果不是,请发布您的pom.xml文件,我们可以通过他们,也许在聊天,如果适合。

Hope that helps, if not please post your pom.xml files and we can go over them, maybe in chat if that suits.

这篇关于如何在Oracle Weblogic管理员控制台上正确部署EAR文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆