当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Turbine是apache 项目中的
 

 

 ·spring+hibernate开发网站    »显示摘要«
    摘要: spring+hibernate开发网站http://www.xyzp.net 校园招聘一网打尽spring,一个轻量级的j2ee框架,轻量级的,这几个字就深深的把我吸引住了。抱着《spring in action》啃了一个星期,小了解之后,把自己所学的东西几乎通通用在了xyzp.net这个网站上,下面介绍一下:校园招聘一网打尽 提供专业的校园招聘信息。系统自动采集全国各大高校bbs和就业中心的......
 ·java.net.urlclassloader翻译    »显示摘要«
    摘要: <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"><!--newpage--><html><head><!-- generated by javado......


Turbine表单处理中的中文
turbine是apache 项目中的server-side java技术,位于jakarta子项目,是基于servlet的web应用框架.它提供了很多基础服务:访问控制,页面个性化,服务调度,表单确认,xml-rpc格式的web服务等等.可以做为开发面向服务架构应用的基础,因为turbine很容易开发其它服务,并在其服务管理框架下运行.其下一个版本为2.4,它明确使用亚瑟王神剑项目(该项目实现了ioc模式)来管理服务组件.

【程序编程相关:得到配置资源的一般做法--CLASS.g

  【推荐阅读:JDBC基础知识(1)

  【扩展信息:[总结]J2EE综合应用

本文描述的场景是:turbine2.31+velocity-1.4+torque-3.1.要解决在该场景下提交编码模式为multipart/form-data的表单不能正确处理中文的问题,虽然application/x-www-form-urlencoded编码下可以正确处理中文.

纠正本问题需要提供:maven,ant两个工具以及turbine源码.

 

首先,看turbine的入口servlet turbine.java中的代码片段,是doget方法:

目的是看原始的web服务器请求对象(request)是如何被传递入turbine中的,以及turbine如何处理request对象.

    public final void doget(httpservletrequest req, httpservletresponse res)

            throws ioexception, servletexception

    {

        // set to true if the request is to be redirected by the page

        boolean requestredirected = false;

 

        // placeholder for the rundata object.

        rundata data = null;

        try

        {

            // check to make sure that we started up properly.

            if (initfailure != null)

            {

                throw initfailure;

            }

 

            // get general rundata here...

            // perform turbine specific initialization below.

 

            data = rundataservice.getrundata(req, res, getservletconfig());

 

            // if this is the first invocation, perform some

            // initialization.  certain services need rundata to initialize

            // themselves.

            if (firstdoget)

            {

                init(data);

            }

 

            // set the session timeout if specified in turbines properties

            // file if this is a new session

            if (data.getsession().isnew())

            {

                int timeout = configuration.getint(session_timeout_key,

                                                   session_timeout_default);

 

                if (timeout != session_timeout_default)

                {

                    data.getsession().setmaxinactiveinterval(timeout);

                }

            }

 

            // fill in the screen and action variables.

            data.setscreen(data.getparameters().getstring(uriconstants.cgi_screen_param));

            data.setaction(data.getparameters().getstring(uriconstants.cgi_action_param));

 

            // special case for login and logout, this must happen before the

            // session validator is executed in order either to allow a user to


...   下一页
    摘要: 功能描述:在前台利用capicom读取usb盘中的证书与用户私钥,对明文求sha1的摘要,并对摘要进行签名。仅将签名后的密文与前台表单中的明文传到后台。后台从签名密文中解出用户的个人证书,用db中的ca证书进行合法性验证与时间有效性校验。接着对前台的明文再次计算sha1摘要,把得到的结果与从密文是解出摘要进行对比,从而实现数据完整性的校验。实现步骤:1. 在jsp页面中引入capicom axt......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE