Chinaunix首页 | 论坛 | 博客
  • 博客访问: 24827
  • 博文数量: 7
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 85
  • 用 户 组: 普通用户
  • 注册时间: 2013-02-28 10:37
文章分类

全部博文(7)

文章存档

2013年(7)

我的朋友

分类: Java

2013-02-28 10:42:08

taglib标签在web.xml中报错处理方法 [转贴 2009-4-7 22:21:08]   
我顶 字号:  

struts2开发中遇到这个问题,web.xml如下:


 xmlns=""
 xmlns:xsi=""
 xsi:schemaLocation=" ">

 person


 
 
  Spring OpenEntityManagerInViewFilter
  
   org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
  

 

 
  Spring OpenEntityManagerInViewFilter
  /*
 

 
  struts2
  
   org.apache.struts2.dispatcher.FilterDispatcher
  

 

 
  struts2
  /*
 

 
 
  action2-cleanup
  
   org.apache.struts2.dispatcher.ActionContextCleanUp
  

 

 
  sitemesh
  
   com.opensymphony.module.sitemesh.filter.PageFilter
  

 

 
  action2
  
   org.apache.struts2.dispatcher.FilterDispatcher
  

 


 
  action2-cleanup
  /*
 

 
  sitemesh
  /*
 

 
  action2
  /*
 

  
   sitemesh-decorator
   
    WEB-INF/sitemesh-decorator.tld
   

  

  
   sitemesh-page
   WEB-INF/sitemesh-page.tld
  


 
  index.jsp
 

 
  
   org.springframework.web.context.ContextLoaderListener
  

 

其中的taglib标签加入后,eclipse会报cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'. ... 错误。

解决方法是在taglib外面加个jsp-config标签:


  
   sitemesh-decorator
   
    WEB-INF/sitemesh-decorator.tld
   

  

  
   sitemesh-page
   WEB-INF/sitemesh-page.tld
  

 

标签使用详解
包括 两个子元素。
    
   其中元素在JSP 1.2时就已经存在;而是JSP 2.0 新增的元素。
     元素主要有八个子元素,它们分别为:
    
     1.:设定的说明;
     2.:设定名称;
     3.:设定值所影响的范围,如:/CH2 或 /*.jsp;
     4.:若为true,表示不支持EL 语法;
     5.:若为true,表示不支持<% scripting %>语法;
     6.:设定JSP 网页的编码;
     7.:设置JSP 网页的抬头,扩展名为.jspf;
     8.:设置JSP 网页的结尾,扩展名为.jspf。


阅读(461) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:jstl的fmt:formatDate不起作用的原因

给主人留下些什么吧!~~