Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_jsp thread: create, rename new or old directory ??


Message #1 by "James Yuk" <jamesyuk@h...> on Tue, 26 Dec 2000 10:45:06 -0000
This is a multi-part message in MIME format.

------NetAddressPart-00--=_AuGi4960S903bf2ceaf
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi James,
use the code below. It works fine both with existing & non-existing direc
tory.
I have used Tomcat server for this [though it doesn't matter whichever se
rver
you use!]. Even in your code there is no error but the print statement sh
ould
be in a single line.

<%@ page errorPage=3D"errorc.jsp" %>
<%@ page language=3D"java" import=3D"java.io.*" %>
<%
File myDir =3D new File("/pjava");
out.print(myDir + ( myDir.isDirectory()?" is":" is not") + " a
directory.<br>");
out.print(myDir + (myDir.exists()?" is":" is not") + " exist.");
%>

Hope this helps.

With regards
partha




"James Yuk" <jamesyuk@h...> wrote:
Hi,

I am having a big problem on creating new directory and renaming the old
directory. I have embeded the code below in JSP, but it don't seems to
work. Pls help! Thanks a million! :-)

--------------------------------------
<%@ page language=3D"java" import=3D"java.io.*"%>
<%
File myDir =3D new File("/test");
out.print(myDir + (myDir.isDirectory()?" is":" is not") + " a
directory.<br>");
out.print(myDir + (myDir.exists()?" is":" is not") + " exist.");
%>
--------------------------------------

regards,
James

--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
To unsubscribe send a blank email to leave-pro_jsp-$subst('Recip.MemberIDChar')@p2p.wrox.com


Content-Type: text/plain; charset="us-ascii"
Content-description: footer

--- 
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development, 
Web Development, Networking & Communications, and Hardware & Systems.  
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to pro_jsp as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-pro_jsp-$subst('Recip.MemberIDChar')@p2p.wrox.com


------NetAddressPart-00--=_AuGi4960S903bf2ceaf--

  Return to Index