Showing posts with label servlets. Show all posts
Showing posts with label servlets. Show all posts

Friday, May 18, 2012

Looking for a question that combines the understanding of few web technologies


I am teaching a web development course at a CS department, I wrote most of the final test by now, each question focus on a specific feature or a specific technology,

Monday, May 7, 2012

Creating Java Web Service using Google AppEngine


I'm trying to create a simple web service application where I can retrieve a collection of strings and store them into a data store on the AppEngine server.

Saturday, February 25, 2012

Respond encoding of Google App Engine(can not change response encoding)



public class FeedUpdaterServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
PrintWriter out = resp.getWriter();
req.setCharacterEncoding("utf-8");
resp.setLocale(Locale.TAIWAN);
resp.setContentType("text/html; charset=utf-8");
resp.setCharacterEncoding("utf-8");
resp.getWriter().println("Hello, world!!@!");
out.println("我是人"); //some chinese character
out.println(resp.getCharacterEncoding());
out.flush();
out.close();
}

}

How to capture and record click event on a link to an external URL?


I have the following HTML. I want the URL 'http://www.google.com' to be inserted in the database table on click of the link.

Tuesday, February 21, 2012

Write image file in servlet by using ImageIO


I am using bufferedImage and then by using

browser keeps on looking for the data but never fetches it


Following is a snippet that is meant to fetch the data from the database. But when i click the submit button to see the data, the browser keeps on looking for the data but never displays anything (the browser doesn't show the next page but keeps on looking on the same page) . I don't know what the problem is.

Friday, February 17, 2012