2016-04-14 298 views
2

WAS8.5.5.2にアプリケーションをデプロイします。 - 私はを持ってserverWar.war
---- WEB-INF
---- 'ウェブ' ディレクトリの内容
WebSphere Application Server 8:エラー404:java.io.FileNotFoundException:SRVE0190E:ファイルが見つかりません:

serverEar.ear
:私は、その構造と耳をしましたapplication.xmlに:

<application version="6" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" > 
    <module> 
     <web> 
      <web-uri> serverWar.war</web-uri> 
      <context-root>serverWar</context-root> 
     </web> 
    </module> 

    <library-directory> web/lib</library-directory> 

</application> 

のweb.xml:

IBM /コンソールWASから、私は、アプリケーションをインストールしている

enter image description here

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" 
     version="3.1"> 

    <servlet> 
     <servlet-name>p1</servlet-name> 
     <servlet-class>com.test.Server</servlet-class> 
    </servlet> 

    <servlet-mapping> 
     <servlet-name>p1</servlet-name> 
     <url-pattern>/server</url-pattern> 
    </servlet-mapping> 

    <security-constraint> 
     <display-name/> 
     <web-resource-collection> 
      <web-resource-name/> 
      <description/> 
      <url-pattern>/*</url-pattern> 
      <http-method>POST</http-method> 
      <http-method>GET</http-method> 
     </web-resource-collection> 
     <user-data-constraint> 
      <description/> 
      <transport-guarantee>CONFIDENTIAL</transport-guarantee> 
     </user-data-constraint> 
    </security-constraint> 

</web-app> 

私はディレクトリ構造を持っています。インストールディレクトリは..\Desktop\Test\out\artifacts\serverEarです。私のearファイルが置かれています(インストールディレクトリがこれに影響するかどうかはわかりません)。

アプリケーションが正常にインストールされ、起動されます。

は、私は、URLを試してみました:https://my_server:9443/serverWar/serverと、それは私を与える:私は扱ったことがないError 404: java.io.FileNotFoundException: SRVE0190E: File not found: /server

の前だったと私は間違って行くかもしれない場所を確認していません。

ご意見、ご指摘ありがとうございます。

答えて

0

これで問題は解決しました。問題はcontext rootがserverWarに設定されていないため、serverWar/server URLを認識できませんでした。そこで私はこれらのステップをset context root from IBM consoleに続けました。

Error 404: javax.servlet.UnavailableException: SRVE0200E: Servlet: Could not find required class

我々がIntelliJのは、何らかの理由で作成されていなかったと上記の構造がのために働いている、WEB-INFにclassesディレクトリを持っている必要がありますようだ:

この問題を解決した後、私は別の関連の問題を得ましたWildFlyとWebLogicの両方したがって、WASにearファイルをデプロイする際には、productionディレクトリからクラスをコピーするだけです。私のアプリケーションは期待どおりに動作しました。

上記の変更をすべて行った後、私は正常にURL https://my_server:9443/serverWar/serverにアクセスできます。

これは、WASを初めて使った人に役立ちます。

関連する問題