Plzzzzzzzzzzzzzzzzzzzzz recover the error from my jsp

developed a code to access database from jsp page.
not working , giving exceptions
here is the code:[
<html>
<link rel="stylesheet" type="text/css" href="p.css">
<head>
<title>Forum</title>
</head>
<body background="t.jpeg">
<table border=1 width="100%" frame="box" cellspacing=0>
<tr >
<td colspan=2 class="red" align="center">
<b>Knowledge Based System
</td>
</tr>
<tr >
<td colspan=2 bgcolor="blue" >&nbsp</td>
</tr>
<tr >
<td class="yellow" width="15%" >
&raquo Why join
<br><br><br><br><br><br>&raquo Register
<br><form name="loginform" action="" method="POST">
Login Name
<input type="text" name="LoginName" size=10 maxlength=25><br>
Password
<input type="password" name="Password" size=10 maxlength=15><br><br>
<input type="button" value="Submit" onClick="checkForm();">
<script language="JavaScript" type="text/javascript">
<!--
function checkForm()
if(document.loginform.LoginName.value="")
alert("Please enter your Last name");
document.loginform.LoginName.focus();
else if (document.loginform.Password.value == "")
alert("Please enter your Last name");
document.loginform.Password.focus();
else
document.loginform.submit();
// -->
</script>
</form>
</td>
<td valign="top">
<table class="orange" width="100%">
<tr>
<td align="right" nowrap="nowrap" >
<b>&laquo; Previous</b>
<b>1</b>
|
<a href="category.jspa?categoryID=21&start=15
>2</a>
|
<a href="category.jspa?categoryID=21&start=30
>3</a>
|
<a href="category.jspa?categoryID=21&start=45
>4</a>
|
<a href="category.jspa?categoryID=21&start=60
>5</a>
|
<a href="category.jspa?categoryID=21&start=75
>6</a>
|
<a href="category.jspa?categoryID=21&start=90
>7</a>
|
<a href="category.jspa?categoryID=21&start=105
>8</a>
|
<a href="category.jspa?categoryID=21&start=120
>9</a>
|
<a href="category.jspa?categoryID=21&start=135
>10</a>
<b><a href="category.jspa?categoryID=21&start=15
>Next &raquo;</a></b>
</td>
</tr>
<tr ><td >&nbsp</td></tr>
<tr>
<td >
<b><font size=5 >Java Forum</font></b><hr>
</td>
</tr>
<tr ><td colspan=14>&nbsp</td></tr>
<tr ><td colspan=14 >
<div align="right" >
<form action="register.html">
<input type="submit" border="0" value=" Post New Topic &raquo; " />
</form>
</div></td>
</tr>
<tr ><td colspan=14>&nbsp</td></tr>
<tr ><td colspan=14>&nbsp</td></tr>
<!--central table will be created -->
<!-- this is the problematic code-->
<%@ page import="java.sql.*" %>
<%
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
Connection conn=DriverManager.getConnection("jdbc:odbc:data","","");
Statement stat=conn.createStatement();
ResultSet rs=stat.executeQuery("select FirstName,LastName from UserAccount where LoginName='asd'");
%>
<tr >
<td>
<table rules="all">
<tr>
<td colspan=3 align="left" width=20%>FirstName</td>
<td colspan=4 align="left" width=25%>LastName</div></td>
</tr>
<%
while(rs.next())
%>
<tr>
<td colspan=3 width=20%>
<%= rs.getString(1)
%>
</td>
<td colspan=4 width=20%>
<%= rs.getString(2)%>
</td>
</tr>
<% } }
catch(SQLException e)
{%>
<%=e%>
<%}
catch(Exception er)
{%>
<%=er%>
<%} %>
</table>
</td>
</tr>
<!--End of central table-->
<tr rowspan=10 height=35%>
<td>&nbsp</td>
</tr>
<tr>
<td valign="top" align="right" nowrap="nowrap" class="orange">
<b>&laquo; Previous</b>
<b>1</b>
|
<a href="category.jspa?categoryID=21&start=15
>2</a>
|
<a href="category.jspa?categoryID=21&start=30
>3</a>
|
<a href="category.jspa?categoryID=21&start=45
>4</a>
|
<a href="category.jspa?categoryID=21&start=60
>5</a>
|
<a href="category.jspa?categoryID=21&start=75
>6</a>
|
<a href="category.jspa?categoryID=21&start=90
>7</a>
|
<a href="category.jspa?categoryID=21&start=105
>8</a>
|
<a href="category.jspa?categoryID=21&start=120
>9</a>
|
<a href="category.jspa?categoryID=21&start=135
>10</a>
<b><a href="category.jspa?categoryID=21&start=15
>Next &raquo;</a></b>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

Here's a few links to some of the many 3rd party programs that copy music from the iPod to the computer (that Vixen refers to).
One of the most recommended is Yamipod. This is a free program that transfers music from iPod back to the computer. However, it does not transfer playcounts/ratings etc.
Another free program is Pod Player.
SharePod is also freeware.
If you want to recover just the structure of playlists from the iPod (and not the actual song files themselves), there's iRepo for Windows. which I understand has this feature along with all the standard features for these programs.
iPodRip also has the feature enabling you to reconstruct playlists.
There is also CopyTrans. This does preserve ratings/playcounts etc if those are important to you but this program is not free. It also supports video transfer.

Similar Messages

  • How to retrieve the data from a jsp page for print?

    i have a dynamic jsp file which will get the data at runtime.I have a print button in the jsp.When i chick the print button it should capture the data from the jsp and print it as LANDSCAPE mode. Now i am using Java Api for this
              Following code is a working sample which prints some data in LANDSCAPE mode..This is working fine....How can i modify this to get the data from a jsp?....I am using weblogic workshop for development
              package Awtjava;
              //working example
              import java.awt.*;
              import java.awt.print.*;
              public class testPrint implements Printable {
              private static String s[];
              private static Font f;
              private static int nLines;
              public static void main (String arg[]){
              s = new String[10];
              f = new Font("Arial", Font.PLAIN, 11);
              int i;
              s[0] = "This is a printer test";
              for (i=1; i<10; i++){
              s[i] = "The next line";
              nLines = 10;
              testPrint.printa();
              public static void printa(){
              System.out.println("public static void printa () ");
              PrinterJob pj=PrinterJob.getPrinterJob();
              Book b = new Book();;
              PageFormat pf = new PageFormat();
              pf = pj.defaultPage(pf);
              b.append(new testPrint(), pf, 2);
              pj.setPageable (b);
              try{
              if (pj.printDialog()){
              pj.print();
              catch (Exception e) { System.out.println ("Error"); }
              public int print (Graphics g1, PageFormat pf, int n){
              System.out.println("public int print");
              int x,y,i,fa,fh;
              FontMetrics fm;
              Graphics2D g = (Graphics2D) g1;
              pf.setOrientation(PageFormat.LANDSCAPE);
              fm = g.getFontMetrics (f);
              fa = fm.getMaxAscent();
              fh = fm.getHeight();
              x = (int)pf.getImageableX();
              y = (int)pf.getImageableY() + fa;
              g.setFont (f);
              g.setColor(Color.black);
              if (n==1){
              for (i=0; i<10; i++){
              g.drawString (s, x, y);
              y += fh;
              return PAGE_EXISTS;
              else {
              for (i=10;i<10; i++){
              g.drawString (s[i], x, y);
              y += fh;
              return PAGE_EXISTS;
              Hope you will reply soon...
              Thanks in advance
              Maria

    Hey, I got a doubt that who will call the print method in the same program and what about the g.drawString() it is showing any output effect. Finally how the variable n will get initializing to 0 and 1 for two times respectively. Can u please elaborate on this...

  • HT204406 My HDD crashed which held all of my music.  Can I recover the music from iTunes Match and download it back to a new HDD?

    My HDD crashed and it contained all of the music from which iTunes and iMatch pulled files from.  Is there a way to recover the music from iTunes Match and download it back to my new HDD?

    My computer HDD did not crash only my external drive with the music files.  I have not had to reinstall iTunes software.  The iTunes libarary is still complete and shows the complete list of music.  I have also ran Update iTunes Match and all of the music is on the cloud.
    I cannot play the music from iTunes that is on the cloud, however the music I purchased from iTunes did download and it will plan from my computer.
    The matched or uploaded music is what will not download and I can't find a command that allows me to download from Match.
    Sorry if I'm not being very clear, however I do really appreciate your help and suggestions.

  • HT204053 I am using my Apple ID for me and for my wife. when I sync. the phones i lost all my wife contact. how do i recover the contact from i cloud?

    I am using my Apple ID for me and for my wife. when I sync. the phones i lost all my wife contact. how do i recover the contact from i cloud?

    While I have a few ideas, I think you'd have better luck troubleshooting this in the iCloud forum.

  • How to capture the data from a JSP form

    Hi
    I have a JSP form, My task is to capture the data from a JSP and submit to Data Base. for example I have the field like
    Enter Table name to be created in data base: The table name is to be captured by a servlet and by that table name, table should be created in the data base.
    Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????
    Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????

    Get the entered value from the jsp into servlet using request.getParameter("enteredTableName"). it will return the String,pass this table name to execute query using JDBC connection and statement objects.
    -cheers Ram

  • Can i recover the data from a broken XD card?

    Can i recover the data from a broken XD card? any software Power Data Recovery. but it failed

    Accidentally deleted data from XD card, don't panic. I suggest an advance and professional XD card recovery software, you can use third-party software Kernel for Digital Media Recovery Tool. It can quickly restore all lost data from XD card. This software
    also supports all kinds of multimedia files such as SD Card (Secure Digital), Multi Media Card (MMC), Compact Flash (CF), XD Card, Micro SD card, , Memory Stick. To more details kindly read this post : http://digitalmediarecovery.blogspot.com/2013/12/retrieve-lost-data-from-memory-card.html

  • I've broke my phone, it won't switch on, is there any way to recover the data from it?

    My phone has split up the side after I dropped it down some concrete stairs and now it won't switch on, so I need to know if there is anyway to recover the data from it, such as phone numbers, photo's etc. Anyone had this problem?
    I've tried plugging it in to the computer but it doesn't do anything, and tried plugging it in to the wall to see if that will switch it on, but nothing.
    Any help gratefully received! Steve

    If it will not turn on - you have zero chance of getting anything off the phone.

  • I lost my hard drive contents and itunes wasn't backed up. Can I recover the library from my iPad?

    I lost my hard drive contents and itunes wasn't backed up. Can I recover the library from my iPad?

    You won't be able to recover you entire library from your iPad but you can recover some of its contents by transferring the purchases back to iTunes. http://support.apple.com/kb/HT1848 This will not transfer anything you did not purchase from iTunes, for example music or video files you had stored on the HD and you put into iTunes. Without a backup that information is gone. One very important thing to keep in mind. Once you sync the iPad to the new iTunes it will remove all the afore mentioned music or video files from the iPad. Do not sync with iTunes if you want to keep those files. Hope that helps.

  • How to recover the mailboxes from the decommissioned exchange db .

    Hello All,
    I have 2 EDB files on my exchange server which is no longer active its been decommissioned and the EDB mailbox is dismounted, 
    I would like to recover few emails/mail boxes from the EDB file and am not able to find any free tool which can help me in recovering the emails, 
    1. How to recover the mailboxes from the decommissioned exchange db 
    2.Tried using from free 3rd party tools which helped me view the mail boxes however am  unable to convert or recover the emails using the demo/ trial version and cant think of buy/purchasing the application since its very expensive $299 and $399 
    I know there are lot of exchange gurus here who can help me with some workaround in recovering the mailboxes from the EBD or on how to convert the edb file to pst 
    Looking forward to get some help from exchange gurus 
    Thanks, 
    Jean
    Jean

    Hello All,
    I have 2 EDB files on my exchange server which is no longer active its been decommissioned and the EDB mailbox is dismounted, 
    I would like to recover few emails/mail boxes from the EDB file and am not able to find any free tool which can help me in recovering the emails, 
    1. How to recover the mailboxes from the decommissioned exchange db 
    2.Tried using from free 3rd party tools which helped me view the mail boxes however am  unable to convert or recover the emails using the demo/ trial version and cant think of buy/purchasing the application since its very expensive $299 and $399 
    I know there are lot of exchange gurus here who can help me with some workaround in recovering the mailboxes from the EBD or on how to convert the edb file to pst 
    Looking forward to get some help from exchange gurus 
    Thanks, 
    Jean
    Jean
    Hello,
    There are so many third party software available in Web that can easily fix your Exchange Database issues, you can check out such  a software from here http://www.exchangerecoverytools.org . By using this software (Kernel for Exchange Server Recovery),
    you can immediately repair and convert damaged EDB to PST files.

  • My document.numbers can not be opened how can i recover the version from yesterday i was not using time machine and it was not in icloud. is there an app i can buy that might help

    my document.numbers can not be opened how can i recover the version from yesterday? i was not using time machine and it was not in icloud. is there an app i can buy that might help

    Thanks Andy,
    I wish I could have told my sister about this as she could not open my homepage back before my new iWeb site. She now can open my site without the yet in case denial window does appear = I thank you.
    I think my iWeb site works as Noone has said otherwise from any platform etc...
    Alex L
    I do agree that should not have to be a consideration for any users so i agree that it would be great if Apple could allow simplicity to run seemlessly.
    I have had this problem since Homepage, and here is
    what has worked for me. I send out the link, and
    then for PC users I send the link with "<" after the address (without quotation
    marks. e.g., <http://site.com>).
    I also put a note that if that doesn't work, to just
    copy and paste the link into a browser. With that I
    have only had 1 person say they still can't open.
    Everyone else gets it to work.
    It's a lot to do and seems like a hassle, but you get
    used to it.
    Hope this helps!
    Andy Martini
    PS - APPLE! When are you going to fix this??! It
    seems like such a small thing yet you guys have been
    stumped for YEARS on this!

  • If I got a new hard drive on my computer and plugged in the time capsule afterwards, would I be able to recover the information from my old hard drive that was stored on the time capsule prior to the replacement?

    If I got a new hard drive on my computer and plugged in the time capsule afterwards, would I be able to recover the information from my old hard drive that was stored on the time capsule prior to the replacement?

    This may be of some help to you...
    http://pondini.org/TM/14.html
    From the FAQs Here...
    http://pondini.org

  • Plzzzzzzzzzz recover the error i have tried alot

    plzz guys this is third time i m sending this code
    try to correct it. i m not getting the error. it giving
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.
    the code is
    <html>
    <head>
    <%@ page language="java" import="java.sql.*" %>
    <body>
             <h3><font color ="#800080"><center><Entry Before Repairs</center></FONT></h3>
               <BODY BGCOLOR="#B0C4DE">
               <style type="text/css">
                 body, td, th {
                     font-family: verdana;
                     font-size:13pt;
                     font-color:#800080;
                th {
                    text-align: center;
                 h1 {
                     font-size: 150%;
                     text-align: center;
               </style>
               <form action="new1.jsp" method="POST" name="new.jsp">
               <table width="45%">
             <tr>
               <td width="12%"><font color="#800080"><h5>SNo.</h5></font</td>
               <td width="18%">
               <input type="TEXT" name="sno"/>
              </td>
               <td width="16"><font color="#800080"><h5>Nature</h5></font</td>
               <td width="52">
               <select name="nature">
               <option value="">Laptop</option>
               <option value="">PC</option>
               <option value="">Printer</option>
               <option value="">Monitor</option>
               <option value="">Peripherals</option>
               </select>
               </td>
             <tr>
               <td width="18"><font color="#800080"><h5>Description</h5></font</td>
               <td width="18">
               <textarea cols="20" rows="5" name="desc" /></textarea>
              </td>
               <td width="78"><font color="#800080"><h5>Serial No.</h5></font</td>
               <td width="68">
               <input type="TEXT" name="ser_no" />
              </td>
             <tr>
               <td width="78"><font color="#800080"><h5>Gatepass</h5></font</td>
               <td width="68">
               <input type="TEXT" name="gatepass" />
              </td>
               <td width="78"><font color="#800080"><h5>Probem</h5></font</td>
               <td width="68">
               <textarea cols="20" rows="5" name="problem" /></textarea>
              </td>
              <tr>
               <td width="78"><font color="#800080"><h5>Vendor</h5></font</td>
               <td width="68">
               <select name="vendor">
             <%
                   Connection con = null;
                   Statement stmt = null;
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("jdbc:odbc:database");
                   stmt = con.createStatement();
                   ResultSet rs = stmt.executeQuery("select * from vendor");
                    if(rs != null)
                        while(rs.next()) {
                          String venname = rs.getString("ven_name");
              %>
                   <option selected><%= venname %></option>
              <%
               %>
                     </select></td>
               <td width="78"><font color="#800080"><h5>Return Status</h5></font</td>
               <td width="68">
               <select name="ret_sts">
               <option value="">Yes</option>
               <option value="">No</option>
              </td>
             </tr>
           <tr>
               <td width="78"><font color="#800080"><h5>source</h5></font</td>
               <td width="68">
               <select name="source">
             <%
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("jdbc:odbc:database");
                   stmt = con.createStatement();
                   rs = stmt.executeQuery("select * from location");
                    if(rs != null)
                        while(rs.next()) {
                          String locname = rs.getString("loc_name");
              %>
                   <option selected><%= locname %></option>
              <%
               %>
                     </select></td>
               <td width="78"><font color="#800080"><h5>Designation</h5></font</td>
               <td width="68">
               <select name="desi">
                <%
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("jdbc:odbc:database");
                   stmt = con.createStatement();
                   rs = stmt.executeQuery("select * from location");
                    if(rs != null)
                        while(rs.next()) {
                          String locname = rs.getString("loc_name");
              %>
                   <option selected><%= locname %></option>
              <%
               %>
                     </select></td>
            </tr>
              <tr>
               <td width="78"><font color="#800080"><h5>Employee No.</h5></font</td>
               <td width="68">
                <input type="TEXT" name="emp_no" />
              </td>
               <td width="78"><font color="#800080"><h5>Employee Name</h5></font</td>
               <td width="68">
               <input type="TEXT" name="emp_name" />
              </td>
             </tr> 
            <tr>
               <td width="78"><font color="#800080"><h5>Date Out Source</h5></font</td>
               <td width="68">
               <input type= "text" name="dos">
               </td>
              <td width="78"><font color="#800080"><h5>Date in Designation</h5></font</td>
               <td width="78">
               <input type="text" name="did">
               </td>
              </tr>
               <tr>
               <form action="new1.jsp" method="post" name="new.jsp" id="<h5>submit</h5>">
               <td><BUTTON name="post" type="submit"><h5><font color="#800080">SUBMIT</font><h5></BUTTON></td>
               </form>
              </tr>
          </body>
    </html>new1.jsp is
    <html>
    <%@ page language="java" import="java.sql.*" %>
    <body>
    <%
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        int sno  =Integer.parseInt(request.getParameter("sno"));
        String nature = request.getParameter("nature");
        String desc = request.getParameter("desc");
        String ser_no = request.getParameter("ser_no");
        int gatepass  =Integer.parseInt(request.getParameter("gatepass"));
        String problem = request.getParameter("problem");
        String vendor = request.getParameter("vendor");
        String ret_sts= request.getParameter("ret_sts");
        String source = request.getParameter("source");
        String desi = request.getParameter("desi");
        int emp_no  =Integer.parseInt(request.getParameter("emp_no"));
        String emp_name = request.getParameter("emp_name");
        String dos = request.getParameter("dos");
        String did = request.getParameter("did");
        Connection con = null;
        Statement stmt = null;
       con=DriverManager.getConnection("jdbc:odbc:database");
       stmt = con.createStatement();  
       int rowsAffected = stmt.executeUpdate("INSERT INTO br(sno, nature, desc, ser_no, gatepass, problem, vendor, ret_sts,     
                    source, desi, emp_no, emp_name, dos, did) values('" + sno + "'," + nature + ",'" + desc + "','"
                         + ser_no + "',,'" + gatepass + "','" + problem + "'," + vendor + "," + ret_sts + "," + source + "," +
                      desi + ",'" + emp_no + "','" + emp_name + "','" + dos + "','" + did + "')");
              if(rowsAffected == 1)
         %>
             <h1>success</h1>
         <%
               else
         %>
           <h1>failed</h1>
         <%
            stmt.close();
            con.close();
          %>
        </body>
        </html>plz help me
    regards

    hi
    i m not getting the desired output. can u plz help me.
    i have correct the error but don't know where is the error
    can u plz check the other code i have used to insert record. its also not working
             <%@ page session="false" %>
             <html>
             <body>
                <%@ page language="java" import="java.sql.*" %>
               <body bgcolor="#FFE4E1">
               <font color="#A0522D"><h1>Appllication</h1></font</td>
               <table width="45%">
             <tr>
               <td width="12%"><font color="#800080"><h5>SNo.</h5></font</td>
               <td width="18%">
               <input type="TEXT" name="sno"/>
              </td>
               <td width="16"><font color="#800080"><h5>Nature</h5></font</td>
               <td width="52">
               <select name="nature">
               <option value="Laptop">Laptop</option>
               <option value="PC">PC</option>
               <option value="Printer">Printer</option>
               <option value="Monitor">Monitor</option>
               <option value="Peripherals">Peripherals</option>
               </select>
               </td>
             <tr>
               <td width="18"><font color="#800080"><h5>Description</h5></font</td>
               <td width="18">
               <textarea cols="20" rows="5" name="desc" /></textarea>
              </td>
                <td width="78"><font color="#800080"><h5>Serial No.</h5></font</td>
               <td width="68">
               <input type="TEXT" name="ser_no" />
              </td>
                 <tr>
               <td width="78"><font color="#800080"><h5>Gatepass</h5></font</td>
               <td width="68">
               <input type="TEXT" name="gatepass" />
              </td>
               <td width="78"><font color="#800080"><h5>Probem</h5></font</td>
               <td width="68">
               <textarea cols="20" rows="5" name="problem" /></textarea>
              </td>
              <tr>
               <td width="78"><font color="#800080"><h5>Vendor</h5></font</td>
               <td width="68">
               <select name="vendor">
             <%
                   Connection con = null;
                   Statement stmt = null;
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("jdbc:odbc:database");
                   stmt = con.createStatement();
                   ResultSet rs = stmt.executeQuery("select * from vendor");
                    if(rs != null)
                        while(rs.next()) {
                          String venname = rs.getString("ven_name");
              %>
                   <option selected><%= venname %></option>
              <%
               %>
                     </select></td>
               <td width="78"><font color="#800080"><h5>Return Status</h5></font</td>
               <td width="68">
               <select name="ret_sts">
               <option value="yes">Yes</option>
               <option value="no">No</option>
              </td>
             </tr>
           <tr>
               <td width="78"><font color="#800080"><h5>source</h5></font</td>
               <td width="68">
               <select name="source">
             <%
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("jdbc:odbc:database");
                   stmt = con.createStatement();
                   rs = stmt.executeQuery("select * from location");
                    if(rs != null)
                        while(rs.next()) {
                          String locname = rs.getString("loc_name");
              %>
                   <option selected><%= locname %></option>
              <%
               %>
                     </select></td>
               <td width="78"><font color="#800080"><h5>Designation</h5></font</td>
               <td width="68">
               <select name="desi">
                <%
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("jdbc:odbc:database");
                   stmt = con.createStatement();
                   rs = stmt.executeQuery("select * from location");
                    if(rs != null)
                        while(rs.next()) {
                          String locname = rs.getString("loc_name");
              %>
                   <option selected><%= locname %></option>
              <%
               %>
                     </select></td>
            </tr>
              <tr>
               <td width="78"><font color="#800080"><h5>Employee No.</h5></font</td>
               <td width="68">
                <input type="TEXT" name="emp_no" />
              </td>
               <td width="78"><font color="#800080"><h5>Employee Name</h5></font</td>
               <td width="68">
               <input type="TEXT" name="emp_name" />
              </td>
             </tr> 
            <tr>
               <td width="78"><font color="#800080"><h5>Date Out Source</h5></font</td>
               <td width="68">
               <input type= "text" name="dos">
               </td>
              <td width="78"><font color="#800080"><h5>Date in Designation</h5></font</td>
               <td width="78">
               <input type="text" name="did">
               </td>
              </tr>
              <p>
              <tr>
               <form action="ent2.jsp" method="post" name="app1.jsp" id="<h3>submit</h3>">
               <td><BUTTON name="post" type="submit"><h3><font color="#A0522D">SUBMIT</font><h3></BUTTON></td>
               </form>
              </tr>
             </p>
              <td><BUTTON name="reset" type="Reset"><h3><font color="AQ522D">RESET</font></h3></BUTTON></td>                    
              </form>        
             </body>
            </html>ent2.jsp is
    <html>
      <head>
        <title> Application</title>
      </head>
      <body>
            <%@ page language="java" import="java.sql.*" %>
            <body bgcolor="#FFE4E1">
        <%
        int sno  =Integer.parseInt(request.getParameter("sno"));
        String nature = request.getParameter("nature");
        String desc = request.getParameter("desc");
        String ser_no = request.getParameter("ser_no");
        int gatepass = Integer.parseInt(request.getParameter("gatepass"));
        String problem = request.getParameter("problem");
        String vendor = request.getParameter("vendor");
        String ret_sts = request.getParameter("ret_sts");
        String source = request.getParameter("source");
        String desi = request.getParameter("desi");
        int emp_no = Integer.parseInt(request.getParameter("gatepass"));
        String emp_name = request.getParameter("emp_name");
        String dos = request.getParameter("dos");
        String did = request.getParameter("did");  
                 Connection con = null;
              Statement stmt = null;
              PreparedStatement ps = null;
                    ResultSet rs = null;
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                      con=DriverManager.getConnection("jdbc:odbc:database");
                            String sql = "SELECT * FROM br WHERE sno like ?";
                               ps = con.prepareStatement(sql);
                               ps.setString(1, "%" + sno + "%");
                               rs = ps.executeQuery();
                               if(!rs.next())
                   String sq;
                      sq = INSERT INTO br(sno, nature, desc, ser_no, gatepass, problem, vendor, ret_sts, source, desi,
                                    emp_no, emp_name, dos, did) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
                   ps = con.prepareStatement(sq);
                   stmt = con.createStatement();
                            boolean proceed = false;
                     if(nature != null && desc != null && ser_no != null && problem != null && vendor != null && ret_sts
                              != null && source != null && desi != null && emp_name != null && dos != null && did != null)
                            if(nature.length() > 0 && desc.length() > 0 && ser_no.length() > 0 && problem.length() > 0 &&
                               vendor.length() > 0 && ret_sts.length() > 0 && source.length() > 0 && desi.length() > 0 &&
                               emp_name.length() > 0 && dos.length() > 0 && did.length() > 0)
                             proceed = true;
                   if(proceed) {
                        ps.setInt(1,sno);
                        ps.setString(2,nature);
                                    ps.setString(3,desc); 
                                    ps.setString(4,ser_no);
                                    ps.setInt(5,gatepass);
                                    ps.setString(6,problem);
                                    ps.setString(7,vendor);
                                    ps.setString(8,ret_sts);
                                    ps.setString(9,source);
                                    ps.setString(10,desi);
                                    ps.setInt(11,emp_no);
                                    ps.setString(12,emp_name);
                                    ps.setString(13,dos);
                                    ps.setString(14,did);                               
                                 ps.executeUpdate();
                %>                
                                  <font color="#A0522D"><h2>Record submitted!</h2></font</td>               
                 <%
                          else
                 %>                 
                                     <font color="#A0522D"><h2>Record Already exist!</h2></font</td>
                 <%              
                    } catch (SQLException e) {
                   out.println(e.getMessage());
              } catch (ClassNotFoundException e) {
                   out.println(e.getMessage());
              } finally {
                   try {
                        if(rs != null) {
                                            rs.close();
                                            rs = null;
                                    if(stmt != null) {
                             stmt.close();
                                            stmt = null;
                        if(ps != null) {
                             ps.close();
                                            ps = null;
                        if(con != null) {
                             con.close();
                                            con = null;
                   } catch (SQLException e) {}
        %>
        <form action="app1.jsp" method="post" name="ent2.jsp" id="<h4>NEXT!</h4>">
        <td><BUTTON name="post" type="submit"><h4><font color="#A0522D"> NEXT!</font></h4></BUTTON></td>
        <p>
    </body>
    </html>its giving error like
    C:\tomcat\Tomcat 4.1\work\Standalone\localhost\jsp\ent2_jsp.java:83: ';' expected
              sq = INSERT INTO br(sno,nature,desc,ser_no,gatepass,problem,vendor,ret_sts,source,desi,
    ^
    1 error
    plz try to solve this error
    regards

  • Where is the Error? in JSP

    I have develpoed a small application in java. which contains on one servler and one jsp page.
    Here is the servlet code:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class Controller extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    //Initialize global variables
    public void init() throws ServletException {
    //Process the HTTP Get request
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType(CONTENT_TYPE);
    // PrintWriter out = response.getWriter();
    String teststring = "Good";
    request.setAttribute("Noman", teststring);
    RequestDispatcher reqdispatcher = this.getServletConfig().getServletContext().getRequestDispatcher("model1.jsp");
    reqdispatcher.forward(request,response);
    //Clean up resources
    public void destroy() {
    and here is the jsp page code:
    <html>
    <head>
    <title>
    model1
    </title>
    </head>
    <body bgcolor="#ffffff">
    <!--<form method="GET" action="Controller">
    JBuilder Generated JSP
    </form><-->
    <% String a = (String)request.getAttribute("Noman"); %>
    <%= a %>
    </body>
    </html>
    I want to pass a string drom servlet to jsp page.
    but when i run the jsp page. it displays null value in string.
    Where is the error.
    i tried it a lot but can not find error in code.
    plz help me.
    Thanks
    Nomi

    i have passed the URL of servlet to run then it shows that error
    Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Errortype Exception reportmessage Internal Server Errordescription The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.exception java.lang.IllegalArgumentException: Path model1.jsp does not start with a "/" character
    at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:572)
    at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:174)
    at test.Controller.doGet(Controller.java:21)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:534)
    i have not wrote any "/" character . i dont know what is that ?

  • Saving the output from a JSP request

    I have developed a decision support web site that amongst other things generates a "report" page. Now my client would like to add the ability for users of the site to have that report emailed out to them.
    Sending the email obviously isn't a problem, but getting the content into it is. I really don't want to have to duplicate all the JSP code from the report page (there's a lot, including calls to beans etc), and reformat the entire thing with hundreds of out.write("<table>") like statements, or nasty plain-text formatted equivalents.
    So...is there a way to "save" the output generated by the server before it gets sent back to the user - ideally to a local file that I can then just dump straight into the email message. I can't just call the page (internally on the server) to see its output, as it's user-specific and uses a lot of session-related information.
    Cheers for any advice...
    Iain

    It's actually possible to do what I want to do by getting the server to call the page internally (I didn't think it was).
    A simple URLConnection to the appropriate page with the jessionid appended gives me back the page as the user would see it. I can then just stream the response from that to file/email/whatever.
    When the user clicks on their "email" link, I just call a jsp file (or a servlet) with the following code:
         URLConnection uc;
            BufferedInputStream fin;
         BufferedOutputStream fout;
         String location = "http://localhost:8080/blah/report.jsp"
              + ";jsessionid=" + session.getId();
         String filename = "C:\\output.html";
         try
              uc = new URL(location).openConnection();
              fin  = new BufferedInputStream(uc.getInputStream());
              fout = new BufferedOutputStream(new FileOutputStream(filename));
              int byteRead = fin.read();
              while (byteRead != -1)
                   fout.write(byteRead);
                   byteRead = fin.read();
              fout.close();
              fin.close();
         catch (Exception e) {}Now all I have to do is go learn how to write multipart emails using JavaMail...

  • How to recover the data from a  dropped table in production/archive mode

    How to recover the data/change on a table that was dropped by accident.
    The database is on archive mode.

    Oracle Version. ? If 10g.
    Try this Way
    SQL> create table taj as select * from all_objects where rownum <= 100;
    Table created.
    SQL> drop table taj ;
    Table dropped.
    SQL> show recyclebin
    ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
    TAJ              BIN$b3MmS7kYS9ClMvKm0bu8Vw==$0 TABLE        2006-09-10:16:02:58
    SQL> flashback table taj to before drop;
    Flashback complete.
    SQL> show recyclebin;
    SQL> desc taj;
    Name                                      Null?    Type
    OWNER                                              VARCHAR2(30)
    OBJECT_NAME                                        VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                          NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                                      DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    SQL>M.S.Taj

Maybe you are looking for

  • Authorization issue in HR: Manager has access to other employees

    Hello Gurus, I need to restrict access to HR reports to Users based on their group segment. Situation I am facing is that a level 1 user(Segment manager) belonging to a particular Group segment is getting access to data of employees other than those

  • Enhanced Receiver Determination synchronous

    Hi all, I am running into a bit of a problem when using enhanced receiver determination on a SOAP - XI - RFC scenario on a NW2004 SP17 XI system. According to the help.sap.com (http://help.sap.com/saphelp_nw04/helpdata/en/43/a5f2066340332de10000000a1

  • The call button doesn't react. Insertion installation anew helps. It is established 5,0,1. How it is possible to win it?

    Добрый день. Возникла проблема с телефоном iPhone 4s. При наборе номера кнопка звонка не активна. Помогает полная перепрошивка телефона. Установлена iOS 5.0.1. Как решить эту проблему. Это происходит раз в неделю.

  • Remove entries from safary reading list?

    Does anybody know how to remove entries from the safary reading list?

  • Zoom In Timeline while Dragging

    I've been having the problem where the timeline zooms in when I try to drag clips and came across this solution: http://forums.adobe.com/message/5099556#5099556 In step 4 it says to replace the contents from the frameworks file with the new HandlerTi