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



Home Answers Viewqa Java-Beginners delete retailer jsp file (sir..is this a good logic.. jsp file is useful for what purpose)

Have Programming Question? Ask it here!
 
 
 


chandra
delete retailer jsp file (sir..is this a good logic.. jsp file is useful for what purpose)
1 Answer(s)      2 years and a month ago
Posted in : Java Beginners


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Internet Dreams</title>
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" title="default" />

<link rel="stylesheet" media="all" type="text/css" href="c1ss/pro_dropline_ie.css" />
<script type="text/javascript">
function validateForm()
{

var x=document.form1.id.value;

if (x==null || x=="")
  {
  alert("Retailer Id cannot be empty");
  return false;
  }
/*var r=confirm("Untag the products?")
if(r==true)
{
confirm("Are you sure you want to delete retailer?")
}*/

}
</script>
</head>
<body>
<div id="page-heading"><h1>Delete Retailer</h1></div>

<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
    <th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
    <th class="topleft"></th>
    <td id="tbl-border-top">&nbsp;</td>
    <th class="topright"></th>
    <th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
</tr>
<tr>
    <td id="tbl-border-left"></td>
    <td>
    <!--  start content-table-inner -->
    <div id="content-table-inner">

<form name="form1" action="RetController" onsubmit="return validateForm();">
    <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <tr valign="top">
    <td>


        <!--  start step-holder
        <div id="step-holder">

            <div class="step-dark-left"><a href="">Registration Form</a></div>
            <div class="step-dark-right">&nbsp;</div>

        </div>
         end step-holder -->
    <br/>

        <!-- start id-form -->
        <table border="0" cellpadding="0" cellspacing="0"  id="id-form">
        <tr>
            <th valign="top">Enter Retailer Id:</th>
            <td><input type="text" name="id" id="id" class="inp-form" /></td>
            <td></td>
        </tr>
        </td>
        <td></td>
    </tr>

    <tr>
        <th>&nbsp;</th>
        <td valign="top">
            <input type="submit" name="submit" value="ret_id"  /></td>
        <td valign="top">   <input type="reset" value="" class="form-reset"  />
        </td>
        <td></td>
    </tr>
    </table>
</form>
    <!-- end id-form  -->

    </td>
    <td>
    </td>
    </tr>
</table>
</form>
</div>
</body>
</html>

Advertisement
View Answers

May 28, 2012 at 4:22 PM


The given code allow the user to enter any id, whose record is to be removed from database. This id is then send to action page to delete that particular record.

1)form.jsp:

< form method="post" name="form" action="delete.jsp" >

Enter Id: < input type="text" name="id">< br>

< input type="submit" value="Submit">

< /form>

2)delete.jsp:

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

<% String id=request.getParameter("id"); int no=Integer.parseInt(id); int sumcount=0; try { Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root"); Statement st = conn.createStatement(); st.executeUpdate("DELETE FROM employee WHERE id = '"+no+"'"); response.sendRedirect("application.jsp"); } catch(Exception e){} %>



Related Tutorials/Questions & Answers:
delete retailer jsp file (sir..is this a good logic.. jsp file is useful for what purpose)
delete retailer jsp file (sir..is this a good logic.. jsp file is useful for what purpose)  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict... want to delete retailer?") }*/ } </script> </head> <body>
delete a file - JSP-Servlet
delete a file  Correct question::::How can we delete a file which is stored in a server when read write operations for this particular file is closed.  http://www.communigate.com/CommuniGatePro/WebFiles.html
Advertisements
delete a file - JSP-Servlet
delete a file  How can we read a file which is stored in a server when read write operations for this particular file is closed
Delete and edit data in xml file using JSP
Delete and edit data in xml file using JSP   I want to know how to delete and edit data from an XML file by use of JSP. I have XML file having tasks... in the xml file,I want to delete and edit some tasks using task id then how can i do
Java delete file if exists
Java delete file if exists  Hi, Hi how to delete file if exists? I need example code of java delete file if exists. Thanks   Hi, following code can be used: String tempFile = "C:/mydir/myfile.txt"; //Delete
delete jsp
delete jsp  <%@ page language="java" contentType="text/html...; charset=ISO-8859-1"> <title>Delete Student</title> </head>...;/Controller"> <input type="hidden" name="page" value="delete"/> <
delete lines in the file
delete lines in the file   I am using a file as Input in program...The file contains round about 1,00,000 lines .My program after each iteration takes a data from that file at process it. My Question is when a particular data
delete lines in the file
delete lines in the file   I am using a file as Input in program...The file contains round about 1,00,000 lines .My program after each iteration takes a data from that file at process it. My Question is when a particular data
delete lines in the file
delete lines in the file   I am using a file as Input in program...The file contains round about 1,00,000 lines .My program after each iteration takes a data from that file at process it. My Question is when a particular data
Java file delete
Java file delete In this section, you will learn how to delete a file. Description of code Java makes file manipulation easier by providing many useful... we are going to delete a file. For this, we have created an object of File
How to delete .xlsx file in java?
How to delete .xlsx file in java?  Hello Sir, I am unable to delete .xlsx file using below code, What is wrong here? if(myFile != null && myFile.exists()    && myFile.canRead() &&
How to delete file in java ?
How to delete file in java ? In this section we will learn how to write a program to delete a file in java. You can delete the file or folder, java File class provide two methods: delete(path) : This method delete the file or throw
java - file delete - Java Beginners
java - file delete  I will try to delete file from particular folder...){ try { File delete = new File (incurrentFile); System.out.println... following code to delete a file from the folder import java.io.File; public
java - file delete - Java Beginners
java - file delete  I will try to delete file from particular folder...){ try { File delete = new File (incurrentFile); System.out.println... will try to delete these files. But it doesn?t delete from this folder. My code
view jsp file (reference file). is the way of coding good ?
view jsp file (reference file). is the way of coding good ?  <...="ISO-8859-1"%> View Retailer <%@ page import="com.tcs.ilp.*" %>...; <table border=2><tr><th>Retailer ID</th><th>
JSP File
JSP File  Hi, What is JSP File? How to create JSP file? Thanks   Hi, JSP file is simple text file with .jsp extenstion. You can run JSP file on tomcat server. Read more at JSP tutorials section. Thanks
jsp-file
jsp-file  i want to upload a file by browse button and the file should be save in ms access database.....how i can implement trough jsp plz help me sir
J2ME delete file - Java Beginners
J2ME delete file  How do i delete a textfile on a mobile phone using j2me?  Hi Friend, Please visit the following link: http://www.roseindia.net/j2me/ Hope that it will be helpful for you. Thanks
C file delete example
C file delete example       This section illustrates you to delete a file in C. You can see in the given example that we want to remove the file HELLO.txt. For this, we have
Delete a file from FTP Server
In this section you will learn how to delete file from FTP server using java
Delete a File
Enter the file name to delete:wonderful.txt File was successfully... Delete a File    ... a specified file or directory is deleted. For deleting a file from a directory you need
How to delete excel file records using Store Procedure?
How to delete excel file records using Store Procedure?  Hi.. I have created one Excel file through stored procedure.Now I want to delete records or delete excel file. Thanks
insert , edit , and delete button in one jsp page
insert , edit , and delete button in one jsp page  hello I want to ask about the way of creating a jsp page contains insert , edit , and delete buttons and manipulate data in database directly. any help please or hints
parsing xml file in jsp
parsing xml file in jsp  example that pars XML file in JSP
jsp file - JSP-Servlet
jsp file  org.apache.jasper.JasperException: /jsp/admin/UserRegistration.jsp(155,4) According to the TLD or the tag file, attribute valu e... org.apache.jasper.JasperException: /jsp/admin/UserRegistration.jsp(155,4) According
jsp upload file to server
jsp upload file to server  How to create and upload file to server in JSP?   Find the given example that explains how to upload single and multiple file on server using JSP
written in jsp file
written in jsp file  how to create and write in a jsp file through simple core java code
Creating dynamic jsp file in java file to include another jsp file
Creating dynamic jsp file in java file to include another jsp file  I am able to create jsp file in java that includes ; table tr td and img tags..... Need to include jsp file in the same content. The below code doesn't help me
include a jsp file
include a jsp file   Sir, I have 2 jsp pages. I want to include second jsp in the first jsp page when a button in the first jsp is clicked. how can I do this. I tried in sevaral ways . I am using jsp and javascript... anyone
Delete image from folder - JSP-Servlet
+ photoname; System.out.println(path); new File(path).delete(); } } hope...Delete image from folder  Hi Thanks Rajnikant to given me... user id going to logout then at that time i need to delete image Pie(userid
how to delete a jar file from mobile by using j2me program.
how to delete a jar file from mobile by using j2me program.  When i'll update a new version jar in mobile. Then i want to delete that old jar which is previously present in mobile. How to do
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
file insertion - JSP-Servlet
file insertion  How to insert and retrieve .doc files into sql server with example using jsp and servlets
Sending File - JSP-Servlet
Sending File  How to use tag in Jsp, & How read a file fom Client  Hi Friend, We used tag to upload a file. Please visit the following links: http://www.roseindia.net/jsp/fileupload.shtml http
How to delete content of a log file from linux terminal?
How to delete content of a log file from linux terminal?  Hi, My... running queries. But first I want to delete the content of the /var/log/slow-queries.log file. Can anyone tell me how to do this? Thanks   Hi, Its
file size - JSP-Servlet
coding in the roseindia at the following url: http://www.roseindia.net/jsp/file_upload/Sinle_upload.xhtml.shtml. But, this jsp action file will not check.... http://www.roseindia.net/jsp/file_upload/employee_upload_profile_image.shtml
using insert and delete in a single page in jsp
using insert and delete in a single page in jsp  I am using the following code in jsp to declare two javascript functions to insert and delete in a single jsp page but insert function doesn't works only delete function works even
File uploading - JSP-Servlet
. http://www.roseindia.net/jsp/file_upload/Sinle_upload.xhtml.shtml...File uploading  i am using file uploading code for multiple file and aslo for single file but i am getting problem that No such file found
pdf file in jsp
pdf file in jsp  i have a pdf, which has to be displayed in a jsp page along with some html tags, the pdf which is to be displayed shold be readonly and wont allow the uer to save too
Generated java file - JSP-Servlet
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 7 in the generated java file Syntax error on token ";", delete this token...Generated java file  Hello friends, At run time JSP
Java file delete fails
Java file delete fails This section demonstrates you how the deletion of file... fails. There may be some reasons for this like the file you want to delete, does... application. So before going to delete a file, check whether the file exists
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
how to delete the access database value in jsp
how to delete the access database value in jsp  i loaded my database data into the dropdown list box...now i want to delete the value..plz send the source code to delete the value in dropdown list box and also from database
JSP file download - JSP-Servlet
JSP file download  Hi! I am saving (webapp/docs/sample.docx) path of the word file in database. when i want to download that file i am eliminating that file path using path.subString(16).. upto docs/. when i am clicking
jsp:include page=.. and include file = ...
jsp:include page=.. and include file = ...   What is the difference between <jsp:include page = ... > and <%@ include file = ... >... from one jsp file required to include in multiple jsp files
External file reading in jsp
External file reading in jsp  i have written a jsp page(ReadExt.jsp) in my application which reads a text file content from a system... used java code in jsp page ... and tel me how can i make it work in other system
How to delete a character from a file in java - Java Beginners
How to delete a character from a file in java  I'm not gettting how to remove a character from a file in java....could any one help me out??  Hi friend, To remove a character in what way : At a specified position
JSP Include File
JSP Include File          JSP Include File is used to insert a html file and the text file in the jsp page when the JSP page is compiled. The insert
File upload - JSP-Servlet
File upload  Hello Friends, In my JSP project i want to do a file upload part. For this, i designed two files one for input and other... File Uload Using JSP   Choose the file To Upload
External file reading in jsp
External file reading in jsp  i have written a jsp page(ReadExt.jsp) in my application which reads a text file content from a system...; The given code reads the given file. It uses BufferedReader class to read
Advertisements
 

 

 

DMCA.com