• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

check if file exists

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have to decide for a optimal solution.

I have a form, on Submit , it disables the submit button and submit the form again which in turn executes Java code to check if the file exists on server or not.

My problem is, that I want to give a message after teh check is done to the user that the file is found or not found and then do the processing (ve to create file if it doesnt exist) .

I tried it with Java script but it doesnt seem to be a good option.

any suggestions !
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Priya Singh:
Hi,
I have to decide for a optimal solution.

I have a form, on Submit , it disables the submit button and submit the form again which in turn executes Java code to check if the file exists on server or not.

My problem is, that I want to give a message after teh check is done to the user that the file is found or not found and then do the processing (ve to create file if it doesnt exist) .

I tried it with Java script but it doesnt seem to be a good option.

any suggestions !



Are you sending the complete file to the server? (ie, uploading it?) if this is the case keep in mind that you don't get to the servlet service() until all the file contents are sent by the browser.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the form tag you can add a method
onSubmit()

you can write your code here to display a dialogue or whatever.


vidhyasankar.natarajan@wipro.com
reply
    Bookmark Topic Watch Topic
  • New Topic