JSP Page Error

Ads

 
 

Share on Google+Share on Google+

Arth Parikh
JSP Page Error
0 Answer(s)      5 years ago
Posted in : JSP-Servlet

Hello Sir. I m using Oracle 10g as a database n tomcat server DSN name : NB Username NB Password EBS Table name consumer

When i run jsp page on the browser it only shows the code nothing else..

I have made two files which are as follows

1)New.jsp

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



    <title>Net Bill</title>
    <link rel="stylesheet" type="text/css" href="C:\NB\stylesheets\main.css"></link>

    <!--[if IE]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
  </head>
  <body>




  <div class="header">
  <center><p style="padding-top:30px; font-size:40px; color:#000040;">Net Bill</p></center>
  </div>

  <div class="nav">
<ul style="list-style-type:none; margin:0px; padding:0px; overflow:hidden;">
<li style="float:left"><a href="C:\NB\Index.html">Home</a></li>
<li style="float:left"><a href="C:\NB\About.html">About Us</a></li> 
<li style="float:left"><a href="C:\NB\How.html">How it Works</a></li>
<li style="float:left"><a href="C:\NB\Contact.html">Contact Us</a></li>
</ul>
</div>

<!-- Start of FORM -->
<form method="post" action="insert.jsp.">

<table style="width:700px; height:200px; margin:10px 80px; padding-top:10px; padding-left:30px; font-size:20px;  border-radius:6px; background-color:#000000; color:#C0C0C0;">
<tr>
<td>
First Name :&nbsp; <input type="text" name="fname">
Last  Name :&nbsp; <input type="text" name="lname"></br></br>
User Name  :&nbsp; <input type="text" name="uname"></br></br>
Password   :&nbsp;&nbsp;&nbsp;&nbsp <input type="password" name="pass"></br></br>
Gender     :&nbsp;<input name="Gender" type="radio" value="M">Male
<input name="gender" type="radio"  value="F">Female<br></br>
Age        :&nbsp;<input type="text" name="age"></br></br> 

State      :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp <input type="text" name="state"></br></br>
Mobile     :&nbsp;&nbsp;&nbsp;&nbsp <input type="text" name="mno" float="left"></br></br>Address :</br></br>
&nbsp <textarea style="width:200px; height:50px;"name="address"></textarea></br></br></br>
<center><button type="Submit" name="send" width="100px" height="10px">Submit</button></td></center>
</tr>
</table>








</form>
<!-- End of FORM -->




<div class="footer">
<center><strong>Copy Rights  @ Arth Parikh</strong></div></center>




  </body>
</html>

2) insert.jsp

<%@ page import="package oracle.jdbc.driver;" %>

<%@ page language ="java" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.util.*" %>

<%



String fname = request.getParameter("fname");

String lname = request.getParameter("lname");


String uname = request.getParameter("uname");


String pass = request.getParameter("pass");


String gender = request.getParameter("gender");


String age = request.getParameter("age");


String state = request.getParameter("state");


String address = request.getParameter("address");


String mno = request.getParameter("mno");


int mno=Integer.parseInt(request.getParameter("mno"));



        try{



Class.forName("oracle.jdbc.OracleDriver"); 

 Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","NB","EBS")





Statement st=conn.createStatement();

Resultset rs=st.executeUpdate("insert into consumer(fname,lname,uname,pass,gender,age,state,address,mno)   values('"+fname+"','"+lname+"','"+uname+"','"+pass+"',"+age+",'"+gender+"','"+address+"','"+state+"',"+mno+")"); 
        out.println("Data is successfully inserted!")
        }


        catch(Exception e)
{

 System.out.print(e); 

e.printStackTrace(); 
        }
        %>

Sir please help me as soon as possible my project is on stand by...so soon want a perfect solution.

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
JSP error page - JSP-Servlet
JSP error page  Hi i have 1000 of JSP. but we coded it without adding the . but now i have to forward the page to the specific page when the exception occured in JSP. is there any short cut i can do? do not want to add this line
JSP Error Page
JSP Error Page          JSP Error Page is used to specify the custom... directive. The page errorPage.jsp shows the error generated in calling the JSP page
Advertisements
JSP Page Error
JSP Page Error  Hello Sir. I m using Oracle 10g as a database n... i run jsp page on the browser it only shows the code nothing else.. I have...;/html> 2) insert.jsp <%@ page import="package oracle.jdbc.driver;" %>
JSP Page Error
JSP Page Error  Hello Sir. I m using Oracle 10g as a database n... i run jsp page on the browser it only shows the code nothing else.. I have...;/html> 2) insert.jsp <%@ page import="package oracle.jdbc.driver;" %>
JSP Page Error
JSP Page Error  Hello Sir. I m using Oracle 10g as a database n... i run jsp page on the browser it only shows the code nothing else.. I have...;/html> 2) insert.jsp <%@ page import="package oracle.jdbc.driver;" %>
Error page in JSP
Error page in JSP In this section we will discuss about "Error page... the JSP page a runtime error may occur inside the page or outside the page. JSP... in the directive in the originating JSP page by setting error page parameter like
error while running a jsp page in netbeans
error while running a jsp page in netbeans  this is error that come under column "java db processes" in netbeans Exception in thread "main" java.lang.ExceptionInInitializerError
How to create and use custom error page in jsp
How to create and use custom error page in jsp... and use custom error page in jsp and display an error message. Before run.../TR/html4/loose.dtd"> <%-- include custom error page in this jsp
JSP error
JSP error  what is difference between global-exception and error-page in jsp. which condition they are use
jsp error
jsp error  <p>hi, could please help whenever i run jsp file in my eclipse i got this error.my jsp file is</p> &lt;%@ page language... encountered an internal error () that prevented it from fulfilling this request
jsp error - JSP-Servlet
jsp error  HTTP Status 404 - /jsp... message /jsp/ description The requested resource (/jsp/) is not available..., The 404 or Not Found error message is an HTTP standard response code indicating
JSP Error - JSP-Servlet
JSP Error  When i am running my registration.jsp getting following error. HTTP Status 500... description The server encountered an internal error () that prevented it from fulfilling
jsp error - JSP-Servlet
jsp error  how to remove below error:: exception org.apache.jasper.JasperException: java.lang.NullPointerException root cause...... newpo.jsp:   JSP Page
jsp error - JSP-Servlet
jsp error  Hello, my name is sreedhar. i wrote a jsp application to generate a report from oracledata base and the report should display in Ms-excel... in detail. Visit for more information. http://www.roseindia.net/jsp/ Thanks
Error testing in JSP
" %>. The JSP page where the exception can occur specifies the error page name... Error testing in JSP       This section illustrates you about the error testing in jsp. In JSP, you
jsp error - JSP-Servlet
jsp error  To Upload and insert the file into oracle Database with Current Date and Time In JSP and my project is online library management system plz help how to store some books in particular folder and after how retrive
jsp error - JDBC
jsp error   in this code the else part is nt executing atall. if the 'id'(which i am retriving frm a html page) is nt matched with the database... of that a error is like-----------"java.sql.SQLException: [Microsoft][ODBC Driver Manager
JSP Translation error - JSP-Servlet
JSP Translation error  Hello friends, In a new file declared first variable shows the following error. ----------------------------------------------- An error occurred at line: 2 in the jsp file: /stud
JScript error - JSP-Servlet
JScript error  Hello friends, I am doing jsp... logins while updating profile it will not show any error. But, in many logins it shows error as unterminated string. I am not able
JSP Error 500
JSP Error 500          JSP Error 500 is to generate error status 500 in jsp.  The Error 500 occurred when the server encounter an internal error
Servlet Error - JSP-Servlet
/lib folder if database is mysql. servlet-api.jar jsp-api.jar mysql-connector.... Error showing ==>Admin/FirstServlet is not a servlet Sincerely Prakash   Hi prakash servlet-api.jar jsp-api.jar mysql-connector
Script error - JSP-Servlet
Script error  Hello friends, In my log in page i... running this it shows an error as "STACK OVERFLOW". Correct the code . The code... then send me jsp code. Thanks
jsp runtime error - JSP-Servlet
jsp runtime error  sir, when i am running ur prog... from this website.... http://www.roseindia.net/jsp/poi/readingWriting.shtml i did the same as per guidelines...but i got error..!!!! org.apache.jasper.JasperException
login page error
login page error  How to configure in to config.xml .iam takin... following error arise ."The server encountered an internal error (No action instance... this request." please suggest me.   if your login page is prepared
JSP SQL Error
JSP SQL Error  Hi While trying to execute the below code i'm getting the following error "java.sql.SQLException: Io exception: Got minus one from a read call ". please help me out. <% try{ String Username
jsp-servelet,error http404
jsp-servelet,error http404  I am using mysql commandclient to connect with eclipse using jsp and servelet. I keep getting the error hhtp 404. Register.jsp Name:<input type="text" name="userName"/><
jsp code error - JSP-Servlet
jsp code error  I have a jsp page named "tMastDepartment".which has some table row containing text box like 'project code','Departmentcode','employee_id', 'address', and 'city' and a one dropdown list which contains department
Programming Error - JSP-Servlet
(""); } catch(SQLException se) { out.println("Database Error :"+se.getMessage()); } catch(Exception e) { out.println("General Error :"+e.getMessage... ServletException,IOException {doPost(req,res);} } There is some error
Jsp Error - Development process
Jsp Error  Hi, While executing Add_Data.jsp , am getting following error. "Data type mismatch in criteria expression." "View_Data.jsp...) at jsp_servlet.__add_data._jspService(__add_data.java:146
Programming Error - JSP-Servlet
from it (only one not more than that)then it should get displayed on next page... is access). Then how to do this in jsp?? Please Reply me?? Please do Reply
Programming Error - JSP-Servlet
Page 2 Page 3 Page 5 Page 7 Total Cost: How to use switch statement in jsp i want to calculate the price of placing ad according to user selection if he selects front page then the price given above etc please reply me how