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



Home Answers Viewqa JDBC JSP run problem

Have Programming Question? Ask it here!
 
 
 


Nishant P Thite
JSP run problem
2 Answer(s)      2 years and 5 months ago
Posted in : JDBC


type Exception report

message 

description The server encountered an internal error () that prevented it from fulfilling this request.

exception 

org.apache.jasper.JasperException: Exception in JSP: /bb.jsp:52

49:                 {
50:                 out.println("Failed to success");
51:                 }
52:                 pstat.close();
53:                 con.close();
54:             
55:             


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause 

java.lang.NullPointerException
    org.apache.jsp.bb_jsp._jspService(bb_jsp.java:96)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.25 logs.

Advertisement
View Answers

March 27, 2012 at 4:39 PM


Post your code. It seems that there is a programming error. Check your code.



March 28, 2012 at 9:32 AM


OK this the code plz help me as quik as possible thnk u

blackberry.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <title>Blackberry & Datacard Asset</title>
    <head>
    <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />  


    <!--[if lte IE 7]>
    <link rel="stylesheet" href="css/ie.css" type="text/css" charset="utf-8" />
    <![endif]-->
    </head>


    <body>
        <div id="header">


            <a href="index.html" id="logo"><img src="images/EATON-Logo.gif" alt="LOGO" /></a>

        <div id="navigation">   

            <ul>        
            <li class="first"><a href="index.html">Home</a></li>
            <li class="selected"><a href="Asset.html">Asset Allocation</a></li>
            <li><a href="services.html">Contact</a></li>
            <li><a href="solutions.html">About</a></li>             

            </ul>       
        </div>


        <div id="search">       

            <form action="">
            <input type="text" value="Search" class="txtfield" onblur="javascript:if(this.value==''){this.value=this.defaultValue;}"onfocus="javascript:if(this.value==this.defaultValue){this.value='';}" />

            <input type="submit" value="" class="button" />
            </form>     
        </div>  
</div> 




<!-- /#header -->   
        <div id="contents"> 
        <div class="background">
        <h3></h3>
<div id="contents"> 
<div class="background">
<h3></h3>
<p>
<a href="blackberry.html">BlackBerry & DataCards</a>. 
</p>        

<center>
<form name="form" action="bb.jsp" method="post">

<table cellpadding=12 cellspacing=6 border="1" bgcolor="#efefef" align="center">
    <th bgcolor="#efefef" colspan=8>
    <font size=5>BlackBerry & DataCards Asset</font> <br>
    <font size=2 color="red"><sup>*</sup> Required Fields</font></th>

<tr bgcolor="#efefef">
        <td valign=top>EID<b><sup>*</sup></b></td>
        <td><input type="text" name="eid" value="" size=10
            maxlength=10> <br>
        </td>
    </tr>

<tr bgcolor="#efefef">
        <td valign=top>UserName<b><sup>*</sup></b></td>
        <td><input type="text" name="usernm" value="" size=25
            maxlength=10> <br>
        </td>
    </tr>

<tr bgcolor="#efefef">
        <td valign=top>WS NUmber<b><sup>*</sup></b></td>
        <td><input type="text" name="wsno" value="" size=25
            maxlength=10> <br>
        </td>
    </tr>


<tr bgcolor="#efefef">
        <td valign=top>Device<b><sup>*</sup></b></td>
        <td><select name="device" id="course" style="width: 158px;">
            <option value="Select">---- Select ----</option>
            <option value = "Blackberry">BlackBerry</option>
            <option value = "DataCards">DataCard</option>
            </select> <br>
        </td>
    </tr>


<tr bgcolor="#efefef">
        <td valign=top>Model<b><sup>*</sup></b></td>
        <td><input type="text" name="model" value="" size=10
            maxlength=10> <br>
        </td>
    </tr>


<tr bgcolor="#efefef">
        <td valign=top>Service Provider<b><sup>*</sup></b></td>
        <td><input type="text" name="service" value="" size=20
            maxlength=10> <br>
        </td>
    </tr>

<tr bgcolor="#efefef">
        <td valign=top>IMEI Number<b><sup>*</sup></b></td>
        <td><input type="text" name="imei" value="" size=15
            maxlength=10> <br>
        </td>
    </tr>

<tr bgcolor="#efefef">
        <td valign=top>MEID Number<b><sup>*</sup></b></td>
        <td><input type="text" name="meid" value="" size=10
            maxlength=10> <br>
        </td>
    </tr>

<tr bgcolor="#efefef">
        <td valign=top><br>
        <input type="submit" name="add" value="AddNew" size=25></td>
        <td valign=top><br>
        <input type="reset" name="button" value="reset" size=25>
        <br>
        </td>
    </tr>



</table>
</form>
</center>


<h3></h3>
<p>

<a href="laptop.html">Laptop & Desktop</a> 

</p>        

<h3></h3>           
<p> <a href=""> HeadPhone</a> </p>
<p>     
<b></b>             
 <a href="">Phone</a>.<br/><br/>                 
</p>        

</div>  </div> 

</div>
</body>
</html>

bb.jsp


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<%
    String eid = request.getParameter("eid");
    String usernm = request.getParameter("usernm");
    String wsno = request.getParameter("wsno");
    String device = request.getParameter("device");
    String model = request.getParameter("model");
    String service = request.getParameter("service");
    String imei = request.getParameter("imei");
    String meid = request.getParameter("meid");



    Connection con = null;
    PreparedStatement pstat = null;

    int updateQuery = 0;



            try
            {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");  
            con = DriverManager.getConnection("jdbc:odbc:asset");
            String Qry = "INSERT INTO blackberry&datacards(User_id,User_name,WS_no,Device,Model,Service_Provider,IMEI,MEID) values('"+eid+"','"+usernm+"','"+wsno+"','"+device+"','"+model+"','"+service+"','"+imei+"','"+meid+"')";
            pstat = con.prepareStatement(Qry);



            updateQuery = pstat.executeUpdate();

                    if(updateQuery != 0)
                        {%>
                        <br>
                   <TABLE style="background-color: #E3E4FA;" 
                   WIDTH="30%" border="1">
                      <tr><th>Data is inserted successfully in database.</th></tr>
                   </table>
                    <%  
                    }
            }
            catch(Exception e)
                {
                out.println("Failed to success");
                }
                pstat.close();
                con.close();





%>


</html>


Related Tutorials/Questions & Answers:
JSP run problem
JSP run problem  type Exception report message description... this request. exception org.apache.jasper.JasperException: Exception in JSP...) root cause java.lang.NullPointerException org.apache.jsp.bb_jsp
Run time problem
Run time problem  when i run a project,it shows an exception like "unable to create MIDlet".It also shows "running with locale:English_united States.1252 running in the identified third party security domain" "please help
Advertisements
How to compile and run the JSP
How to compile and run the JSP  Hi Kindly tell me how to run and compile JSP small Program using Tomcat as webserver. I created small program HELLO JSP in HTML and compile the program but it is saying Class o r interface
run jsp file
run jsp file  how to run the jsp file in varies web servers  .... The jsp file is to be saved into the web application folder.Let the file... For more information on JSP visit to : JSP Tutorials Thanks
how to run a vlc player in jsp
how to run a vlc player in jsp  how to run a vlc player in jsp
how to run a .exe file in jsp
how to run a .exe file in jsp  i want code for to run a .exe file in jsp
Applet run with appletviewer but not in browser, any code problem.
Applet run with appletviewer but not in browser, any code problem.  Hi,My problem is when I am running my applet in appletviewer index.html, Its work fine but not run from the browser as http://localhost:8080/ProgressoApplication
JSP handle run-time exceptions
JSP handle run-time exceptions  How does JSP handle run-time... to have uncaught run-time exceptions automatically forwarded to an error processing... the browser to the JSP page error.jsp if an uncaught exception is encountered during
how to run jsp appication in eclipse
how to run jsp appication in eclipse  after setting the tomcat in eclipse, i m trying to run jsp page, but the pop up has come that "selection did not contain any resources that can run on server". plase tell me i m new to handle
Problem in jsp.
Problem in jsp.  hello friends, I have a problem in jsp.I want to insert data, which is given by user through a html page into a table.And the table..." action="http://localhost:8080/examples/jsp/insertdata.jsp"> <table> <
Problem in jsp.
Problem in jsp.  hello friends, I have a problem in jsp.I want to insert data, which is given by user through a html page into a table.And the table..." action="http://localhost:8080/examples/jsp/insertdata.jsp"> <table> <
Problem in jsp.
Problem in jsp.  hello friends, I have a problem in jsp.I want to insert data, which is given by user through a html page into a table.And the table..." action="http://localhost:8080/examples/jsp/insertdata.jsp"> <table> <
Jsp problem
Jsp problem  Hello friends.I want to share my jsp problem.I want to show all of my database(mysql) tables except two(user,manufacturer) in a jsp page.plssss help me
jsp problem
jsp problem  problem:::::::: On JSP form ,when i insert data in text field........at that time action is perform and data is retriev from data base and get assign to other field on that form........ when data is assign to other
jsp problem
jsp problem  Hello Friends, I want to show one page for 5 seconds and after that i want to redirect the page to another URL
jsp problem
jsp problem  Hi every one plz give me answer for below question ASAP I created one JSP(used pre defined javascript in jsp to get rtf format in browser) which creats RTF Format in browser to enter data. MY question is after i
how to deploy and run jsp - JSP-Servlet
how to deploy and run jsp  hi anybody plz tell how to deploy and run jsp. and where jsp and html files save in web-inf or any where?  Hi...- WEB-INF-classes | | root web.xml You save the jsp or html
how to run servlet - JSP-Servlet
how to run servlet  pls give me comlete procedure to run the servlet on apache-tomcat 6.0.16 how can i set my classpath, java_home etc. also where i have to save my servlet program and how it compile and then run on web browser
how to run jdbc in jsp program - JSP-Servlet
how to run jdbc in jsp program  i want to use sql server 2005 in jsp program to store data.i know how to run simple program but this program i tried... visit the following links: http://www.roseindia.net/jsp/submit-comments
Jsp error when i run this a jsp file
Jsp error when i run this a jsp file  hi I got this error when i run the jsp file in IDE and outside also please help me java.lang.NullPointerException org.apache.jsp.insertjsp.jspInit(insert_jsp.java:22
platform(s/w requirements) for run jsp programs?
platform(s/w requirements) for run jsp programs?  in which platform jsp programms are run
JSP Problem - JSP-Servlet
JSP Problem  Hi, I have problem,this is my senario I have one jsp,this jsp having the 3 fields.let me take 3fields userName,emailAddress... for more information, http://www.roseindia.net/jsp Thanks
jsp problem - JSP-Servlet
jsp problem  here is a code for Retrieving image from mysql database through jsp. but i cann't set size of image when it was display so what should... working but my problem is size of image. so can u just help?? code
jsp problem - JSP-Servlet
jsp problem  here is a code for Retrieving image from mysql database through jsp. but i cann't set size of image when it was display so what should... working but my problem is size of image. so can u just help?? code
JSP and Servlet did not run - JSP-Servlet
JSP and Servlet did not run  I tried to run this program but when I... --------- Simple Use of Servlet and JSP... the following: 1)index.jsp: Simple Use of Servlet and JSP Conference
run command prompt from jsp program
run command prompt from jsp program  Hi.... Is it possible to run a command prompt from jsp? If possible please help me with some code... Thanks & Regards vanchinathan.R
To run a jsp file automatically - IDE Questions
To run a jsp file automatically  Hi all, I am in need for the solution for - Can a JSP page can be made to run automatically when NetBeans IDE has been started. or we have to compile and run it automatically? I
How to run a simple jsp page in tomcat???
How to run a simple jsp page in tomcat???  i am trying to run a simple jsp page in tomcat,i am having web.xml also in WEB-INF folder. but it is giving me this error below....please help me to solve it. my jsp page code is given
Unable to run jsp files on internet explorer - JSP-Servlet
Unable to run jsp files on internet explorer  Hi, I am Akhilesh Shrivastav. I am new to jsp and a new member of this site. My problem is i wrote a small jsp program stored in the Web-Apps folder of Apache Tomcat. But i
Unable to run the jsp page - JSP-Servlet
Unable to run the jsp page  Expert:Naga Hi, I need solution this program. In cart.jsp I printed the total amount of the products then the next page is shipping and billing details and the next page is payment details. What
jsp problem - JSP-Servlet
jsp problem  hi, i am working on a project of developing a shopping cart for online book store.can it be done using jsp?if yes, can u please help me doing so?  Hi Friend, Please visit the following link: http
jsp usebean problem - Struts
popupwindow jsp below code run.. ...here iam getting the problem..in the below...jsp usebean problem   --Select... jsp
this is my code but i cant able to run it wt is the problem
this is my code but i cant able to run it wt is the problem  import java.io.*; class createthread { int thread=4,i; class thread1 extends createthread { public void run() { for(i=0;i
this is my code but i cant able to run it wt is the problem
this is my code but i cant able to run it wt is the problem  import java.io.*; class createthread { int thread=4,i; class thread1 extends createthread { public void run() { for(i=0;i
problem in programming - JSP-Servlet
problem in programming  Hi! I am new with jsp. I am facing a problem in programming to calculate the time interval between login time and logout time of user
to run html code in web browser - JSP-Servlet
to run html code in web browser  how to run jsp file which calls html file on web browser??  Hi Friend, Try the following code: 1)form.jsp: Enter Name: 2)welcome.html: Add Profile Edit
problem in jsp programming - JSP-Servlet
problem in jsp programming  Write a JSP program which displays a webpage containing arrival of new items within a particular month in the different... in solving the problem : Connection with mysql database
jsp code problem - JSP-Servlet
jsp code problem  Hi, I have employee details form in jsp. After... have a problem with open the next form. plz, help me. thanks,  Hi.... http://www.roseindia.net/jsp/ Thanks
Java Problem - JSP-Servlet
Java Problem  How to run a Simple JSP program ? what steps... the webapps folder of apache tomcat. 5)Create a jsp file 'hello.jsp'.You can put your jsp file either inside the web application folder along with WEB-INF or you
Session Problem in JSP - JSP-Servlet
Session Problem in JSP  I have developed a online feedback form in JSP platform. I have created normal session in JSP page. It is running in my... normally from Remote machine by only writing JSP code.  Hi friend
logout problem?? - JSP-Servlet
logout problem??  sir, the logout code which u have send is not the proper solution coz,by using this code the browser get closed which shuold.../Logout.shtml http://www.roseindia.net/jsp/loginstatus.shtml Thanks
logout problem.. - JSP-Servlet
logout problem..  hi... first of all thanks for ur... but their is some problem with the the logout,i m not able to logout when... done in the code i have used session object in project's servlet and jsp
coding problem - JSP-Servlet
coding problem  dear sir i m very new to JSP sir i m getting problem in dynamically changing the option of combobox from database(ms acess) .and after that option being selected for that the record from the databse should
jsp code problem - JSP-Servlet
jsp code problem  hi, I am going to execute the following code which has been given your jsp tutorial. retrive_image.jsp: but while I... server. plz help me to run this code........ HTTP Status 500 - type Exception
How Run JSP in Apache TomCat Server? - JSP-Servlet
How Run JSP in Apache TomCat Server?  How to Run JSP in Apache Tomcat... pasted my hello world example of JSP in the Jsp-example directory. and tried. ... the Jsp-example\WEB-INF\classes directory and put the class files of your example
jsp reload current page problem
jsp reload current page problem  Hi, i am facing problem while reloading the JSP page
jsp reload current page problem
jsp reload current page problem  Hi, i am facing problem while reloading the JSP page
Statistical charts in JSP - problem
Statistical charts in JSP - problem  hey! i get this error when i run... org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred... An error occurred at line: 11 in the jsp file: /BarChart.jsp
Java Problem - JSP-Servlet
Java Problem  What are the steps to run a java Servlet program.with examples  Hi Friend, Please visit the following link: http://www.roseindia.net/servlets/index.shtml Thanks
Could not able to run Java Applet in JSP using <jsp:plugin>
Could not able to run Java Applet in JSP using   I could not able to run the above example applet in the JSP. Getting class not found exception... the following links: http://www.roseindia.net/jsp/applet-jsp.shtml http
 

 

 

DMCA.com