fixing up content type for JSON. Going HTML5
This commit is contained in:
parent
e7a4eebf04
commit
6124d21a74
2 changed files with 4 additions and 4 deletions
|
|
@ -363,6 +363,7 @@ public class AlbumServlet
|
||||||
try {
|
try {
|
||||||
Mapper mapper = new Mapper();
|
Mapper mapper = new Mapper();
|
||||||
res.setContentType("application/json");
|
res.setContentType("application/json");
|
||||||
|
res.setCharacterEncoding("UTF-8");
|
||||||
PrintWriter out = res.getWriter();
|
PrintWriter out = res.getWriter();
|
||||||
out.println("{");
|
out.println("{");
|
||||||
out.println(" \"name\": " + jsStr(entry.getName()) + ",");
|
out.println(" \"name\": " + jsStr(entry.getName()) + ",");
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
<!DOCTYPE html>
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
<html lang="en">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
<meta name="viewport" content="width = 600" />
|
<meta name="viewport" content="width = 600" />
|
||||||
<title>$entry.name</title>
|
<title>$entry.name</title>
|
||||||
|
|
||||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="${assets}/fancybox/jquery.fancybox-1.3.1.pack.js"></script>
|
<script type="text/javascript" src="${assets}/fancybox/jquery.fancybox-1.3.1.pack.js"></script>
|
||||||
<script type="text/javascript" src="${assets}/fancybox/jquery.easing-1.3.pack.js"></script>
|
<script type="text/javascript" src="${assets}/fancybox/jquery.easing-1.3.pack.js"></script>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue