2
I have the saida.jsp. It is my page that depending on the option chosen by the user, it is mounted in one way. I have two options for the user verbs and adverbios. In case the user clicks on the option verbs it will be redirected to the page saida.jsp and it will be mounted in a form. The same goes for the option adverbios. My problem is when the user selects the option verbs, then it goes back to page and selects the option adverbios. When this happens, the page adverbios appears as if it were verbs. I’ve looked into it, I’ve been told it’s a session mistake, but I’m not really a session expert.
if(str.equals("verbos")){
extrair = Extrair.verbos();
verbos.contVerb = extrair.contverb;
request.getSession().setAttribute("verbos", verbos);
rd = request.getRequestDispatcher("saida.jsp");
}
else if(str.equals("adverbios")){
extrair = Extrair.adverbios();
adverbios.contAdv = extrair.contadv;
request.getSession().setAttribute("adverbios", adverbios);
rd = request.getRequestDispatcher("saida.jsp");
}
That’s the treatment I said. I don’t know how to handle session, someone could enlighten me?
Extrair.();
- that does not compile.– Victor Stafusa