<f:view> <h:form> <h:inputText id="number1" value="#{calcBean.number1}"/>+ <h:inputText id="number2" value="#{calcBean.number2}"/> <h:commandButton id="submit" action="#{calcBean.calc}" value="加算" /> </h:form> <h:messages /> </f:view>