• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

renaming file..

Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am using Oriely Servlet to upload a image..how Should i rename the Saved file

String realpath = scContext.getRealPath("images\\PatientImages\\");
String newdir =realpath;

boolean success =(new File(newdir)).mkdirs();
MultipartRequest mpreq = new MultipartRequest(request,newdir);

String fileName = mpreq.getOriginalFileName("filepath");

fileName is returning the image name stored.for eg "pic1234.jpg"

how should i rename from from "pic1234.jpg" to "vasu.jpg"

help me...

[ August 28, 2007: Message edited by: sreenivas jeenor ]
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic