Chinaunix首页 | 论坛 | 博客
  • 博客访问: 783978
  • 博文数量: 738
  • 博客积分: 7000
  • 博客等级: 少将
  • 技术积分: 5000
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-12 09:00
文章分类

全部博文(738)

文章存档

2011年(1)

2008年(737)

我的朋友

分类:

2008-09-12 09:02:34

1.
      //注意: index="引号+数字"
      hi,hahahaha
     

     


    2.spring配置文件
    applicationContext.xml配置文件放在本项目的工作目录下,即是:springMVC应用程序下。或者Web项目的WEB-INF目录下


    3.web.xml,config.xml等各配置文件中,若批处理命令中参数(如:web-app 2.2/web-app 2.4版本不匹配问题及encoding编码与平台的默认编码不符合问题)
    都会显示错误。


   
          PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "">


    4.java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener
     registered?
     at
     org.springframework.web.servlet.support.RequestContextUtils.getWebApplicationContext(RequestC
     o
     ntextUtils.java:84)
     at
     org.springframework.web.servlet.support.RequestContext.initContext(RequestContext.java:206)
     at
     org.springframework.web.servlet.support.JspAwareRequestContext.initContext(JspAwareRequestCon
     t
    ............


    解决办法:
   
    contextConfigLocation
   
    /WEB-INF/applicationContext.xml
   

   

   
   
    org.springframework.web.context.ContextLoaderListener
   

   

    将上述的代码添加到web.xml文件,注意是:标签之前。

 


    5.配置taglib


   
            xmlns:xsi=""
        xsi:schemaLocation="
        "
        version="2.4">

        // 注意:此版本需要, web-app_2_2.xsd则不要。
          
        
            /spring
        

        
           /WEB-INF/spring.tld
        

    

          

 


    6.ListIterator

     注意:void remove()
              从迭代器指向的 collection 中移除迭代器返回的最后一个元素(可选操作)。

       Iterator和ListIterator的不同使用方法


    我们在使用List,Set的时候,为了实现对其数据的遍历,我们经常使用到了Iterator(跌代器)。使用跌代器,你不
    需要干涉其遍历的过程,只需要每次取出一个你想要的数据进行处理就可以了。

    但是在使用的时候也是有不同的。List和Set都有iterator()来取得其迭代器。对List来说,你也可以通过
    listIterator()取得其迭代器,两种迭代器在有些时候是不能通用的,Iterator和ListIterator主要区别在以下方
    面:

[1]  

【责编:Ken】

--------------------next---------------------

阅读(872) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~