SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Claude Moore wrote:Ok, does PushNewsServlet redirects at the end of its doPost / doGet methods to newsPage.jsp ?
Moreover, can you debug your code and be sure that your request is actually forwarded to PushNewsServlet ?
Claude Moore wrote:At a first glance I cannot see anything wrong with your code. The problem is that you are redirected to loginPage.jsp, that it's also your default welcome page, right ? My guess is that your application server (what appserver are you using, by the way ? ) somehow is not able to redirect to newsPage.jsp and you end with landing on welcome page instead... it's only a guess. I would try to define another welcome page and to redirect, in newsPage servlet, to another pure html page (for example a page with only a text message like 'Done').
This way, I would check that no hidden redirections happen.
Claude Moore wrote:But the content of newsPage.jsp is displayed or not? If I remember well, forward doesn't change the URL you see in your browser. To redirect the browser to another page you have to use sendRedirect method, not forward.
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|