2012-12-14 13 views
5

私は本当のシンプルなhelloworld.warをubuntu 10.04のglassfish 3.1.2サーバーに配備しようとします。私のPC上では正常に動作しますが、私のサーバーでは常に404ページを取得します。 私のサーバー上にエラーは発生しません。誰にもアイデアはありますか?GlassFish 3.1.2は展開時にエラーなしで404を提供します

私は別の奇妙な動作に気付きました。私のサーバーの再起動後、私は管理コンソールにログインできません。私はいつも認証に失敗しましたあなたのユーザー名とパスワードを再入力してください。グラスフィッシュを再起動すると再び動作します。

これはよく知られていますが、彼のソリューションが私をどのように助けてくれるのかわかりません。 glassfish autodeploy gives 404 with simple app

[#|2012-12-14T02:53:30.368+0100|INFO|glassfish3.1.2|org.glassfish.admingui|_ThreadID=71;_ThreadName=Thread-2;|uploadFileName=HelloWorld-1.0-SNAPSHOT.war|#] 

[#|2012-12-14T02:53:30.605+0100|INFO|glassfish3.1.2|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=135;_ThreadName=Thread-2;|Mojarra 2.1.6 (SNAPSHOT 20111206) für Kontext '/HelloWorld-1.0-SNAPSHOT' wird initialisiert.|#] 

[#|2012-12-14T02:53:30.729+0100|INFO|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=135;_ThreadName=Thread-2;|WEB0671: Loading application [HelloWorld-1.0-SNAPSHOT] at [/HelloWorld-1.0-SNAPSHOT]|#] 

[#|2012-12-14T02:53:30.883+0100|INFO|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=135;_ThreadName=Thread-2;|HelloWorld-1.0-SNAPSHOT was successfully deployed in 482 milliseconds.|#] 

いるindex.xhtml

<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" 
     xmlns:h="http://java.sun.com/jsf/html"> 
    <h:head> 
     <title>Facelet Title</title> 
    </h:head> 
    <h:body> 
     Hello from Facelets 
    </h:body> 
</html> 

web.xmlの

<?xml version="1.0" encoding="UTF-8"?> 
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> 
<context-param> 
    <param-name>javax.faces.PROJECT_STAGE</param-name> 
    <param-value>Development</param-value> 
</context-param> 
<servlet> 
    <servlet-name>Faces Servlet</servlet-name> 
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
    <load-on-startup>1</load-on-startup> 
</servlet> 
<servlet-mapping> 
    <servlet-name>Faces Servlet</servlet-name> 
    <url-pattern>/faces/*</url-pattern> 
</servlet-mapping> 
<session-config> 
    <session-timeout> 
     30 
    </session-timeout> 
</session-config> 
<welcome-file-list> 
    <welcome-file>faces/index.xhtml</welcome-file> 
</welcome-file-list> 
</web-app> 

答えて

0

私はこれを試してみてください...あなたは顔と呼ばれるディレクトリにいるindex.xhtmlを持っていないと思います:

<welcome-file-list> 
    <welcome-file>index.xhtml</welcome-file> 
</welcome-file-list> 
+0

私は試しましたが、 変化する。 – halber

+0

ok ..私はそれがとにかく動作することに気づいた...あなたはどのURLを呼びますか? – unwichtich

+0

over Application - >私にIPを与えるランチ:8080/HelloWorld-1.0-SNAPSHOT しかし、私はIP:8080/HelloWorldも試しました。 – halber

関連する問題