当前位置: 技术问答>java相关
如果一个Form中的数据要通过https提交到服务器端,应该用什么方法
来源: 互联网 发布时间:2015-08-14
本文导语: 如 中method 应该为什么呢? 我用method="post" 结果servlet 中就使得不到值!! 谢谢了!!!!! | this is from Tomcat doc: To install and configure SSL support on Tomcat 4, you need to follow these simple steps. F...
如
中method 应该为什么呢?
我用method="post" 结果servlet 中就使得不到值!!
谢谢了!!!!!
中method 应该为什么呢?
我用method="post" 结果servlet 中就使得不到值!!
谢谢了!!!!!
|
this is from Tomcat doc:
To install and configure SSL support on Tomcat 4, you need to follow these simple steps. For more information, read the rest of this HOW-TO.
1.Download JSSE 1.0.2 (or later) from http://java.sun.com/products/jsse/ and either make it an installed extension on the system, or else set an environment variable JSSE_HOME that points at the directory into which you installed JSSE.
2.Create a certificate keystore by executing the following command:
Windows:
%JAVA_HOME%binkeytool -genkey -alias tomcat -keyalg RSA
Unix:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA
and specify a password value of "changeit".
3.Uncomment the "SSL HTTP/1.1 Connector" entry in $CATALINA_HOME/conf/server.xml and tweak as necessary.
To install and configure SSL support on Tomcat 4, you need to follow these simple steps. For more information, read the rest of this HOW-TO.
1.Download JSSE 1.0.2 (or later) from http://java.sun.com/products/jsse/ and either make it an installed extension on the system, or else set an environment variable JSSE_HOME that points at the directory into which you installed JSSE.
2.Create a certificate keystore by executing the following command:
Windows:
%JAVA_HOME%binkeytool -genkey -alias tomcat -keyalg RSA
Unix:
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA
and specify a password value of "changeit".
3.Uncomment the "SSL HTTP/1.1 Connector" entry in $CATALINA_HOME/conf/server.xml and tweak as necessary.
|
原则上无论post和get,Servlet都肯定能得到,我看问题应该出在response和request的定义上,似乎只有HttpServlet的request和response才能获取到,如果简单的用ServletRequest(Response)老会有这样那样的问题
另外doGet和doPost的方法中可以不用写啦,直接在Service中看看能不能取得
另外doGet和doPost的方法中可以不用写啦,直接在Service中看看能不能取得