fixing up content type for JSON. Going HTML5

This commit is contained in:
Knut Forkalsrud 2011-12-31 17:13:43 -08:00
parent e7a4eebf04
commit 6124d21a74
2 changed files with 4 additions and 4 deletions

View file

@ -363,6 +363,7 @@ public class AlbumServlet
try {
Mapper mapper = new Mapper();
res.setContentType("application/json");
res.setCharacterEncoding("UTF-8");
PrintWriter out = res.getWriter();
out.println("{");
out.println(" \"name\": " + jsStr(entry.getName()) + ",");

View file

@ -1,12 +1,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width = 600" />
<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.easing-1.3.pack.js"></script>