Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java Security  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 关于SSL加密的初次实践的问题
worldcreatxr





发贴: 149
积分: 0
于 2004-07-13 17:12 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
=========这是一个很简单的登陆表单 login.jsp
<form action="authenticator.jsp" method="post">
  <input type="text" name="username" value="root">
  <input type="password" name="userpass" value="root">
  <input type="submit">
</form>
===============这是一个很简单的处理 authenticator.jsp
<%
  String username = (String) request.getParameter("username");
  String userpass = (String) request.getParameter("userpass");

  if (!username.equals(userpass)) {
    out.println(username);
    out.println(userpass);  
  }
%>
======================
当我把这两个同时置于ssl保护下<url-pattern>*.jsp</url-pattern>时,是正常的

但是,当我仅仅只把authenticator置于ssl保护下时 取到的username及userpass都是null
if (!username.equals(userpass)) { 这句就出错了.
不知是何原因,怎么才能取到值?

以此为例, 如果我要保护提交的表单<url-pattern>应设成哪个? 是login.jsp吧

还有<url-pattern>设为具体的url时, 不加 / 会出错
设成通配符形式时, 加 / 会出错?

使用的是 tomcat 5.0.24



我是世界的缔造者!
作者 Re:关于SSL加密的初次实践的问题 [Re:worldcreatxr]
l201l





发贴: 1
积分: 0
于 2004-09-12 20:36 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
请问你的证书怎么生成的啊?



flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923