Oiii estou com uma pequena duvida…
Tenho uma pagina que acessa o twitter
porem o metodo não está em scriptlet ta em um servlet
dai uque eu faço tem a pagina index
que chama a o servlet que por sua vez chama a outra pagina com as informaçoes.
Index que chama o servlet
[code]
JSP Page
</head>
<body>
<h1>Twitter teste</h1>
<form action="i.msg" method="post">
<input type="submit" value="twitter" />
</form>
</body>
[/code]
Servlet que que manda as informações para outra pagina
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
List<Twitter_Base> twitterMsgs = Twitter_LastMsgs.twitterLastMsgs();
request.setAttribute("twittermsgs", twitterMsgs);
request.getRequestDispatcher("twitter.jsp").forward(request, response);
}[/code]
Pagina aonde mostra
[code]<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<center>
<body>
<table width="200" border="0">
<c:forEach items="${twittermsgs}" var="c">
<tr>
<td align="left" valign="top">
<img src="Imagens/twitter.png" width="13" height="13" alt="twitter"/>
</td>
<td align="left" valign="top">
<font color="#414141" face="verdana" style="font-size:10px">${c.mensagem}</font>
</td>
</tr>
<tr>
<td valign="top" align="right">
</td>
<td valign="top" align="right">
<font color="#939393" face="calibri" style="font-size:9px;">- ${c.data} as ${c.hora} </font>
<img src="Imagens/twitter2.png" width="207" height="4" alt="twitter2"/>
</td>
</tr>
<tr>
<td valign="top" align="right">
</td>
<td valign="top" align="left" height="4px">
</td>
</tr>
</c:forEach>
<tr>
<td valign="top" align="right">
</td>
<td valign="top" align="right">
<img src="Imagens/twitterlogo.png" width="76" height="17" alt="twitterlogo"/>
</td>
</tr>
</table>
</body>
</center>
</html>
oque eu quero e fazer é acessar a pagina aonde mostra diretamente e ja vir as informações porem não quero usa scriplet so servlet
Alguem pode me dizer como fazer isso ou tenha um exemplo básico?