Galera sei q esse tema ja foi abordado, mais o problemas q ja vi varios exemplos e apostilas porem o meu nao esta funcionando, se alguem puder dar uma ajuda, agradeço…
<td colspan="1" rowspan="1" align="left"><input name="p_arg_names" value="305029415420361884" type="hidden">
<input name="p_t01" size="30" maxlength="2000" id="P11_USERNAME" tabindex="2" type="text">
<input type="text" name="text01" value="" width="2000" />
</td></tr><tr><td align="right" nowrap="nowrap"><label for="P11_PASSWORD"><a class="htmldbGALabel" href="javascript:popupFieldHelp('305029923184370331.4555','2844958924271403','Fechar')" tabindex="999">Senha</a></label></td>
<th class="CF"><a href="./sVerificaUsuario;" title="Clique aqui para saber mais sobre como começar." style="margin: 2px; text-align: center; font-size: 10px; display: block;">Clique aqui para saber mais sobre como começar.</a></th>
Servlet:
public class sVerificaUsuario extends HttpServlet {
Connection conDB;
protected void processRequest(HttpServletRequest req, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
}
protected void doGet(HttpServletRequest req, HttpServletResponse response)
throws ServletException, IOException {
String s = (req.getParameter("text01"));
conDB = new Conexao().getConnection();
Statement stm;
String x = ""+s;
try{
stm = conDB.createStatement();
ResultSet rs = stm.executeQuery(" select codigo from CADSENHA " +
" where codigo = '"+s +"'");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet sVerificaUsuario</title>");
out.println("</head>");
out.println("<body>");
if (rs.next())
out.println("<h1>Servlet sVerificaUsuario at " +rs.getString(1) + "</h1>");
out.println("</body>");
out.println("</html>");
out.close();
}catch (SQLException ex){
}
}
protected void doPost(HttpServletRequest req, HttpServletResponse response)
throws ServletException, IOException {
processRequest(req, response);
}
public String getServletInfo() {
return "Short description";
}
}
<td colspan="1" rowspan="1" align="left"><input name="p_arg_names" value="305029923184370331" type="hidden">
<input name="p_t02" size="30" maxlength="2000" onkeypress="return submitEnter(this,event)" id="P11_PASSWORD" tabindex="3" type="password">
[color=red]Mensagem do moderador: ao postar codigos utilize as tags [ code ] e [ /code ].[/color]