Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet JSP Page Error
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Arth Parikh
JSP Page Error
0 Answer(s)      2 years and 2 months 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.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
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
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
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
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
Spring Login Page Error
Spring Login Page Error  Dear Sir/Madam, I used the spring login page code. The index page is working fine. When i try to entry login and password , i am getting the below error: Please help me out in this. Let me know if i
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 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
Customizing the Default Error Page
In this section, you will learn about Customizing the Default Error Page in Spring MVC
jsp page
jsp page  <%@page contentType="text/html" pageEncoding="UTF-8"%>...;%@page import="java.sql.Statement"%> <%@page import="java.sql.DriverManager"%> <%@page import="java.sql.Connection"%> <%@page import
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
custom 404 error page php - PHP
custom 404 error page php  What is this error means: custom 404 error page php
The Page Directive in JSP Page
; in JSP page. And then if a type of error occurs i.e. called the translation-time... The Page Directive in JSP Page     ... of the JSP page which works for the entire JSP page. These directives apply different
jsp page
jsp page  <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
JSP Tutorials - Page 3
JSP Tutorials - Page 3
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  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 page - JSP-Servlet
jsp page  what are elemets and template data in jsp page??  Hi Friend, Template Data is a parameterized content that allows the JSP document to generate a response stream of characters. JSP Elements provides
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 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
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 page submitting
jsp page submitting  whenever i am submitting the jsp page it downloads some unknown file on tomcat server
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 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
JSP page directive tag
JSP page directive tag  What is page directive tag in JSP?.   Hi, The answer given below: The page directive applies to an entire JSP... unit. or Defines attributes that apply to an entire JSP page. Thanks
create a folder in jsp page
create a folder in jsp page  i want to create a folder in jsp page And it can be delete aslo
Advertisements
 

 

 

DMCA.com