Hi
I'm trying to have two radios on my jsp page,for example i have radio1 and radio2,i need when i check radio1 to pop up a jsp page
that displays radio1 is on,the same when i check radio2 in need to pop up a jsp page that displays radio2 is on.
I'm trying that and i'm getting internal servlet error(java.lang.nullpointerException),iknow that i'm working on reference without initializing it.
How can i make it work?
thanks for your time.
Here is my source code:
//====================
<html>
<form action="radioResponse.jsp">
<body bgcolor="#996600">
radio1 <input type="radio" name="radio1" ><br>
radio2 <input type="radio" name="radio2" ><br>
<input type="submit" >
</form>
</body>
</html>
//===========================
//==========================
<%if(request.getParameter("radio1".equals("on"){ %>
radio1 is on
<%}else{%>
radio1 is of
<%}%>
<%if(request.getParameter("radio2".equals("on"){ %>
radio2 is on
<%}else{%>
radio2 is off
<%}%>
//============================
I'm trying to have two radios on my jsp page,for example i have radio1 and radio2,i need when i check radio1 to pop up a jsp page
that displays radio1 is on,the same when i check radio2 in need to pop up a jsp page that displays radio2 is on.
I'm trying that and i'm getting internal servlet error(java.lang.nullpointerException),iknow that i'm working on reference without initializing it.
How can i make it work?
thanks for your time.
Here is my source code:
//====================
<html>
<form action="radioResponse.jsp">
<body bgcolor="#996600">
radio1 <input type="radio" name="radio1" ><br>
radio2 <input type="radio" name="radio2" ><br>
<input type="submit" >
</form>
</body>
</html>
//===========================
//==========================
<%if(request.getParameter("radio1".equals("on"){ %>
radio1 is on
<%}else{%>
radio1 is of
<%}%>
<%if(request.getParameter("radio2".equals("on"){ %>
radio2 is on
<%}else{%>
radio2 is off
<%}%>
//============================