protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request,response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
BlogPersistenceService service = getBlogPersistenceService();
service.createAuthor("john@gmail.com", new Date(), "John Doe", "JDoe", "Test Name");
service.createBlogPost("john@gmail.com", "First Blog Entry", "Hello. This is my first blog entry", null);
Author author = service.getAuthor("john@gmail.com");
PrintWriter out = response.getWriter();
out.println("<html><head><title>OSGi JPA Test Application</title></head></html>");
out.println("<body><h1>");
out.println("Blog entry successfully created: " + author.getDisplayName());