1.出现的问题如下图

  八月份以前没有问题,但从九月份开始就会出现乱码问题

Struts2中date标签乱码问题解决Struts2中date标签乱码问题解决

2.开始解决

  (1)在使用标签的JSP中加入:

<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="sx" uri="/struts-dojo-tags"%>

   与   

<sx:head debug="true"   
             locale="zh"   
             parseContent="true"   
             extraLocales="en-us,zh-cn,de-de"   
     />

如: 

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="sx" uri="/struts-dojo-tags"%>
<html>
  <head>
    <title>表单</title>
    <sx:head debug="true"   
             locale="zh"   
             parseContent="true"   
             extraLocales="en-us,zh-cn,de-de"   
     />

.....

  (3) 最终样式

Struts2中date标签乱码问题解决

 

相关文章:

  • 2022-03-11
  • 2021-08-21
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2021-07-28
  • 2021-08-26
  • 2021-11-29
猜你喜欢
  • 2021-07-27
  • 2021-06-09
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2021-09-17
  • 2022-12-23
相关资源
相似解决方案