??xml version="1.0" encoding="utf-8" standalone="yes"?>日本黄色精品,中文字幕欧美人与畜,欧美黄色直播http://www.aygfsteel.com/youngturk/category/51360.htmlThe world is a fine place , and worth fighting for it.zh-cnSun, 04 Sep 2016 19:58:52 GMTSun, 04 Sep 2016 19:58:52 GMT60webwork 实现数据生成text文gQƈq行压羃Qƈq行下蝲http://www.aygfsteel.com/youngturk/archive/2016/08/09/431509.htmlyoungturkyoungturkTue, 09 Aug 2016 09:49:00 GMThttp://www.aygfsteel.com/youngturk/archive/2016/08/09/431509.htmlhttp://www.aygfsteel.com/youngturk/comments/431509.htmlhttp://www.aygfsteel.com/youngturk/archive/2016/08/09/431509.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/431509.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/431509.html
//实现压羃文g功能Q采?/span>commons-io-2.0.1.jar Q?/span>commons-compress-1.5.jar插g
        final OutputStream out = new FileOutputStream("D:/EDI/EDi.zip");  //实例文g输出?/span>
        ArchiveOutputStream os = new ArchiveStreamFactory().createArchiveOutputStream(ArchiveStreamFactory.ZIP, out);  
        //实例化存档输出流Q工厂方法创建zip的存档输出流
//        File f1 = new File(file.getPath());
        os.putArchiveEntry(new ZipArchiveEntry(file.getName()));  //生成存档文g?/span>
        IOUtils.copy(new FileInputStream(file), os);  //d拯存档文g
        
        os.closeArchiveEntry();  
        os.close();  
        
        //*************************
        try {
            File input = new File("D:/EDI/EDi.zip");//获得下蝲文g路径
            contentType="application/octet-stream";
            docStream = new FileInputStream(input);//获得输入名U?/span>
            contentDisposition =URLEncoder.encode(input.getName() ,"UTF-8");
           } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
           }  
           return "download";
WEBWORK的文件下载机制。用v来还是比较简单的?/span>
下面是用法说明:
首先在一个ACTION中,如果判断有权限进行文件下载?/span>
则:
1、读下蝲文gQƈ生成一个流?文g名应当从h的request中读出,或从用户的表中取出?/span>
public String downLoadFile(String fileName){
   try {
    File input = new File("e:/engilish literature.doc");
    docStream = new FileInputStream(input);
    contentDisposition = "test.txt";
   } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
   }  
   return "download";
}
2、将输出导向C个特D的RESULT中去。叫做Steam Result?/span>
         <action name="register" class="com.job2easy.web.user.RegisterAction">
             <result name="success" type="dispatcher">
                 <param name="location">/home/register-result.jsp</param>
             </result>
             <result name="input">
                 <param name="location">/home/register.jsp</param>
             </result>
             <result name="download" type="stream">
                 <param name="contentType">application/x-msdownload</param>
                 <param name="inputName">docStream</param>
                 <param name="bufferSize">1024</param>              
                 <param name="contentDisposition">attachment;filename="${contentDisposition}"</param>
             </result>

             <interceptor-ref name="params"/>
         </action>
3、这中间有几个参数需要配|:
     contentType设成 application/x-msdownload 可以。这h览器会保证弹Z个下载文件的对话框?/span>
    inputName q个比较重要Q这个名字是输入的名称Q?以后要steam result的实现类中ؓҎOGNL的表辑ּL扄?/span>
    contentDisposition q个是下载之后,保存在用L的文件名U?span style="color: #ff0000;">${contentDisposition} 看一下代码。如果写成上q的方式Q就有机会在ACTION中设|文件名?/span>
4、另外一个参敎ͼcontentLength是下蝲文g的大,webwork的stream resultg实现有问题,不能Ҏ文g的大动态进行设|,只能写死?/span>
     q个参数的意义是告诉览下蝲的文件有多大Q以便浏览器正确的显C度条。如果这个功能很重要的话Q可以重新写一个RESULT来实现?/span>
?/dt>
0
t?/dt>


youngturk 2016-08-09 17:49 发表评论
]]>
直接讉K后台Q蟩qfilterqo?AuthorizationFilter.javaQfilter为特定权限过滤器http://www.aygfsteel.com/youngturk/archive/2013/07/12/401496.htmlyoungturkyoungturkFri, 12 Jul 2013 05:15:00 GMThttp://www.aygfsteel.com/youngturk/archive/2013/07/12/401496.htmlhttp://www.aygfsteel.com/youngturk/comments/401496.htmlhttp://www.aygfsteel.com/youngturk/archive/2013/07/12/401496.html#Feedback1http://www.aygfsteel.com/youngturk/comments/commentRss/401496.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/401496.htmlweb.xml
<filter>
        
<filter-name>AuthorizationFilter</filter-name>
        
<filter-class>com.cenin.util.filter.AuthorizationFilter</filter-class>
    
</filter>
<filter-mapping>
        
<filter-name>AuthorizationFilter</filter-name>
        
<url-pattern>/*</url-pattern>
    </filter-mapping>
AuthorizationFilter.java
public class AuthorizationFilter implements Filter
{

    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException
    {

        HttpServletRequest request = (HttpServletRequest) req;
        HttpServletResponse response = (HttpServletResponse) resp;
        HttpSession session = request.getSession();

        String servletPath = request.getServletPath();//获得如: /baseinfo/codeBillTypeList.action

        Object user = session.getAttribute(Config.getConfig().getSessionUser());

        //判断权限
        boolean passed = true;


        /*if(user == null && (servletPath.indexOf("action")>=0 )){
            passed = false;
            String[] noLimit = Config.getConfig().getNoFilter().split(";");
            for(int i=0;i<noLimit.length;i++){
                if(servletPath.matches(noLimit[i])){
                    System.out.println(servletPath + "  " + noLimit[i]);
                    passed = true;
                    break;
                }
            }
        }
*/

        request.getRequestDispatcher(servletPath).forward(request, response);
//控制struts or xwork跌{

//        if(passed)
//            chain.doFilter(request, response);
//        else
//        {
//            String modelType = request.getParameter("model.bmoduleType");
//            String particalUrl = request.getParameter("particalUrl");
//            session.setAttribute("model.bmoduleType", modelType);
//            session.setAttribute("particalUrl", particalUrl);
//            String url = Config.getConfig().getPageLogin();
//            RequestDispatcher dispatcher = request.getRequestDispatcher(url);
//            dispatcher.forward(request, response);
//        }
    }
    
public void init(FilterConfig filterConfig) throws ServletException
    
{

    }

    
public void destroy()
    
{

    }


}
xwork.xmld
<include file="xwork-onlinehall.xml"/>
xwork
-onlinehall.xml文g内容Q?br /><package name="onlinehall" extends="cenin" namespace="/onlinehall" externalReferenceResolver="com.atlassian.xwork.ext.SpringServletContextReferenceResolver">
<action name="myOrderLoadList" class="com.cenin.web.action.onlinehall.MyOrderAction" method="myOrderLoadList">
            
<result name="success" type="freemarker">/onlinehall/myOrder.ftl</result>
        
</action>   
</package>
MyOrder.java内容
public class MyOrderAction extends BaseActionSupport {
public String myOrderLoadList() throws Exception {}
}


youngturk 2013-07-12 13:15 发表评论
]]>
用JSP实现上传文g的两U方?http://www.aygfsteel.com/youngturk/archive/2013/01/22/394570.htmlyoungturkyoungturkTue, 22 Jan 2013 09:27:00 GMThttp://www.aygfsteel.com/youngturk/archive/2013/01/22/394570.htmlhttp://www.aygfsteel.com/youngturk/comments/394570.htmlhttp://www.aygfsteel.com/youngturk/archive/2013/01/22/394570.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/394570.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/394570.html阅读全文

youngturk 2013-01-22 17:27 发表评论
]]>
Struts2文g上传功能开?http://www.aygfsteel.com/youngturk/archive/2012/11/29/392239.htmlyoungturkyoungturkThu, 29 Nov 2012 15:47:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/11/29/392239.htmlhttp://www.aygfsteel.com/youngturk/comments/392239.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/11/29/392239.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/392239.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/392239.html技术要?
本节代码详细说明文g上传功能的开发流E,介绍知识点如下:
1. 文g上传面和显CZ传成功页面代码内宏V?
2. UploadActioncM实现上传功能Ҏ和上传文件属性介l?
3. struts.xml中UploadAction配置Q以及字W编码、文件时存放\径配|?
4. 上传后所处\径和最l上传成功后效果展示?
<!---------------------文g名:upload.jsp----------------->
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
    
<head>
        
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        
<title>上传文g</title>
    
</head>
    
<body>
    
<!-- 上传文g表单定义 -->
    
<s:form action="upload" method="post" enctype="multipart/form-data">
        
<tr>
    
<!-- 上传文g标签定义 -->
    
<td>上传文g:<s:file name="file"></s:file></td>
    
</tr>
    
<tr>
    
<td>再次上传文g:<s:file name="file"></s:file></td>
    
</tr>
    
<tr>
    
<td align="left"><s:submit name="submit" value="提交"></s:submit></td>
    
</tr>
    
</s:form>
    
</body>
</html>
 
<!-------------------上传文g成功后结果页面文件名Qresult.jsp ----------------->
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
    
<head>
        
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        
<title>上传l果</title>
    
</head>
    
<body>
        上传文gQ?br />        
<!-- 昄上传成功文g?nbsp;-->
        
<s:property value="fileFileName" />
    
</body>
</html>
<!------------------文g名:UploadAction.java ------------------>
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;

import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;

//文g上传Action
public class UploadAction extends ActionSupport {
    
//上传文g存放路径
    private final static String UPLOADDIR = "/upload";
    
//上传文g集合
    private List<File> file;
    
//上传文g名集?/span>
    private List<String> fileFileName;
    
//上传文g内容cd集合
    private List<String> fileContentType;

    
public List<File> getFile() {
        
return file;
    }


    
public void setFile(List<File> file) {
        
this.file = file;
    }


    
public List<String> getFileFileName() {
        
return fileFileName;
    }


    
public void setFileFileName(List<String> fileFileName) {
        
this.fileFileName = fileFileName;
    }


    
public List<String> getFileContentType() {
        
return fileContentType;
    }


    
public void setFileContentType(List<String> fileContentType) {
        
this.fileContentType = fileContentType;
    }


    
public String execute() throws Exception {
        
for (int i = 0; i < file.size(); i++{
            
//循环上传每个文g
            uploadFile(i);
        }

        
return "success";
    }


    
//执行上传功能
    private void uploadFile(int i) throws FileNotFoundException, IOException {
        
try {
            InputStream in 
= new FileInputStream(file.get(i));
            String dir 
= ServletActionContext.getRequest().getRealPath(UPLOADDIR);
            File uploadFile 
= new File(dir, this.getFileFileName().get(i));
            OutputStream out 
= new FileOutputStream(uploadFile);
            
byte[] buffer = new byte[1024 * 1024];
            
int length;
            
while ((length = in.read(buffer)) > 0{
                out.write(buffer, 
0, length);
            }


            in.close();
            out.close();
        }
 catch (FileNotFoundException ex) {
            ex.printStackTrace();
        }
 catch (IOException ex) {
            ex.printStackTrace();
        }

    }

}
struts.xml配置文g中有x件上传的配置Q?br /><!--------------------文g名:struts.xml------------------->
<struts>
 <!-- pȝ帔R定义Q定义上传文件字W集~码 -->
 <constant name="struts.i18n.encoding" value="gb2312"></constant>
 <!-- pȝ帔R定义Q定义上传文件时存放\?-->
 <constant name="struts.multipart.saveDir" value="c:\"></constant>
 <!-- Action所在包定义 -->
 <package name="C04.4" extends="struts-default">
  <!-- Action名字Q类以及D面定义 -->
  <!-- 通过Actioncd理才D的的Action定义 -->
  <action name="upload" class="action.UploadAction">
   <result name="input">/jsp/upload.jsp</result>
   <result name="success">/jsp/result.jsp</result>
  </action>
 </package>
</struts>


youngturk 2012-11-29 23:47 发表评论
]]>
关于struts2中action传到参数问题http://www.aygfsteel.com/youngturk/archive/2012/11/22/391786.htmlyoungturkyoungturkThu, 22 Nov 2012 13:26:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/11/22/391786.htmlhttp://www.aygfsteel.com/youngturk/comments/391786.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/11/22/391786.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/391786.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/391786.html<action name="adminEnterpriceculturesave" class="adminEnterpriceculturesaveAction" method="save">
          <result name="success" type="redirectAction">/admin/adminEnterpriceculturelist.action?enterpriceculture.enterpricetype=A</result>
管不好看格式,但是却很Ҏ?
W一U方式的/admin不是命名I间Q暂时我q没旉d践他Q现在有点忙..因ؓ我的命名I间是这L

<struts>

    <package name="enterpriceculture" namespace="/" extends="struts-default">  
        <action name="adminEnterpriceculturesave" class="adminEnterpriceculturesaveAction" method="save">
          <result name="success" type="redirectAction">/admin/adminEnterpriceculturelist.action?enterpriceculture.enterpricetype=A</result>
          <!-- <param name="enterpriceculture.enterpricetype">A</param>
          <result name="success" type="chain">
             <param name="actionName">adminEnterpriceculturelist</param>
             <param name="namespace">/</param>
          </result>-->
      <!-- <result name="success">/admin/Enterpriceculture_List.jsp</result>-->
      </action>

</package>
</struts>
W二U方式:
<param name="enterpriceculture.enterpricetype">A</param>
          <result name="success" type="chain">
             <param name="actionName">adminEnterpriceculturelist</param>
             <param name="namespace">/</param>
          </result>
L命名I间因ؓ是在本文件的q个adminEnterpriceculturelistq行跌{Q所以理解v来容易很?.


l合扑ֈ|上有关资料Q如下:
chaincd 如下Q?

   <action name="getTemplate" class="tabAction" method="getTemplateByParas">
         <param name="objectId">${objectId}</param>
        <param name="param1">${param1}</param>
        <param name="items">${items}</param>
       
        <result name="success" type="chain">
         <param name="actionName">${actionName}</param>
         <param name="namespace">${namespace}</param>
        </result>
        
  </action>

       q样可以实C参了Q这里的参数所有对象都可以传,包括map,List,set {集合也可以。同时这里还需要注意一个小问题Qchainq种cd是XWork中的resultcd,它对应的cLQ?
       com.opensymphony.xwork2.ActionChainResult .   q里需要注意一个小问题Q?actionName,namespace都是他的属性,所以对于传q的URL参数要做一下处理?
       actionName必须是Action的名Uͼnamespace是他命名I间Q必M"/"开_如:
       /tab/getTemplate.action       ?namespace="/tab"   ;  actionName=”getTemplate“; 


youngturk 2012-11-22 21:26 发表评论
]]>
spring中的 l承HibernateDaosupportҎhttp://www.aygfsteel.com/youngturk/archive/2012/11/22/391725.htmlyoungturkyoungturkThu, 22 Nov 2012 00:59:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/11/22/391725.htmlhttp://www.aygfsteel.com/youngturk/comments/391725.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/11/22/391725.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/391725.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/391725.html上述的getHibernateTemplateҎ中的updateҎ跟数据库讄主键有关,能根据主键更?.个h理解

youngturk 2012-11-22 08:59 发表评论
]]>
html语言输出到页面{换ؓ|页行式输出Ҏ escape属?/title><link>http://www.aygfsteel.com/youngturk/archive/2012/11/15/391382.html</link><dc:creator>youngturk</dc:creator><author>youngturk</author><pubDate>Thu, 15 Nov 2012 07:06:00 GMT</pubDate><guid>http://www.aygfsteel.com/youngturk/archive/2012/11/15/391382.html</guid><wfw:comment>http://www.aygfsteel.com/youngturk/comments/391382.html</wfw:comment><comments>http://www.aygfsteel.com/youngturk/archive/2012/11/15/391382.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.aygfsteel.com/youngturk/comments/commentRss/391382.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/youngturk/services/trackbacks/391382.html</trackback:ping><description><![CDATA[在struts2?用escape属?可以直接html语言,输出成ؓ|页形式L了其中的标记..<img src ="http://www.aygfsteel.com/youngturk/aggbug/391382.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/youngturk/" target="_blank">youngturk</a> 2012-11-15 15:06 <a href="http://www.aygfsteel.com/youngturk/archive/2012/11/15/391382.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>EL表达式不起作用原?/title><link>http://www.aygfsteel.com/youngturk/archive/2012/11/13/391246.html</link><dc:creator>youngturk</dc:creator><author>youngturk</author><pubDate>Tue, 13 Nov 2012 03:04:00 GMT</pubDate><guid>http://www.aygfsteel.com/youngturk/archive/2012/11/13/391246.html</guid><wfw:comment>http://www.aygfsteel.com/youngturk/comments/391246.html</wfw:comment><comments>http://www.aygfsteel.com/youngturk/archive/2012/11/13/391246.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/youngturk/comments/commentRss/391246.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/youngturk/services/trackbacks/391246.html</trackback:ping><description><![CDATA[web.xml?.4版本的默认导入的standerd.jar,和jstl.jar是用el表达式的包是启动?br />?.5版本的web.xml中默认是关闭?br />所以在2.5的所有jsp中需要启动一?br />?lt;% page isELIgnored="false"%><br /><br /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">el表达式不起作?/span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">        今天用el表达式,老是得不到后Cq来的倹{该导入的jar包和标签库也都导入了。还是不起作用。后来在|上扑ֈ一文章。解决了。原来是版本的问题。现在脓一下?/span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">tomcat5.0的版? 使用了低版本Q只求稳定?/span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">web.xml</span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><?xml version="1.0" encoding="ISO-8859-1"?></span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><web-app xmlns="http://java.sun.com/xml/ns/j2ee"</span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"</span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">    version="2.4"></span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">2.4版本默认启用el表达式,如果使用2.5版本Q默认el表达式是关闭?/span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><?xml version="1.0" encoding="UTF-8"?></span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><web-app xmlns="http://java.sun.com/xml/ns/javaee" </span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" </span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   </span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"></span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">那么对应2.5的web.xml -->  jsp面里应该增?lt;%@ page isELIgnored="false"%></span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">一句话Q凡是部|描q文仉循Servlet2.4规范的WEB应用QEL表达式的计算默认是启用的Q而未遵@的,则EL表达式的计算默认是禁用的?/span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">所以解x案还可以是:web.xml中的DTD(文档cd定义)攚w2.4的版?/span><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><br style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; font: 14px/26px Arial; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" /><span style="text-align: left; widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; display: inline !important; font: 14px/26px Arial; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">我用的是在公共页中加?lt;%@ page isELIgnored="false"%>Q然后每个页面引入公共页。问题解决了?/span><img src ="http://www.aygfsteel.com/youngturk/aggbug/391246.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/youngturk/" target="_blank">youngturk</a> 2012-11-13 11:04 <a href="http://www.aygfsteel.com/youngturk/archive/2012/11/13/391246.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>关于EL表达式中requestScope和param区别 http://www.aygfsteel.com/youngturk/archive/2012/11/12/391205.htmlyoungturkyoungturkMon, 12 Nov 2012 07:30:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/11/12/391205.htmlhttp://www.aygfsteel.com/youngturk/comments/391205.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/11/12/391205.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/391205.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/391205.html

今天演示EL表达式的时候发现自己jsp的基实在是薄弱,在这个很单的问题上迷惑了很久?/p>

首先在看遇到的问题:

在浏览器地址输入Q表CZ入一个参数testQgؓ123

http://localhost:8888/Test/index.jsp?test=123


在index.jsp中尝试用EL表达式取出,代码如下Q?/p>

 <body>
${test}
</body>

发现毫无l果Q再使用requestScope试取出Q?/p>

  <body>
${requestScope.test}
</body>

发现q是毫无l果Q感到非常诧异,遂干脆用java脚本试取出?/p>

  <body>
<%request.getAttribute("test"); %>
</body>


依然无解?/p>

之后发现Q若使用已下代码向request作用域赋|则用上面代码可以取出

<%
request.setAttribute(
"test", "123");
%>

 


查询资料后发玎ͼ使用以下代码可以取出之前的请求参敎ͼ
EL:

  <body>
${param.test}
</body>

JAVA脚本Q?/p>

  <body>
<%=request.getParameter("test") %>
</body>

l论是Q?span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: #ff0000; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none" class="Apple-style-span">${param.name} {h?request.getParamter("name")Q这两种Ҏ一般用于服务器从页面或者客L获取的内宏V?/span>

     ${requestScope.name} {h?nbsp;request.getAttribute("name")Q一般是从服务器传递结果到面Q在面中取出服务器保存的倹{?/span>

 

参考资料:

el表达式中?{param}

http://topic.csdn.net/u/20090103/15/779af9b8-c3a7-4f3e-82fe-b08bf2630996.html



youngturk 2012-11-12 15:30 发表评论
]]>
关于EL表达式中requestScope和param区别 http://www.aygfsteel.com/youngturk/archive/2012/11/12/391206.htmlyoungturkyoungturkMon, 12 Nov 2012 07:30:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/11/12/391206.htmlhttp://www.aygfsteel.com/youngturk/comments/391206.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/11/12/391206.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/391206.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/391206.html

今天演示EL表达式的时候发现自己jsp的基实在是薄弱,在这个很单的问题上迷惑了很久?/p>

首先在看遇到的问题:

在浏览器地址输入Q表CZ入一个参数testQgؓ123

http://localhost:8888/Test/index.jsp?test=123


在index.jsp中尝试用EL表达式取出,代码如下Q?/p>

 <body>
${test}
</body>

发现毫无l果Q再使用requestScope试取出Q?/p>

  <body>
${requestScope.test}
</body>

发现q是毫无l果Q感到非常诧异,遂干脆用java脚本试取出?/p>

  <body>
<%request.getAttribute("test"); %>
</body>


依然无解?/p>

之后发现Q若使用已下代码向request作用域赋|则用上面代码可以取出

<%
request.setAttribute(
"test", "123");
%>

 


查询资料后发玎ͼ使用以下代码可以取出之前的请求参敎ͼ
EL:

  <body>
${param.test}
</body>

JAVA脚本Q?/p>

  <body>
<%=request.getParameter("test") %>
</body>

l论是Q?span style="widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: medium Simsun; white-space: normal; orphans: 2; letter-spacing: normal; color: #ff0000; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none" class="Apple-style-span">${param.name} {h?request.getParamter("name")Q这两种Ҏ一般用于服务器从页面或者客L获取的内宏V?/span>

     ${requestScope.name} {h?nbsp;request.getAttribute("name")Q一般是从服务器传递结果到面Q在面中取出服务器保存的倹{?/span>

 

参考资料:

el表达式中?{param}

http://topic.csdn.net/u/20090103/15/779af9b8-c3a7-4f3e-82fe-b08bf2630996.html



youngturk 2012-11-12 15:30 发表评论
]]>
框架搭徏好后,没有详细的错误信?主页无法讉K.用tomcat去调?没有详细log..http://www.aygfsteel.com/youngturk/archive/2012/11/08/391032.htmlyoungturkyoungturkThu, 08 Nov 2012 08:19:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/11/08/391032.htmlhttp://www.aygfsteel.com/youngturk/comments/391032.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/11/08/391032.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/391032.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/391032.htmlq两天在搭徏struts2+spring+hibernate框架的过E中遇到如题的错误,在百度和h上查了两天,以致快到了崩溃的边缘。最后还是解决了。这个问题的出现Q原因有很多Q在qȝ如下Q以供分享:



框架搭徏好后Q启动服务器出现如下的信息:

log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).

log4j:WARN Please initialize the log4j system properly.

2009-11-6 21:39:17 org.apache.catalina.core.StandardContext start

严重: Error listenerStart

2009-11-6 21:39:17 org.apache.catalina.core.StandardContext start

严重: Context startup failed due to previous errors

2009-11-6 21:39:17 org.apache.catalina.core.StandardHostDeployer install

信息: Installing web application at context path /tomcat-docs from URL file:D:/server/Tomcat 5.0/webapps/tomcat-docs

2009-11-6 21:39:17 org.apache.catalina.core.StandardHostDeployer install

信息: Installing web application at context path /webdav from URL file:D:/server/Tomcat 5.0/webapps/webdav

。。。?br />


可能出错的地方:

1.web.xml文g web应用部v描述W,里面的部|的xml文g或者类Q如果这些找不到׃发生startup failed due to previous errors错误?br />
2.如果在应用spring的话Q在配置文gapplicationContext.xml中定义的cRxml文g找不C会报q个错误?br />
3.在web.xmlQstruts.xmlQapplicationContext.xml文g中自w有M一炚w误都可能引v上面的这个问题,而不仅仅是附带的文g错误D?br />
4.如果使用ibatis的话Q在SqlMapConfig.xml中定义的xml文g找不C会报q个错误。(hibernate的配|在整合spring的时候用spring的配|文Ӟ

5.JDK的版本问题,最好用JDK5.0 或者更高的版本?br />
6.Eclipse和tomcat的版本兼定w?br />
7.框架整合的过E中在导入到lib下的jar包冲H也可能产生该错误?br />
8.jar包的~少以及jar包的版本也可产生该错误?br />
9.其他的原?br />


解决该问题的途径Q?br />
׃上面问题可能已经是web服务器内部生了错误Q而且IDE中的Log信息较少Q问题的解决很难入手?br />
而该问题的生经怼D面跌{L不到文g?Http 404 错误。。。。?br />
可以通过在tomcat中添加log文g来让log信息提示的更_一些,卌|log输出的等U?br />
1.tomcat的安装\径下tomcat home下的common文g夹下的classes文g夹中创徏log4j.properties文gQ即

。。。Apache Software Foundation/Tomcat 5.5/common/classes

log4j.properties配置如下Q配|是转蝲Q:

log4j.rootLogger=info,Console,R

log4j.appender.Console=org.apache.log4j.ConsoleAppender

log4j.appender.Console.layout=org.apache.log4j.PatternLayout

#log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

log4j.appender.Console.layout.ConversionPattern=%d{yy-MM-dd HH:mm:ss} %5p %c{1}:%L - %m%n



log4j.appender.R=org.apache.log4j.DailyRollingFileAppender

log4j.appender.R.File=${catalina.home}/logs/tomcat.log

log4j.appender.R.layout=org.apache.log4j.PatternLayout

log4j.appender.R.layout.ConversionPattern=%d{yyyy.MM.dd HH:mm:ss} %5p %c{1}(%L):? %m%n



log4j.logger.org.apache=info,R

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R

log4j.logger.org.apache.catalina.core=info,R

log4j.logger.org.apache.catalina.session=info,R



2.log4j-1.2.15.jar和commons-logging.jar包拷贝到。。。Apache Software Foundation/Tomcat 5.5/common/lib下即可?br />


做好上面两步Q启动服务器的时候,会在tomcat的安装\径下的。。Apache Software Foundation/Tomcat 5.5/logs下自动的

生成tomcat.log文g以记录日志信息?br />
注:tomcat.log文g中的日志信息会记载很多,如果q大可能生磁盘空间不的问题Q徏议定时的清除日志信息?br />

通过上面的日志文件信息可以定位到比较具体的问题根源,在仔l的查看问题一一ȝ卛_解决?br />

我在搭徏框架之后Q在web.xml文g中配|的Ƣ迎面昄的时候报404的错误,通过上面的途径扑ֈ了两个错误,虽然׃两天的时_最l还是解决了?br />



youngturk 2012-11-08 16:19 发表评论
]]>
hibernate3.0版本的hibernate.dialect 的包路径是org.hibernate.dialect.Oracle9Dialecthttp://www.aygfsteel.com/youngturk/archive/2012/11/08/391031.htmlyoungturkyoungturkThu, 08 Nov 2012 08:17:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/11/08/391031.htmlhttp://www.aygfsteel.com/youngturk/comments/391031.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/11/08/391031.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/391031.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/391031.html

youngturk 2012-11-08 16:17 发表评论
]]>
struts2-java.lang.NullPointerException at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java http://www.aygfsteel.com/youngturk/archive/2012/11/06/390865.htmlyoungturkyoungturkTue, 06 Nov 2012 05:30:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/11/06/390865.htmlhttp://www.aygfsteel.com/youngturk/comments/390865.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/11/06/390865.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/390865.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/390865.html1.strtus.xml

    在struts.xml中配|了<constant name="struts.devMode" value="true"/> (据说配置?lt;constant name="struts.configuration.xml.reload" value="true"/>也会报错Q这个我没试q)
时启动tomcat报错?br />org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.NullPointerException
    at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
    at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
    at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:191)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2009-2-4 22:40:54 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2009-2-4 22:40:54 org.apache.catalina.core.StandardContext start
严重: Context [/Struts2Demo2] startup failed due to previous errors

|上解决办法QdevMode模式是开发模式,开启它则默认开启了i18n.reload?configuration.xml.reload。这个错误是׃configuration.xml.reload讄为true倒置的,但是|上的资料没有说明原因及解决办法Q倒是一个国外的apache相关BBS上有q是216版本的BUG,q且附上了一?patch修正文gQ说217版本会修正。。。可我不会用也不知道是不是这个原因,q个问题׃直搁|在q里了。过了几个月Q也是最q网上查了下发现在apache的一个邮件列表中有关于这个的解释Q?/span>原因很简单,tomcat的安装\径包含空格我的成功的办法:据说q是struts2.1.6的bugQ换新版?.1.8okQ当然还要相应的xwork版本Q好像是xwork2.1.6Q我原来的2个旧jar包换成新的就ok了?/span>。。。无语啊。。。一试果然如此?br />

注意:2个jar包换了之后重启tomcat可能会报错, Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jarQ这个错误是开始那个引LQ把tomcat中相应项目删除了Q重新部|就没问题了

   下面?个开发模式常用配|的?--Q来自http://hi.baidu.com/12261016/blog/item/1d7f6ccaded7248ec91768ec.htmlQ?br />    <!-- 开启用开发模式,详细错误提示 -->
    <!-- <constant name="struts.devMode" value="true"/>-->
    <!-- 指定每次h到达Q重新加载资源文?-->
    <!-- <constant name="struts.i18n.reload" value="true"/>-->
    <!-- 指定每次配置文g更改后,自动重新加蝲 -->
    <!-- <constant name="struts.configuration.xml.reload" value="true"/>-->
    <!-- 指定XSLT Result使用样式表缓?-->
    <!-- <constant name="struts.xslt.nocache" value="true"/>-->



youngturk 2012-11-06 13:30 发表评论
]]>
java的反應?好文?/title><link>http://www.aygfsteel.com/youngturk/archive/2012/09/05/387084.html</link><dc:creator>youngturk</dc:creator><author>youngturk</author><pubDate>Wed, 05 Sep 2012 05:46:00 GMT</pubDate><guid>http://www.aygfsteel.com/youngturk/archive/2012/09/05/387084.html</guid><wfw:comment>http://www.aygfsteel.com/youngturk/comments/387084.html</wfw:comment><comments>http://www.aygfsteel.com/youngturk/archive/2012/09/05/387084.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/youngturk/comments/commentRss/387084.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/youngturk/services/trackbacks/387084.html</trackback:ping><description><![CDATA[<a >http://www.cnblogs.com/rollenholt/archive/2011/09/02/2163758.html</a><img src ="http://www.aygfsteel.com/youngturk/aggbug/387084.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/youngturk/" target="_blank">youngturk</a> 2012-09-05 13:46 <a href="http://www.aygfsteel.com/youngturk/archive/2012/09/05/387084.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>直接讉K国际化资源文件内容:http://www.aygfsteel.com/youngturk/archive/2012/06/08/380351.htmlyoungturkyoungturkFri, 08 Jun 2012 07:21:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/06/08/380351.htmlhttp://www.aygfsteel.com/youngturk/comments/380351.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/06/08/380351.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/380351.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/380351.html直接讉K资源文g内容Q?br /><s:i18n name="cn/itcast/action/PersonManageAction"><!-----U色为报名直接访?------->
       <s:text name="welcome">
           <s:param>liming</s:param>
           <s:param>study</s:param>
       </s:text>
</s:i18n>

youngturk 2012-06-08 15:21 发表评论
]]>
国际?/title><link>http://www.aygfsteel.com/youngturk/archive/2012/06/07/380275.html</link><dc:creator>youngturk</dc:creator><author>youngturk</author><pubDate>Thu, 07 Jun 2012 14:22:00 GMT</pubDate><guid>http://www.aygfsteel.com/youngturk/archive/2012/06/07/380275.html</guid><description><![CDATA[<div> <p><strong><span style="font-family:宋体;">一Q?span style="color:red">准备资源文gQ资源文件的命名格式如下Q?/span></span></strong></p> <p><span>                   baseName_language_country.properties</span></p> <p><span>                   baseName_language.properties</span></p> <p><span>                   baseName.properties</span></p> <p style="margin-left:21.0pt"><span style="font-family:宋体;">其中</span>baseName<span style="font-family:宋体;">是资源文件的基本名,我们可以自定义,?/span>language<span style="font-family:宋体;">?/span>country<span style="font-family:宋体;">必须?/span>java<span style="font-family:宋体;">支持的语a和国家。如Q?/span></p> <p style="margin-left:21.0pt"><span>                   </span><span style="font-family:宋体;">中国大陆Q?/span>baseName_zh_CN.properties</p> <p style="margin-left:21.0pt"><span>                   </span><span style="font-family:宋体;">国Q?/span>baseName_en_US.properties</p> <p style="margin-left:21.0pt"><span style="font-family:宋体; color:red">现在为应用添加两个资源文Ӟ</span></p> </div><div> <p style="text-indent:21.0pt"><strong><span style="font-family:宋体;">二:准备好资源文件后Q配|?/span></strong><strong>struts.xml</strong><strong><span style="font-family:宋体;">文g</span></strong></p> <p style="margin-left:21.0pt;text-indent:21.0pt">struts.custom.i18n.resources<span style="font-family:宋体;">帔R把资源文件定义ؓ全局资源文gQ?/span></p> <p style="margin-left:21.0pt;text-indent:21.0pt"><span><constant name="struts.custom.i18n.resources" value="itcast"/></span></p> <p style="margin-left:21.0pt;text-indent:21.0pt">Itcast<span style="font-family:宋体;">源文件的基本名?/span></p> </div><div> <p style="text-indent:21.0pt"><strong><span style="font-family:宋体;">三:后面我们可以在页面或</span></strong><strong>action</strong><strong><span style="font-family:宋体;">中访问国际化信息Q?/span></strong></p> <p style="text-indent:21.0pt"><strong><span>         </span></strong>1<span style="font-family:宋体;">?/span>JSP<span style="font-family:宋体;">面中?/span><s:text name=””/><span style="font-family:宋体;">标签输出国际化信息?/span></p> <p style="text-indent:21.0pt"><span>          name</span><span style="font-family:宋体;">源文件中?/span>key<span style="font-family:宋体;">?/span></p> <p style="margin-left:15.75pt; text-indent:5.25pt;"><span>         2</span><span style="font-family:宋体;">?/span>action <span style="font-family:宋体;">cMQ可以?/span>ActionSupport<span style="font-family:宋体;">Q?/span>getText(“key”)<span style="font-family: 宋体;">Ҏ得到国际</span></p> <p style="margin-left:15.75pt; text-indent:36.75pt;"><span style="font-family:宋体;">化信息,该方法的W一个参数用于指定资源文件中?/span>key<span style="font-family:宋体;">?/span></p> <p style="margin-left:15.75pt; text-indent:5.25pt;"><span>         3</span><span style="font-family:宋体;">在表单标{中Q通过</span>key<span style="font-family:宋体;">属性指定资源文件中?/span>key<span style="font-family:宋体;">Q如Q?/span></p> <p style="margin-left: 15.75pt; text-indent: 5.25pt;"><span>                   <s:textfield name=”realname” key=”user”/></span></p><p style="margin-left: 15.75pt; text-indent: 5.25pt;"><br /><span></span></p><p style="margin-left: 15.75pt; text-indent: 5.25pt;"><br /><span></span></p><p style="margin-left:15.75pt; text-indent:5.25pt;"><span><br /></span></p> </div>惛_得国际化内容Q?l承action <span style="font-family:宋体;">cMQ可以?/span>ActionSupportQ?使用this.getTextҎ<br /><br /><div>ActionContext.getContext().put("message"<sup style="color: red;">为jsp面中变?/sup>, <br />this.getText<sup style="color: red;">获得</sup><sup style="color: red;">baseName_zh_CN.properties文g中对应key?/sup>("welcome"));<br /><br />中英文环境修? 工具Q-Q》选项Q-Q》语aQ进行修?.</div><img src ="http://www.aygfsteel.com/youngturk/aggbug/380275.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/youngturk/" target="_blank">youngturk</a> 2012-06-07 22:22 <a href="http://www.aygfsteel.com/youngturk/archive/2012/06/07/380275.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>对action指定Ҏq行校验validateXxxhttp://www.aygfsteel.com/youngturk/archive/2012/06/07/380238.htmlyoungturkyoungturkThu, 07 Jun 2012 07:38:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/06/07/380238.htmlhttp://www.aygfsteel.com/youngturk/comments/380238.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/06/07/380238.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/380238.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/380238.html
通过validateXxxҎ实现Q?/span>validateXxx只会校验actionҎ名ؓXxx的方法。其?/span>Xxx的第一个字母要大写Q当某个数据校验p|Ӟ我们应该调用addFieldErrorҎ往pȝ?/span>fieldErrord校验p|信息Qؓ了?/span>addFieldErrorҎQ?/span>ActionSupportQ如果系l的fieldErrors包含p|信息Q?/span>struts2请求自动{发到名ؓinput?/span>resultQ在input视图中可以通过<s:fielderror/>昄p|信息?br />1,input视图是struts2特定的视图,必须q么?br />

@Override  需要对q行LQ@Override表示重蝲会承父cȝҎ
    public void validateUpdate() {}

youngturk 2012-06-07 15:38 发表评论
]]>
对action所有方法进行输入校验validate()Ҏhttp://www.aygfsteel.com/youngturk/archive/2012/06/07/380232.htmlyoungturkyoungturkThu, 07 Jun 2012 07:19:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/06/07/380232.htmlhttp://www.aygfsteel.com/youngturk/comments/380232.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/06/07/380232.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/380232.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/380232.html1.需要用validateҎ
validate Ҏl承 actionsupportc?br />
2 验证错误l果需要在本类的this.addFieldError(验证参数Q传递数?Q?br />this.addFieldError("username""user can not be null");

3.struts.xml?nbsp;需要由input是struts2专门验证的参数必这么写Q是内部l承的与
this.addFieldError兌<result name="input">/index.jsp</result>跌{到结果错误提C?br /><action name="manage_*" class="cn.itcast.action.PersonAction" method="{1}">
            
<!-- 错误输出时候会调用pȝ自带的input视图 -->
            
<result name="input">/index.jsp</result>
            
<result name="message">/WEB-INF/page/message.jsp</result>
            
        
</action>
4验证l果输出jsp面需要导?br />
<%@taglib uri="/struts-tags" prefix="s"%>
sturts2标签Q?/span><s:fielderror/>
出结?br />“user can not be 
null

youngturk 2012-06-07 15:19 发表评论
]]>
拦截器再应用学习http://www.aygfsteel.com/youngturk/archive/2012/06/07/380207.htmlyoungturkyoungturkThu, 07 Jun 2012 03:55:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/06/07/380207.htmlhttp://www.aygfsteel.com/youngturk/comments/380207.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/06/07/380207.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/380207.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/380207.html拦截?br />如果用户d后可以访问action中的所有方?br />user.jsp{
request.getSession().setAttribute(
"user""itcast");
//专门讄用户是否d状态,session来专门标注用h否登?/span>
}
退出登?br />quit.jsp{
request.getSession().removeAttribute(
"user");
//sessionLp?.
}
如果用户没有d不允许访问action中的ҎQƈ且提C?br />
1.定义拦截?br />1.1实现com.opensymphony.xwork2.ActionInvocation.Interceptor接口
    @Override
    
public void destroy() {//当此c被摧毁的时候执?/span>
        
    }

    @Override
    
public void init() {//实例化自动执?/span>
        
    }
public String intercept(ActionInvocation invocation) throws Exception {
        
// TODO Auto-generated method stub
        Object user = ActionContext.getContext().getSession().get("user");
        
if(user!=null)//判断用户是否d
            invocation.invoke();//执行被拦截到的方法,不掉用,被拦截的actionҎ

不会被执?br />        ActionContext.getContext().put(
"message""you have not right");
        
return "success";//定义全局
    }//当拦daction׃执行此方?/span>
1.2注册拦截?nbsp;在struts的package中注册拦截器
<package name="employee" namespace="/control/employee" extends="struts-default">
        
<interceptors> <!-- 注册拦截?nbsp;-->
            
<interceptor name="permission" 

class="cn.itcast.interceptor.PermissionInterceptor"></interceptor>
            
<!-- 使用拦截器栈可以使用自定义拦截器Q且 不失ȝl自定义拦截器功?nbsp;

-->
            
<interceptor-stack name="permissionStack">
                
<!-- pȝ默认拦截?nbsp;-->
                
<interceptor-ref name="defaultStack"></interceptor-ref>
                
<!-- 自定义拦截器的引?nbsp;-->
                
<interceptor-ref name="permission"></interceptor-ref>
            
</interceptor-stack>
        
</interceptors>
        
<!--默认包里面全用此拦截?nbsp; 1 ?nbsp;@@对应-->
        
<default-interceptor-ref name="permissionStack"></default-interceptor-ref>
        
<global-results>
            
<result name="success">/WEB-INF/page/message.jsp</result>
        
</global-results>
        
        
        
<action name="list_*" class="cn.itcast.action.HelloWorldAction" 

method
="{1}">
            
<!-- 使用拦截?nbsp;@@ -->
            
<!-- <interceptor-ref name="permissionStack"></interceptor-ref>
            
<interceptor-ref name="增加自定义新拦截?/span>"></interceptor-ref> -->
        
</action>
    
</package>

1.3 需要定义拦截器栈,否则自定义拦截器会覆盖struts自带的拦截器Qstruts失去自n的拦截器功能
/control/employee


youngturk 2012-06-07 11:55 发表评论
]]>
1动态方式调用;使用通配W定义actionQ通过l承DefaultTypeConvertercdQ注册ؓ局部类型{换器Q?/title><link>http://www.aygfsteel.com/youngturk/archive/2012/06/05/380046.html</link><dc:creator>youngturk</dc:creator><author>youngturk</author><pubDate>Tue, 05 Jun 2012 09:31:00 GMT</pubDate><guid>http://www.aygfsteel.com/youngturk/archive/2012/06/05/380046.html</guid><wfw:comment>http://www.aygfsteel.com/youngturk/comments/380046.html</wfw:comment><comments>http://www.aygfsteel.com/youngturk/archive/2012/06/05/380046.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/youngturk/comments/commentRss/380046.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/youngturk/services/trackbacks/380046.html</trackback:ping><description><![CDATA[<div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #000000">两种方式Q?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />1动态方式调用:在默认值情况excute执行情况下(不徏议用这U方法)<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />struts中当action为:<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #000000"><</span><span style="color: #000000">action name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">helloWord</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">cn.itcast.action.HelloWorldAction</span><span style="color: #000000">"</span><span style="color: #000000"> method</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">execute</span><span style="color: #000000">"</span><span style="color: #000000"> <br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #000000"><</span><span style="color: #000000">param name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">savepath</span><span style="color: #000000">"</span><span style="color: #000000">>/</span><span style="color: #000000">department</span><span style="color: #000000"></</span><span style="color: #000000">param</span><span style="color: #000000">></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #000000"><</span><span style="color: #000000">result name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">success</span><span style="color: #000000">"</span><span style="color: #000000">>/</span><span style="color: #000000">WEB</span><span style="color: #000000">-</span><span style="color: #000000">INF</span><span style="color: #000000">/</span><span style="color: #000000">page</span><span style="color: #000000">/</span><span style="color: #000000">message.jsp</span><span style="color: #000000"></</span><span style="color: #000000">result</span><span style="color: #000000">></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #000000"></</span><span style="color: #000000">action</span><span style="color: #000000">></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />时候cn.itcast.action.HelloWorldAction中的ҎaddUI可以q样执行helloWord</span><span style="color: #000000">!</span><span style="color: #000000">addUI.actionq样执行<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">2</span><span style="color: #000000">.</span><span style="color: #000000"><</span><span style="color: #000000">constant name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">struts.enable.DynamicMethodInvocation</span><span style="color: #000000">"</span><span style="color: #000000"> value</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">false</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">/></span><span style="color: #000000">q个可以止使用动态方?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">3</span><span style="color: #000000">.使用通配W定义action<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000"><</span><span style="color: #000000">action name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">helloWord_*</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">cn.itcast.action.HelloWorldAction</span><span style="color: #000000">"</span><span style="color: #000000"> method</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">{1}</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />            </span><span style="color: #000000"><</span><span style="color: #000000">param name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">savepath</span><span style="color: #000000">"</span><span style="color: #000000">>/</span><span style="color: #000000">department</span><span style="color: #000000"></</span><span style="color: #000000">param</span><span style="color: #000000">></span><span style="color: #000000"><br /><img id="Codehighlighter1_630_632_Open_Image" onclick="this.style.display='none'; Codehighlighter1_630_632_Open_Text.style.display='none'; Codehighlighter1_630_632_Closed_Image.style.display='inline'; Codehighlighter1_630_632_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_630_632_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_630_632_Closed_Text.style.display='none'; Codehighlighter1_630_632_Open_Image.style.display='inline'; Codehighlighter1_630_632_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif">            </span><span style="color: #000000"><</span><span style="color: #000000">result name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">success</span><span style="color: #000000">"</span><span style="color: #000000">>/</span><span style="color: #000000">WEB</span><span style="color: #000000">-</span><span style="color: #000000">INF</span><span style="color: #000000">/</span><span style="color: #000000">page</span><span style="color: #000000">/</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_630_632_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_630_632_Open_Text"><span style="color: #000000">{</span><span style="color: #000000">1</span><span style="color: #000000">}</span></span><span style="color: #000000">.jsp</span><span style="color: #000000"></</span><span style="color: #000000">result</span><span style="color: #000000">></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />        </span><span style="color: #000000"></</span><span style="color: #000000">action</span><span style="color: #000000">></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />?/span><span style="color: #000000">1</span><span style="color: #000000">}代表烦取到的通配W?/span><span style="color: #000000">*</span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">4</span><span style="color: #000000">.以getҎ得到参数形式如下Q?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />http:</span><span style="color: #008000">//</span><span style="color: #008000">localhost:7002/struts2/control/department/helloWordexecute.action?id=123&name=aaa</span><span style="color: #008000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">直接在地址后面付?<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />get</span><span style="color: #000000">*</span><span style="color: #000000">()不管是postq是getҎ提交Q都能得到?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">5</span><span style="color: #000000">,通过qo器解决中文ؕ码问?.<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">6</span><span style="color: #000000">,自定义类型{?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />struts 两种转换器:<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">1</span><span style="color: #000000">Q?nbsp;   局部类型{换器Q对某个action起作?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">2</span><span style="color: #000000">Q?nbsp;   全局cd转换器:Ҏ有action中此cd作用<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />通过l承DefaultTypeConvertercd<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />代码实现Q?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> Object convertValue(Map</span><span style="color: #000000"><</span><span style="color: #000000">String, Object</span><span style="color: #000000">></span><span style="color: #000000"> context, Object value,<br /><img id="Codehighlighter1_1039_1509_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1039_1509_Open_Text.style.display='none'; Codehighlighter1_1039_1509_Closed_Image.style.display='inline'; Codehighlighter1_1039_1509_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_1039_1509_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1039_1509_Closed_Text.style.display='none'; Codehighlighter1_1039_1509_Open_Image.style.display='inline'; Codehighlighter1_1039_1509_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif">            Class toType) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1039_1509_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1039_1509_Open_Text"><span style="color: #000000">{<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">        return super.convertValue(context, value, toType);</span><span style="color: #008000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">        SimpleDateFormat dateFormat </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> SimpleDateFormat(</span><span style="color: #000000">"</span><span style="color: #000000">yyyymmdd</span><span style="color: #000000">"</span><span style="color: #000000">);<br /><img id="Codehighlighter1_1167_1466_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1167_1466_Open_Text.style.display='none'; Codehighlighter1_1167_1466_Closed_Image.style.display='inline'; Codehighlighter1_1167_1466_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1167_1466_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1167_1466_Closed_Text.style.display='none'; Codehighlighter1_1167_1466_Open_Image.style.display='inline'; Codehighlighter1_1167_1466_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif">        </span><span style="color: #0000ff">try</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1167_1466_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1167_1466_Open_Text"><span style="color: #000000">{<br /><img id="Codehighlighter1_1196_1340_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1196_1340_Open_Text.style.display='none'; Codehighlighter1_1196_1340_Closed_Image.style.display='inline'; Codehighlighter1_1196_1340_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1196_1340_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1196_1340_Closed_Text.style.display='none'; Codehighlighter1_1196_1340_Open_Image.style.display='inline'; Codehighlighter1_1196_1340_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif">            </span><span style="color: #0000ff">if</span><span style="color: #000000">(toType </span><span style="color: #000000">==</span><span style="color: #000000"> Date.</span><span style="color: #0000ff">class</span><span style="color: #000000">)</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1196_1340_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1196_1340_Open_Text"><span style="color: #000000">{</span><span style="color: #008000">//</span><span style="color: #008000">选择所用类 字符串向date转换</span><span style="color: #008000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">                String[] params </span><span style="color: #000000">=</span><span style="color: #000000"> (String[])value;</span><span style="color: #008000">//</span><span style="color: #008000">request.getParameterValues()只能取这个方法取出所有?/span><span style="color: #008000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">                </span><span style="color: #0000ff">return</span><span style="color: #000000"> dateFormat.parse(params[</span><span style="color: #000000">0</span><span style="color: #000000">]);<br /><img id="Codehighlighter1_1372_1462_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1372_1462_Open_Text.style.display='none'; Codehighlighter1_1372_1462_Closed_Image.style.display='inline'; Codehighlighter1_1372_1462_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1372_1462_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1372_1462_Closed_Text.style.display='none'; Codehighlighter1_1372_1462_Open_Image.style.display='inline'; Codehighlighter1_1372_1462_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif">            }</span></span><span style="color: #0000ff">else</span><span style="color: #000000"> </span><span style="color: #0000ff">if</span><span style="color: #000000">(toType </span><span style="color: #000000">==</span><span style="color: #000000"> String.</span><span style="color: #0000ff">class</span><span style="color: #000000">)</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1372_1462_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1372_1462_Open_Text"><span style="color: #000000">{<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />                java.util.Date date </span><span style="color: #000000">=</span><span style="color: #000000"> (java.util.Date)value;<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />                </span><span style="color: #0000ff">return</span><span style="color: #000000"> dateFormat.format(date);<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />            }</span></span><span style="color: #000000"><br /><img id="Codehighlighter1_1490_1491_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1490_1491_Open_Text.style.display='none'; Codehighlighter1_1490_1491_Closed_Image.style.display='inline'; Codehighlighter1_1490_1491_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none" id="Codehighlighter1_1490_1491_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1490_1491_Closed_Text.style.display='none'; Codehighlighter1_1490_1491_Open_Image.style.display='inline'; Codehighlighter1_1490_1491_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif">        }</span></span><span style="color: #0000ff">catch</span><span style="color: #000000">(ParseException e)</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_1490_1491_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1490_1491_Open_Text"><span style="color: #000000">{}</span></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #0000ff">null</span><span style="color: #000000">;<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />}<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />注册为局部类型{换器Q?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />    在actioncL在包下徏立ActionClassName</span><span style="color: #000000">-</span><span style="color: #000000">Conversion.properties文gConversion固定写法不可改变birthday cn.itcast.type.DateTypeConverter<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">*************************</span><span style="color: #000000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />request</span><span style="color: #000000">/</span><span style="color: #000000">session</span><span style="color: #000000">/</span><span style="color: #000000">application的属性添?<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />通过acctionContextd上面三个属?img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span></div><img src ="http://www.aygfsteel.com/youngturk/aggbug/380046.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/youngturk/" target="_blank">youngturk</a> 2012-06-05 17:31 <a href="http://www.aygfsteel.com/youngturk/archive/2012/06/05/380046.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>action中得到request,session和application属性方?/title><link>http://www.aygfsteel.com/youngturk/archive/2012/06/05/380045.html</link><dc:creator>youngturk</dc:creator><author>youngturk</author><pubDate>Tue, 05 Jun 2012 09:29:00 GMT</pubDate><guid>http://www.aygfsteel.com/youngturk/archive/2012/06/05/380045.html</guid><wfw:comment>http://www.aygfsteel.com/youngturk/comments/380045.html</wfw:comment><comments>http://www.aygfsteel.com/youngturk/archive/2012/06/05/380045.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/youngturk/comments/commentRss/380045.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/youngturk/services/trackbacks/380045.html</trackback:ping><description><![CDATA[<div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img id="Codehighlighter1_40_235_Open_Image" onclick="this.style.display='none'; Codehighlighter1_40_235_Open_Text.style.display='none'; Codehighlighter1_40_235_Closed_Image.style.display='inline'; Codehighlighter1_40_235_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_40_235_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_40_235_Closed_Text.style.display='none'; Codehighlighter1_40_235_Open_Image.style.display='inline'; Codehighlighter1_40_235_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif"><span style="color: #0000ff">public</span><span style="color: #000000"> String execute() </span><span style="color: #0000ff">throws</span><span style="color: #000000"> Exception</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_40_235_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_40_235_Open_Text"><span style="color: #000000">{</span><span style="color: #008000">//</span><span style="color: #008000">仅仅讉Kd用这?/span><span style="color: #008000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">        ActionContext ac</span><span style="color: #000000">=</span><span style="color: #000000">ActionContext.getContext();<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        ac.getApplication().put(</span><span style="color: #000000">"</span><span style="color: #000000">app</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">应用范围</span><span style="color: #000000">"</span><span style="color: #000000">);<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        ac.getSession().put(</span><span style="color: #000000">"</span><span style="color: #000000">ses</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">session应用</span><span style="color: #000000">"</span><span style="color: #000000">);<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        ac.put(</span><span style="color: #000000">"</span><span style="color: #000000">req</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000">request范围</span><span style="color: #000000">"</span><span style="color: #000000">);<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">success</span><span style="color: #000000">"</span><span style="color: #000000">; <br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /><img id="Codehighlighter1_274_763_Open_Image" onclick="this.style.display='none'; Codehighlighter1_274_763_Open_Text.style.display='none'; Codehighlighter1_274_763_Closed_Image.style.display='inline'; Codehighlighter1_274_763_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_274_763_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_274_763_Closed_Text.style.display='none'; Codehighlighter1_274_763_Open_Image.style.display='inline'; Codehighlighter1_274_763_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif">    </span><span style="color: #0000ff">public</span><span style="color: #000000"> String rsa() </span><span style="color: #0000ff">throws</span><span style="color: #000000"> Exception</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_274_763_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_274_763_Open_Text"><span style="color: #000000">{</span><span style="color: #008000">//</span><span style="color: #008000">得到文g的绝对\径用此方?/span><span style="color: #008000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">        HttpServletRequest request </span><span style="color: #000000">=</span><span style="color: #000000"> ServletActionContext.getRequest();<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        ServletContext servletContext </span><span style="color: #000000">=</span><span style="color: #000000"> ServletActionContext.getServletContext();<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">        servletContext.getRealPath("/index.html");得到文g的绝对\?br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">        request.getSession();<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #008000">//</span><span style="color: #008000">        HttpServletResponse response = ServletActionContext.getResponse();</span><span style="color: #008000"><br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">        request.setAttribute(</span><span style="color: #000000">"</span><span style="color: #000000">req</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000">request范围属?/span><span style="color: #000000">"</span><span style="color: #000000">);<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        request.getSession().setAttribute(</span><span style="color: #000000">"</span><span style="color: #000000">ses</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">session会话范围属?/span><span style="color: #000000">"</span><span style="color: #000000">);<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        servletContext.setAttribute(</span><span style="color: #000000">"</span><span style="color: #000000">app</span><span style="color: #000000">"</span><span style="color: #000000">,</span><span style="color: #000000">"</span><span style="color: #000000">应用范围属?/span><span style="color: #000000">"</span><span style="color: #000000">);<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">success</span><span style="color: #000000">"</span><span style="color: #000000">;<br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        <br /><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />    }</span></span></div><img src ="http://www.aygfsteel.com/youngturk/aggbug/380045.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/youngturk/" target="_blank">youngturk</a> 2012-06-05 17:29 <a href="http://www.aygfsteel.com/youngturk/archive/2012/06/05/380045.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>struts2讉K属性的d..ActionContext,在excute执行Ҏ中添?.http://www.aygfsteel.com/youngturk/archive/2012/06/05/380037.htmlyoungturkyoungturkTue, 05 Jun 2012 08:28:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/06/05/380037.htmlhttp://www.aygfsteel.com/youngturk/comments/380037.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/06/05/380037.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/380037.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/380037.htmlpublic String execute() throws Exception{//在executeҎ里面应用全局应用session
        ActionContext ac=ActionContext.getContext();
        ac.getApplication().put(
"app","应用范围");//往serviceContext里放?/span>
        ac.getSession().put("session","session应用");//往session里面?/span>
        ac.put("req""request范围");//往req里面?.
        return "success";
    }


ActionContext ac = ActionContext.getContext();
ac.

youngturk 2012-06-05 16:28 发表评论
]]>
struts2 h参数值的获得http://www.aygfsteel.com/youngturk/archive/2012/06/05/379996.htmlyoungturkyoungturkTue, 05 Jun 2012 02:23:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/06/05/379996.htmlhttp://www.aygfsteel.com/youngturk/comments/379996.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/06/05/379996.html#Feedback2http://www.aygfsteel.com/youngturk/comments/commentRss/379996.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/379996.htmlaction文gQ?br />public class HelloWorldAction {//id=123&name=aaa
 private Integer id;
 private Person person;
 public Person getPerson() {
  return person;
 }


 public void setPerson(Person person) {
  this.person = person;
 }

实体bean文gQ?br />public class Person {
//需要默认构造器Qstruts2利用反射机制获得?br /> public String getName() {
  return name;
 }
 public void setName(String name) {
  this.name = name;
 }
 public Integer getId() {
  return id;
 }
 public void setId(Integer id) {
  this.id = id;
 }
 private String name;
 private Integer id;
}
览器请求页面:
<form action="<%=request.getContextPath() %>/control/department/helloWordexecute.action">
<!--    <form action="/control/department/helloWordexecute.action"> -->
     name:<input type="text" name="person.name">
     id:<input type="text" name="person.id">
     <input type="submit" value="send">
   </form>
接受实体bean 值文Ӟ

<body>
   id=${person.id}<br>
   name=${person.name}

  </body>




youngturk 2012-06-05 10:23 发表评论
]]>
strutsQ表单form中对应到action付值的获得http://www.aygfsteel.com/youngturk/archive/2012/06/05/379991.htmlyoungturkyoungturkTue, 05 Jun 2012 01:59:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/06/05/379991.htmlpackage cn.itcast.action;

import java.net.URLEncoder;

public class HelloWorldAction {//id=123&name=aaa
    private Integer id;
    
public Integer getId() {
        
return id;
    }



    
public void setId(Integer id) {
        
this.id = id;
    }



    
public String getName() {
        
return name;
    }



    
public void setName(String name) {
        
this.name = name;
    }


    
private String name;
    
private String msg;
    
private String username;
    
private String savepath;
    
    
public String getSavepath() {
        
return savepath;
    }


//    struts2会自动获struts.xml配置文g中parameter付值变量信息?/span>
    public void setSavepath(String savepath) {
        
this.savepath = savepath;
//        <action name="helloWord*" class="cn.itcast.action.HelloWorldAction" method="{1}" >
    
//        <param name="savepath">/department</param>
    
//        <result name="success">/WEB-INF/page/message.jsp</result>
//        </action>
    }



    
public String getUsername() {
        
return username;
    }


//    struts2会自动获得对应表单提交的字段信息Q例如form中有username
    public void setUsername(String username) {
        
this.username = username;
    }



    
public String getMessage() {
        
return msg;
    }

    
public String addUI(){
        msg 
= "addUI";
        
return "success";
    }



    
public String execute() throws Exception{
        
//this.username = URLEncoder.encode("传智播客", "UTF-8");
        this.username = "firest";
        
this.msg = "我的W一个struts2应用";
        
return "success";
    }

    
    
public String add(){
        
return "message";
    }

}



youngturk 2012-06-05 09:59 发表评论
]]>
action理方式http://www.aygfsteel.com/youngturk/archive/2012/06/04/379960.htmlyoungturkyoungturkMon, 04 Jun 2012 15:04:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/06/04/379960.htmlhttp://www.aygfsteel.com/youngturk/comments/379960.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/06/04/379960.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/379960.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/379960.html1struts.action.extension可以修改h后缀
在struts.xml中?br /><constant name="struts.action.extension" value="do,action"/>
struts.xml中和struts.properties中可以配|常量,最好在struts.xml中定?br />struts-default.xml
struts-plugin.xml
struts.xml
struts.properties
web.xml
重复定义帔RQ后面的帔Rg覆盖前面的常?br />
2<constantname="struts.i18n.encoding" value="UTF-8"/>
参数作用于setCharacterEncodingҎ freemarker的输?br />
pȝ自动重新加蝲
<constantname = "struts.configuration.xmlreload"/>

创徏spring负责创徏actin对象
<constantname = "struts.objectFactory"/>
限制上传文g大小
<constantname = "struts.multipart.maxSize" value="10838274"/>
3处理程 action的管理方?br />用户hQ-》strutsprepareAndExecuteFilterQ-Q?br />inerceptorQstruts2d内置的一些拦截器Q-Q?br />用户~写actionc-Q-》resultq行跌{Q-Q》jsp、htmlQ-Q》浏览器响应
包唯一?br />4Q指定多个struts文g
<struts>

<constant name="struts.action.extension" value="do,action"/>
    <include file="department.xml" />
    <include file="employee.xml" />
   
</struts>
employee.xml如下Q?br /><?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
    <package name="employee" namespace="/control/employee" extends="struts-default">
        <action name="helloWord" class="cn.itcast.action.HelloWorldAction" method="execute" >
            <param name="savepath">/employee</param>
            <result name="success">/WEB-INF/page/message.jsp</result>
        </action>
            
    </package>
</struts>

youngturk 2012-06-04 23:04 发表评论
]]>
redirecthttp://www.aygfsteel.com/youngturk/archive/2012/05/31/379674.htmlyoungturkyoungturkThu, 31 May 2012 08:05:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/05/31/379674.htmlhttp://www.aygfsteel.com/youngturk/comments/379674.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/05/31/379674.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/379674.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/379674.htmlredirect重定向的路径不能在WEB-INF目录下,WEB-INF目录下用的是dispatcher跌{.
example:
d面Q用L录错误时候,采用重定向redirect方式Q返回到d界面
plaintext定向视图时候将视图源码输出
<action name="redirect"> <!-- 默认class?ActionSurport 默认 Ҏ为excute result默认值是success -->
         <result type="redirect">/redirect.jsp?username=${username}</result><!-- 默认h转发cM    dispatcher -->
 </action>

youngturk 2012-05-31 16:05 发表评论
]]>
关于jsphttp://www.aygfsteel.com/youngturk/archive/2012/04/12/373894.htmlyoungturkyoungturkThu, 12 Apr 2012 00:42:00 GMThttp://www.aygfsteel.com/youngturk/archive/2012/04/12/373894.htmlhttp://www.aygfsteel.com/youngturk/comments/373894.htmlhttp://www.aygfsteel.com/youngturk/archive/2012/04/12/373894.html#Feedback0http://www.aygfsteel.com/youngturk/comments/commentRss/373894.htmlhttp://www.aygfsteel.com/youngturk/services/trackbacks/373894.html最外层的jsp才能用redirectq行定向跌{QwebRoot里面能在action中用redirect属?br />

youngturk 2012-04-12 08:42 发表评论
]]>
struts 的启?/title><link>http://www.aygfsteel.com/youngturk/archive/2012/04/10/373700.html</link><dc:creator>youngturk</dc:creator><author>youngturk</author><pubDate>Tue, 10 Apr 2012 06:03:00 GMT</pubDate><guid>http://www.aygfsteel.com/youngturk/archive/2012/04/10/373700.html</guid><wfw:comment>http://www.aygfsteel.com/youngturk/comments/373700.html</wfw:comment><comments>http://www.aygfsteel.com/youngturk/archive/2012/04/10/373700.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/youngturk/comments/commentRss/373700.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/youngturk/services/trackbacks/373700.html</trackback:ping><description><![CDATA[<div>struts1 通过servlet启动<br />struts2 通过filter启动 在web.xml中编?br /><br /><span style="font-family: Arial; color: black; font-size: 20pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-bidi-font-family: +mn-cs; mso-color-index: 1; mso-font-kerning: 12.0pt; language: en-US">在struts2中filter的StrutsPrepareAndExecuteFilter</span><span style="font-family: 宋体; color: black; font-size: 20pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-bidi-font-family: +mn-cs; mso-color-index: 1; mso-font-kerning: 12.0pt; language: zh-CN">?/span><span style="font-family: Arial; color: black; font-size: 20pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-bidi-font-family: +mn-cs; mso-color-index: 1; mso-font-kerning: 12.0pt; language: en-US">init()</span><span style="font-family: 宋体; color: black; font-size: 20pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-bidi-font-family: +mn-cs; mso-color-index: 1; mso-font-kerning: 12.0pt; language: zh-CN">Ҏ中将会读取类路径下默?br /><br />的配|文?/span><span style="font-family: Arial; color: black; font-size: 20pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-bidi-font-family: +mn-cs; mso-color-index: 1; mso-font-kerning: 12.0pt; language: en-US">struts.xml</span><span style="font-family: 宋体; color: black; font-size: 20pt; mso-ascii-font-family: Arial; mso-fareast-font-family: 宋体; mso-bidi-font-family: +mn-cs; mso-color-index: 1; mso-font-kerning: 12.0pt; language: zh-CN">完成初始化操?br /><br />myeclipse 9.0<br />tomcat 6<br />jdk 6<br /><br />struts-2.2.3.1配置问题<br /><br />臛_q几个架包需要加入: <p>commons-fileupload-1.2.2.jar<br />commons-io-2.0.1.jar<br />commons-lang-2.5.jar<br />commons-logging-1.1.1.jar<br />freemarker-2.3.16.jar<br />javassist-3.11.0.GA.jar<br />ognl-3.0.1.jar<br />struts2-core-2.2.3.1.jar<br />xwork-core-2.2.3.1.jar</p> <p> <wbr></p> <p>最重要的是qx我们看普通的文章的话说struts2的架包就需要那五个Q但是这栯?br /><br />来的E序Q对于我的配|,<br /><br />tomcat apache-tomcat-6.0.32<br /><br />会出错,</p></span></div><img src ="http://www.aygfsteel.com/youngturk/aggbug/373700.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/youngturk/" target="_blank">youngturk</a> 2012-04-10 14:03 <a href="http://www.aygfsteel.com/youngturk/archive/2012/04/10/373700.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">ϵ</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">Զ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ͱ</a>| <a href="http://" target="_blank">ɳ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ζ</a>| <a href="http://" target="_blank">³ľ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʡ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ֹ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˶</a>| <a href="http://" target="_blank">Ϫ</a>| <a href="http://" target="_blank">Ͷ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͨ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʲ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank">º</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">־</a>| <a href="http://" target="_blank">ȫ</a>| <a href="http://" target="_blank">ƽ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>