I need to build a very simple bulletin chat board based on a single Servlet.
The website will include
a landing page (index.html) that displays the current messages.
a second page (composeMsg.html) to compose a message.
The landing page should include a link to the second page.
The landing page will also call the Servlet (http GET) that will retrieve all current messages and display them.
In the compose page, upon submit (http POST), the form data will be processed by the Servlet and stored .
the questions:
How can i call the Servlet (http GET) from the landing page to retrieve all messages and display them? all the examples i saw based on a
<form>
and a SUBMIT button.. i want that the landing page will display the messages automatically.In the compose page: how can i display the landing page after the user sends a new message? i know that i can get a new response Writer and send the HTML line by line but it looks unnecessary to me... is there a simple way to do that?
(please do not use javascript)
thanks!