Hello there! I have a service and it's service(IrequestCycle cycle) method
is being called twice...

I enter the url:
http://localhost:8080/mgjug/app?service=newsService&newsId=2
and the method:
public void service(IRequestCycle cycle) throws IOException {
        response.setContentType("text/xml");
        response.setHeader("Cache-Control", "no-cache");
        Long id = Long.valueOf(cycle.getParameter("newsId"));
        News news = newsService.getNews(id);
        PrintWriter writer = response.getWriter();
        writer.write("<news>");
        writer.write("<id>"+news.getId()+"</id>");
        writer.write("<content>"+news.getContent()+"</content>");
        writer.write("</news>");
    }

is called twice. I've checked the cycle.isRewinding() but it always outputs
false. What could be wrong here?

Regards

Reply via email to