我是新手,不知道如何实现跳转
test.jsp代码:
<f:view>
   <h:form>
   <h:commandButton action="paramjsf" 
   actionListener="#{jsfbean.paramjsf}"
   value="test"></h:commandButton>
   </h:form>
</f:view>点击按钮可以进入action方法,
action的代码:import javax.faces.event.ActionEvent;public class jsfbean {
public String paramjsf(ActionEvent event){
if(1 != 1){
return "success";
}
System.out.println("start jsf.....");

return "error";
}
}返回一个字符串“error”,希望能够跳转到在faces-config.xml中配置的跳转页面中,但始终无法跳转,总是显示本身的那个提交按钮的页面;
faces-config.xml的配置:
<managed-bean>
<managed-bean-name>jsfbean</managed-bean-name>
<managed-bean-class>
jsf.jsfbean
</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<!--<from-view-id>/jsf/*</from-view-id>-->
<from-view-id>/public/test.jsp</from-view-id>
<navigation-case> <from-action>paramjsf</from-action>
<from-outcome>success</from-outcome>
<to-view-id>/systemcms/public/test.jsp</to-view-id>
<redirect />
</navigation-case>
<navigation-case>
<from-action>paramjsf</from-action>
<from-outcome>error</from-outcome>
<to-view-id>/systemcms/errorpage/404error.jsp</to-view-id>
<redirect />
</navigation-case>
</navigation-rule>运行到test.jsp页面时查看源代码,发现<h:form>的action是指向本身页面的url,比如test.jsp的路径是:/public/test.jsp,action的值就是:/public/test.jsf;希望各位高手指点下,我都弄了好久了,,快要崩溃了啊~~~~~~