2015-02-23 71 views
0

我試圖運行一個簡單的hello世界web應用程序,以確保我有一切正確的結構。404上weblogic你好世界應用程序

下面是我得到了什麼:

ear_test.ear 
ear_test.ear/META-INF 
ear_test.ear/META-INF/application.xml   
ear_test.ear/META-INF/MANIFEST.MF 
ear_test.ear/META-INF/weblogic-application.xml  
ear_test.ear/test_web_project_1.war 
ear_test.ear/test_web_project_1.war/META-INF 
ear_test.ear/test_web_project_1.war/META-INF/MANIFEST.MF 
ear_test.ear/test_web_project_1.war/WEB-INF/classes 
ear_test.ear/test_web_project_1.war/WEB-INF/lib 
ear_test.ear/test_web_project_1.war/WEB-INF/web.xml 
ear_test.ear/test_web_project_1.war/helloWorld.jsp 

的application.xml

<?xml version="1.0" encoding="UTF-8"?> 
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"> 
    <display-name>ear_test</display-name> 
    <module> 
    <web> 
     <web-uri>test_web_project_1.war</web-uri> 
     <context-root>/test_web_project_1</context-root> 
    </web> 
    </module> 
</application> 

的weblogic-application.xml中

<?xml version="1.0" encoding="ISO-8859-1"?> 
    <weblogic-application> 
     <session-descriptor> 
      <cookie-name>WLSSessionID</cookie-name> 
      <cookie-http-only>false</cookie-http-only> 
      <debug-enabled>false</debug-enabled> 
      <sharing-enabled>true</sharing-enabled> 
     </session-descriptor> 
    </weblogic-application> 

的web.xml

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> 
    <display-name>test_web_project_1</display-name> 
    <welcome-file-list> 
    <welcome-file>index.html</welcome-file> 
    <welcome-file>index.htm</welcome-file> 
    <welcome-file>index.jsp</welcome-file> 
    <welcome-file>default.html</welcome-file> 
    <welcome-file>default.htm</welcome-file> 
    <welcome-file>default.jsp</welcome-file> 
    <welcome-file>helloWorld.jsp</welcome-file> 
    </welcome-file-list> 
</web-app> 

我可以將其部署到weblogic並顯示爲活動狀態。

然而,當我嘗試訪問web應用程序,通過:

http://myserver:7011/test_web_project_1

我得到一個404錯誤。

有關解決此問題的任何建議嗎?

+0

端口7011表示您希望將其部署到多服務器域中的託管服務器。您確定部署針對的是正確的服務器/集羣而不是錯誤的管理服務器? – 2015-02-24 11:23:07

+1

當您嘗試訪問它時,您在weblogic日誌中看到了哪些錯誤? – 2015-02-24 18:30:50

+0

在URL中使用了錯誤的服務器...... :( – dwjohnston 2015-03-05 04:02:56

回答

0

再次檢查您的URL,確保您實際上引用了您的應用程序所在的服務器的正確URL。