| Author |
struts uplaod file
|
shabarish vai
Ranch Hand
Joined: May 26, 2008
Posts: 79
|
|
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.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26496
|
|
Shabarish, I think you would need to add some logic to your action to validate this.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
shabarish vai
Ranch Hand
Joined: May 26, 2008
Posts: 79
|
|
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
|
 |
Dhinesh Rajendran
Greenhorn
Joined: May 27, 2008
Posts: 5
|
|
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 .
|
 |
 |
|
|
subject: struts uplaod file
|
|
|