• 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

struts uplaod file

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi , m using struts to upload the file i want to restrict the uploaded file, like the uploaded file should not contain any special characters like
!@#$%^&*.. if it contains it has to throw an validation message.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Shabarish,
I think you would need to add some logic to your action to validate this.
 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
Shabarish,
I think you would need to add some logic to your action to validate this.



hi , m using struts to upload the file i want to restrict the uploaded file, like the uploaded file should not contain any special characters like
!@#$%^&*.. if it contains it has to throw an validation message

please explain me wit small code as am new to struts

thanks
Shabarish
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

if you want to check the name of file then check it before submitting the action by Java Script.If You want to check the content of the file then you have to check in the Action class while reading/getting the content of the file .
 
reply
    Bookmark Topic Watch Topic
  • New Topic