hi all,
i built an web application and now i want to add a menu using frame in HTML or javascript. The problem is all my JSP pages are data dependant from one another that means sometimes i am sending the data using input boxes and sometimes using HIDDEN values in HTML. Now i tried this followig way to use frame and to send my data to other pages but it is not working can anyone please help me.
"DOES ANYONE KNOW WHETHER I CAN USE FRAME IN THE JSP PAGE OR NOT"
LOGIN.HTML
-------------------
<form action="startframe.html" method="post">
<center><h2>Employee Number:</h2></center>
<center><input type="text" name="emplno" maxlength="4"size="4"></center></br>
<center><h2>Password:</h2></center>
<center><input type="password" name="pass" maxlength="6" size="6"></center></br>
<center><input type="submit" value="SUBMIT YOUR INFO"></center>
</form>
</body>
</html>
DATA are GOING FROM LOGIN.HTML TO VARIFYLOGIN.JSP
Now in between these two i used an HTML file to place a frame so that i can use the frame and the code is:
<HTML>
<HEAD>
<TITLE> </TITLE>
<frameset cols="15%,85%">>
<frame name="frame1" src="buttons.html">
<frame name="frame2" src="varifylogin.jsp?emplno=<%=emplno%> &pass=<%=pass%>" >
</frameset>
</HEAD>
<BODY>
</BODY>
</HTML>
"DOES ANYONE KNOW WHETHER I CAN USE FRAME IN THE JSP PAGE OR NOT"
and then it should go to VARIFYLOGIN.JSP which is:
String empl_no = request.getParameter("emplno");
String password=request.getParameter("pass");
Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
Connection con = DriverManager.getConnection("jdbc:odbc:finalmp" );
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT StaffID,FirstName,LastName,Password FROM StaffDetails");
...................................................etc.
i am getting this error on the RIGHT hand side frame meaning it showing the buttons on the left but this error on the right:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:367)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.lang.NullPointerException
org.apache.jsp.varifylogin_jsp._jspService(varifylogin_jsp.java:83)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:320)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856
Can anyone please help me.
Cheers