jsp超级链接传中文

l28155320 2008-08-30 05:23:05
源代码:<a href="x.jsp?Area="+Area+""> Area值: or Area='市南区'
<a href="x.jsp?Area= or Area='市南区'">
页面超级链接属性:<a href='x.jsp?Area= or Area=
为什么页面上超级链接的属性不显示中文“市南区”???
而<a href="x.jsp?Area=市南区">这样超级链接就会显示.但是我现在需要Area里面的值( or Area='市南区')
还请各位高手指点指点
...全文
319 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
l28155320 2008-08-30
  • 打赏
  • 举报
回复
各位大虾这一句够用么?不够我就把整个页代码复制过来
l28155320 2008-08-30
  • 打赏
  • 举报
回复
out.print("<a href='search_results_list.jsp?Area="+Area+"&HotLocus="+HotLocus+"&FoodCatena="+FoodCatena+"&Consumption="+Consumption+"&Discount="+Discount+"&Trait="+Trait+"&page="+(s)+"'>["+(s+1)+"]</a>");
l28155320 2008-08-30
  • 打赏
  • 举报
回复
对了,查看源文件之后还可以看到<a href="b.jsp?Area= or Area='市南区'">,就是页面上的超级链接属性不显示市南区
herowzz 2008-08-30
  • 打赏
  • 举报
回复
你还是把你的整个代码贴出来吧,这样方便给你找错误
l28155320 2008-08-30
  • 打赏
  • 举报
回复
不是乱码,而是只有b.jsp?Area= or Area=(然后就没了,就是不出市南区这三个字)两个页的都是GBK的
phyerbarte 2008-08-30
  • 打赏
  • 举报
回复
现在显示的到底是什么?是乱码么?
herowzz 2008-08-30
  • 打赏
  • 举报
回复
那就是在页面传递的时候编码乱了
设置一下request.setCharacterEncoding("GBK")
l28155320 2008-08-30
  • 打赏
  • 举报
回复
我的目的就是从a.jsp传Area= or Area='市南区',然后在b.jsp中接到值,然后把值让超级链接继续传下去<a href=c.jsp?Area="+Area+">
l28155320 2008-08-30
  • 打赏
  • 举报
回复
Area里的值是从另一个页传过来的
herowzz 2008-08-30
  • 打赏
  • 举报
回复
你Area值是怎么获得的?
在页面里获得得就是中文吗?

我刚测试在单页面里正常.

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<html>
<head>
<title>test</title>
</head>
<%String area = "or Area='市南区'"; %>
<body>
hahaaaa<br>
<a href="x.jsp?Area=<%=area %>">点击</a>
</body>
</html>
l28155320 2008-08-30
  • 打赏
  • 举报
回复
我是在服务器上运行的问题
QUERY123123 2008-08-30
  • 打赏
  • 举报
回复
url过滤,一般在服务器中配
如在TOMCAT中的conf/service.xml中的端口标签内加上 URIEncoding="GBK"就行
l28155320 2008-08-30
  • 打赏
  • 举报
回复
页面全是GBK
herowzz 2008-08-30
  • 打赏
  • 举报
回复
页面编码不同,建议全部设成UTF-8
基于JSP的博客系统论文+源码+数据库 基于JSP的博客系统 摘要: Blog是Web blog的缩写,中文就是“网络日志”,在中国我们称它为博客。它被解释为一个特定的软件系统, 被用来在网络上出版、发表和张贴个人的文章并且通常是由简短且经常更新的帖子所构成,这些张贴的文章都按照年份和日期倒序排列。Blog的内容和目的有很大的不同,从对其他网站的超级链接和评论,有关公司、个人构想到日记、照片、诗歌、散文,甚至科幻小说的发表或张贴都有。而此系统也主导这一思想,主要为了完善地实现注册用户发表文章,访客可以匿名发表评论等相关功能来设计,并且完成前台运作和管理。 博客就是以网络作为载体,简易迅速便捷地发布自己的心得,即时有效轻松的与他人进行交流,再集丰富多彩的个性化展示于一体的综合性平台。博客系统可以充分展示每个用户的内心世界、工作感受、技术资料等方面的资讯。博客是个独立站点任何人都可以方便的来使用,就像每个人拥有自己的笔记本开始书写一样简单。 系统功能保留了统博客系统的功能,同时又加上了人性化的界面设计,比如日历、音乐的引用。完善的数据更新能力、实用的管理以及个性化的设计使本系统能适应博客的发展。 系统页面采用Html语言和Css样式以及JavaScript脚本来设计,系统的相关功能由Java语句来实现,使用Tomcat为服务器,和Oracle 数据库作为后台,采用Jsp+Servlet+JavaBean模式来完成系统的相关功能。主要分为游客角色和用户角色。游客可以注册、查看日志、照片、博主的资料和匿名发表评论。用户则完成写日志、修改日志、上照片、管理照片、更改个人信息、添加收藏、退出系统等功能。 关键字: 博客 系统 Jsp A BLOG SYSTEM BASED ON JSP Abstracts:Blog is the abbreviation of Web blog, whose Chinese meaning is “the network diary”. In China, we call it Blog, which is explained as specific software used to publish individual articles in the network and usually consists of a brief and frequently updated posts, these articles posted in reverse chronological order, and date. Blog content and purpose are quite different from other websites, the hypertext links and comments about the company, personal diary, photographs, and ideas to poetry, prose, even science fiction published or posted. For this purpose, our system is designed to perfect some correlative functions, such as publish articles for the registration users, publish anonymous comments for the visitors, and complete the foreground operations and managements. Blog is simple to network as the carrier, rapid conveniently released their experiences, instant effectively communicate easily with others, then set colorful personalized display in an integrated platform. Blog system can fully display each user's inner world, work experience and technical data, etc. Blogging is a independent site anyone can easily to use, like everyone has his notebook to write. It not only retains the traditional Blog system, but also adds com personal windows design, such as the quote of calendar, and music. Based on the flawless ability of data renewal, useful backstage management and personal design, this system can adapt to the development of Blog. System using Html page language and Css styles and JavaScript scripts, system design by the relevant function, use Java statements for the server, and Tomcat Oracle database, using a backend Jsp+Servlet+JavaBean mode to complete system of related functions.It mainly divided into tourist roles and user role. Visitors can view the log, photographs, and the material and anonymous blogger comment. Users will finish writing blog, modify log, uploading photos and pictures, the change of personal information management system, add collection, exit etc. functions. Key words:Blog System Jsp 目录 引言 1 1 博客及相关技术概述 2 1.1 个人博客的概念 2 1.2 个人博客的发展现状 2 1.3 WEB技术的发展 2 1.4 WEB开发技术 3 2 需求分析 7 2.1 系统目标 7 2.2 系统功能要求 7 2.3 系统的性能要求 8 2.4 系统的性能要求 9 3 概要设计 10 3.1 系统体系结构 10 3.2 主要功能设计 10 3.3 数据库设计 12 3.4 信息安全设计 14 4 详细设计 15 4.1 首页及主要页面设计 15 4.2 功能模块设计 15 4.3 系统实现 15 5 遇到的难点和解决方法 29 6 结束语 30 参考文献 31 致 谢 39

67,538

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧