I have my JSP that controls the frame behavior of my page as the following:
<%
print_header();
String especialidade = request.getParameter("especialidade");
String medico = request.getParameter("medico");
String paciente = request.getParameter("paciente");
String data_consulta = request.getParameter("data_consulta");
String convenio = request.getParameter("convenio");
if (especialidade == null) {
print_especialidade_form();
} else if(paciente == null) {
print_agendamento_form();
}
print_footer();
%>
I have the definition of the functions defined in the same JSP, delimited by <%!
and %>
tags, but the creation of the form, that happens inside of those functions, get executed even if the function isn't called like print_footer();
for instance.
I 'm used to programming in ASP and I could easily do these there, but I'm having a hard time migrating to JSP. What am I doing wrong?