关于用jboss按浏览器后退按钮后,再提交的问题.
下面是个例子来说明这种情况:(用过jbpm-starters-kit-3.1.2的也可以试试,它自带的例子似乎也有这种问题)
hello.jsp:<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
<HTML>  
    <HEAD> <title>Input Name Page</title> </HEAD>  
    <body bgcolor="white">  
    <f:view>  
      <h:form id="helloForm">  
      <h:commandLink value="Say hello" action="sayhello"></h:commandLink>  
      <h:commandLink value="Say hello2" action="sayhello"></h:commandLink>  
 </h:form>  
 </f:view>  
    </body>  
</HTML> sayhello.jsp<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
 
<f:view>  
  <h3>  
  <t:outputText value="hello"/>  
  </h3>  
</f:view> 
 
faces-config.xml:
[code]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config 
PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                            "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
 
<navigation-rule>
<from-view-id>/test/hello.jsp</from-view-id>
<navigation-case>
<from-outcome>sayhello</from-outcome>
<to-view-id>/test/sayhello.jsp</to-view-id>
<redirect />
</navigation-case>
</navigation-rule>
 
</faces-config>web.xml: <listener>
<listener-class>
org.apache.myfaces.webapp.StartupServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>FacesServlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>LogFilter</filter-name>
<filter-class>com.recency.XY0631.filter.LogFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LogFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>我在后台加了个LogFilter,用来记录请求的url
现在情况这样:
1,新打开一个ie,然后我输入...hello.jsp,后台log显示请求url=.../hello.jsp
2,然后我点其中一个link
后台log显示请求url=../sayhello.jsp,这时候页面跳转到sayhello.jsp
3,然后我按浏览器的"后退",这时候没有向后台发数据,也没有log,这时候页面回到.../hello.jsp
4,我点击其中一个连接,这时候后台的log显示是url=../hello.jsp,这时候也没有跳转(感觉这个过程就像第一个过程)
5,我再点击一次,log显示请求url=../sayhello.jsp,这时候页面跳转到sayhello.jsp了也就是说,按浏览器的后退按纽后,需要再点击2次才能提交(我试过用tomcat,没有这种问题),
怎么解决,急问高人解决方案,谢谢了