jsp:include 使用jsp:param乱码解决
来源:互联网 发布:21天学通java破解版 编辑:程序博客网 时间:2024/05/17 02:49
如果jsp:include 中的page页面存在乱码 ,则需要在使用<jsp:include page=""> 的页面中的<body>后加上
<%
request.setCharacterEncoding('UTF-8") ;//或者指定的编码(GBK或其他)
%>
如下面所示:
jsp-include.jsp<%@ page language="java" contentType="text/html;charset=UTF-8" %><html> <head><title>jsp include测试页</title></head> <body> <% request.setCharacterEncoding("UTF-8") ; %> <h3>jsp include 指令测试</h3> <jsp:include page="forward-result.jsp"> <jsp:param name="age" value="32" /> <jsp:param name="username" value="张三" /> </jsp:include> </body></html>forward-result.jsp<%@ page language="java" contentType="text/html;charset=UTF-8" %><html> <head><title>forward的结果页</title></head> <body> 年龄:<%=request.getParameter("age")%><br /> 姓名:<%=request.getParameter("username") +"--11"%> </body></html>
- jsp:include 使用jsp:param乱码解决
- jsp:include 使用jsp:param乱码解决
- jsp使用include导入html乱码解决
- jsp:使用include乱码
- 【jsp】<jsp:param/>与<jsp:include/>的配合使用
- 解决 <jsp:forward ><jsp:param> 传值乱码
- <jsp:include page= 与 <jsp:param
- JSP中include文件出现乱码解决
- jsp include 乱码问题的解决
- jsp include 乱码问题的解决
- jsp动作元素介绍 jsp:forward jsp:include jsp:param
- JSP动作元素<jsp:include>和<jsp:param>的搭配使用
- errorPage、jsp:include、jsp:forward、get\post乱码解决
- jsp:param标签使用
- jsp 中的 <jsp:include> <jsp:param>详解
- JSP入门:<jsp:param>中文乱码
- 防止jsp include乱码
- jsp include中文乱码
- 互联网协议入门
- CISCO IOS SSH配置
- linux系统备份
- 锁存器、触发器、寄存器和缓冲器的区别
- android之Binder设计分析
- jsp:include 使用jsp:param乱码解决
- 修改网卡名字
- Android学习笔记之详细讲解画圆角图片
- ORACLE 在not in中使用null的问题
- 约瑟夫问题 大家一起来解决
- jdk与jre的区别
- win7下设置jar包关联方法/could not create the java virtual machine 解决方法
- Learning C from Java
- Android利用canvas画各种图形(点、直线、弧、圆、椭圆、文字、矩形、多边形、曲线、圆角矩形)