2012-04-24 115 views
6

我剛剛爲玻璃魚部署了一個應用程序。我做了什麼,我做了一個目錄結構。 HelloWorld-> index.jsp,WEB-INF-> sun-web.xml,web.xml。我的index.jsp僅僅是打印的HelloWorld在glassFIsh中部署應用程序後出現錯誤

<%@page contentType="text/html"%> 
<%@page pageEncoding="UTF-8"%> 
<html> 
    <head> 
     <title>Hello World! Page</title> 
    </head> 
    <body> 
     <h1>Hello World!</h1> 
    </body> 
</html> 

然後我去的HelloWorld目錄,併發出以下命令

jar cvf helloworld.war . 

戰爭文件被創建的頁面。然後,我使用管理控制檯將應用程序部署到GlassFish。在我寫的/ HelloWorld的上下文中。但後來我試圖打開使用 http://localhost:8080/HelloWorld/

然後我得到了

type Exception report 
message 
descriptionThe server encountered an internal error() that prevented it from fulfilling this request. 
exception 

org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required 

我的道路環境設置爲

;C:\Program Files\Java\jdk1.6.0_06\bin;C:\Program Files\glassfish-3.0.1\bin; 

我對Java類路徑,爲什麼錯誤的應用程序我我得到這個錯誤?我使用Windows 7

感謝

回答

2

只需指定不含空格的路徑即可。

首先創建符號鏈接

mklink /D c:\as_java C:\Program Files\Java\jdk1.6.0_06\ 

,並創建和可變AS_JAVA設置環境到c:\ AS_JAVA

0

去GFdirectory /斌/ asadmin.bat文件,並手動替換所有的出現次數的

set JAVA=<...> 

set JAVA="<absolute_java_path>\bin\java" 

hardcoding always works 100%=)

相關問題