<%
int count=0;
int num =Integer.parseInt(request.getParameter("number"));
int answer = Integer.parseInt(request.getParameter("ans"));
if(num==answer){
count++;
request.setAttribute("count",count);
pageContext.forward("calnum2.jsp");
}
else
{
count++;
pageContext.forward("calnum3.jsp");
}
%>
jsp에서 자바문 이용할 때 <% %> 이안에 쓰잖아요..
if문 안에
<form name = "nextpage" method = "get" action = "cal2.jsp" >
<input type = "submit" value ="계산기" >
</form>
이런 식의 jsp문 쓸수잇는 방법 없나요ㅠㅠ????
혹시 없다면.. count 변수를 calnum2.jsp로 넘기고 싶은데 어떻ㄱㅔ 넘겨야할까요..?