| | |
How to delete files using jsp?
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
You should create some sort of view (in JSP) where user can browse the whole web folder structure something like this

with some buttons on the bottom (I cut that off image would be to big)
Then let the user mark the file/folders for deleting. User hit the delete button, JSP send names of selected files for deletion together with current folder level to servlet, servlet does his deleting job and returns updated view in JSP of current folder level with some notifications message such as "file deleted", "unable to delete"
with some buttons on the bottom (I cut that off image would be to big)
Then let the user mark the file/folders for deleting. User hit the delete button, JSP send names of selected files for deletion together with current folder level to servlet, servlet does his deleting job and returns updated view in JSP of current folder level with some notifications message such as "file deleted", "unable to delete"
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Servlets are essential in Java web development so you will not escape them if you considering job related to Java development. Sooner or later you will have to face your enemy and I would say do it now, because now you will learn easier then later to try put a side your previous bad habits.
If you can explain where you having difficulties with servlet implementation we may be able to help you.
If you can explain where you having difficulties with servlet implementation we may be able to help you.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
General resource The Java EE 5 Tutorial, Beginning and Intermediate-Level Servlet, JSP, and JDBC Tutorials plus I enjoyed Java How to Program, 6th edition from Deitel
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Deleting file JSP code
<%
File f=new File("c:\\imagesFolder\\pig.jpg");
f.delete();
%>
In linux machine you have to use different separator
Search platform Independent separator for operating system
<%
File f=new File("c:\\imagesFolder\\pig.jpg");
f.delete();
%>
In linux machine you have to use different separator
Search platform Independent separator for operating system
•
•
•
•
Deleting file JSP code
<%
File f=new File("c:\\imagesFolder\\pig.jpg");
f.delete();
%>
In linux machine you have to use different separator
Search platform Independent separator for operating system
Not that I did not use scriplets before too, but since then I made some progress in this field
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
![]() |
Similar Threads
- Unknown files (Viruses, Spyware and other Nasties)
- Need help with Trojan Holax (Viruses, Spyware and other Nasties)
- Page Cannot B Displayed Taking Over IE 6 XPHomeSP2 (Viruses, Spyware and other Nasties)
- Hijack log attached :Cannot access hotmail on IE or MSN explorer (Viruses, Spyware and other Nasties)
- Cannot access hotmail on IE or MSN explorer (Web Browsers)
- hijacker.exe help, have no clue what's causing problem and don't want to delete good (Viruses, Spyware and other Nasties)
- toolbars, read-only folders, and mysterious exe's OH MY! (Viruses, Spyware and other Nasties)
- about:blank hijack (Viruses, Spyware and other Nasties)
Other Threads in the JSP Forum
- Previous Thread: JAVA TOMCAT "HTTP Status 500 error" help
- Next Thread: Error while accessing data from other drive.
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






