- 論壇徽章:
- 0
|
正在學(xué)習(xí)j2ee中的JavaServer Faces技術(shù),跟著sun 那本JavaEE教學(xué) 那本書在走。
用的是j2ee缺省的應(yīng)用服務(wù)器,系統(tǒng)為xp,在本地進(jìn)行調(diào)試, 用Microsoft IE。
很簡單的一個(gè)guessNumber程序,為什么總是提示文件下載,而不顯示web page?
而普通的jsp web page沒有問題。
那位高手幫忙看看,是不是什么地方系統(tǒng)或者應(yīng)用服務(wù)器配置有問題?
index.jsp
...
<jsp:forward page="guess/greeting.jsp" />
greeting.jsp:
<HTML xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<HEAD> <title>Hello</title> </HEAD>
<%@ page c %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<body bgcolor="white">
<f:view>
<h:form id="helloForm" >
<h2>Hi. My name is Duke. I'm thinking of a number from
<h utputText lang="en_US" value="#{UserNumberBean.minimum}"/> to
<h utputText value="#{UserNumberBean.maximum}"/>. Can you guess
it?</h2>
<h:graphicImage id="waveImg" url="/wave.med.gif" alt="Duke waving" />
<h:inputText id="userNo" label="User Number" value="#{UserNumberBean.userNumber}"
c>
<f:validateLongRange minimum="#{UserNumberBean.minimum}" maximum="#{UserNumberBean.maximum}" />
</h:inputText>
<h:commandButton id="submit" action="success" value="Submit" />
<p>
<h:message style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique; text-decoration: overline" id="errors1" for="userNo"/>
</p>
</h:form>
</f:view>
</body>
</HTML> |
|