Re: Validation :: best practice?

2005-09-09 Thread Michael Jouravlev
On 9/9/05, emre akbas <[EMAIL PROTECTED]> wrote: > Hi, > I want to know what the state-of-the-art practices about Struts validation > are. Try these: https://strutslive.dev.java.net https://formdef.dev.java.net > It is well-known that there are some problems in automatic validation. > Here is

Re: Validation :: best practice?

2005-09-09 Thread Rick Reumann
emre akbas wrote the following on 9/9/2005 10:12 AM: , I want to know what the state-of-the-art practices about Struts validation are. It is well-known that there are some problems in automatic validation. Here is a good article: http://www.reumann.net/struts/articles/request_lists.jsp Are the

Re: Validation :: best practice?

2005-09-09 Thread Niall Pemberton
I think you're assertion is incorrect. including the tag on a page will generate all the javascript validations for a form - they get "invoked" by you putting some javascript in the 's onsubmit event - nothing to do with the validate setting in the struts config. All the validate=false setting con

Validation :: best practice?

2005-09-09 Thread emre akbas
Hi, I want to know what the state-of-the-art practices about Struts validation are. It is well-known that there are some problems in automatic validation. Here is a good article: http://www.reumann.net/struts/articles/request_lists.jsp Are the ideas in this article obsolete? As far as I under

Re: file validation best practice - Thanks everyone

2004-10-25 Thread struts lover
Thanks very much. --- Joe Germuska <[EMAIL PROTECTED]> wrote: > At 7:24 AM -0700 10/25/04, struts lover wrote: > >Hello, > >Thanks everyone for your interest and replies. > Thanks > >very much. > >I had one more question. If I use getContentType() > of > >FormFile, does it give the same results o

Re: file validation best practice - Thanks everyone

2004-10-25 Thread Joe Germuska
At 7:24 AM -0700 10/25/04, struts lover wrote: Hello, Thanks everyone for your interest and replies. Thanks very much. I had one more question. If I use getContentType() of FormFile, does it give the same results on different operating systems that is if the client is using different operating syst

Re: file validation best practice - Thanks everyone

2004-10-25 Thread struts lover
Hello, Thanks everyone for your interest and replies. Thanks very much. I had one more question. If I use getContentType() of FormFile, does it give the same results on different operating systems that is if the client is using different operating systems. Does the change in server OS affects the

Re: file validation best practice

2004-10-24 Thread Michael McGrady
Also, there is JHOVE http://hul.harvard.edu/jhove/ Michael McGrady Joe Germuska wrote: If your server is a Unix platform, one thing you could do is run the shell command "file" against the uploaded file, and take a look at the result. This tool ignores any extension on the filename, and examines t

Re: file validation best practice

2004-10-24 Thread Joe Germuska
If your server is a Unix platform, one thing you could do is run the shell command "file" against the uploaded file, and take a look at the result. This tool ignores any extension on the filename, and examines the content of the file itself against signature patterns it knows about. For image, Mar

Re: file validation best practice

2004-10-24 Thread Craig McClanahan
If your server is a Unix platform, one thing you could do is run the shell command "file" against the uploaded file, and take a look at the result. This tool ignores any extension on the filename, and examines the content of the file itself against signature patterns it knows about. Craig On S

Re: file validation best practice

2004-10-24 Thread Bill Siggelkow
I know of no way to deterministically discover what type of file the user sent. There is nothing to prevent a user from taking a .exe file and changing the extension to .txt or anything else ... others may have a better idea ... struts lover wrote: Thanks Bill. I had another question. What if t

Re: file validation best practice

2004-10-24 Thread struts lover
Thanks Bill. I had another question. What if the user has some .exe file with .doc extension. I mean somefile.exe.doc. How do I check the valid file type with the extension. Thanks once again. --- Bill Siggelkow <[EMAIL PROTECTED]> wrote: > U can set the accepted mime types on the input tag; > h

Re: file validation best practice

2004-10-24 Thread Bill Siggelkow
U can set the accepted mime types on the input tag; however, the browser may not do anything with this information; so in your ActionForm, I suggest you validate the type by checking the extension of the received file name. struts lover wrote: Hi Everyone, I wanted to know what is the best prac

file validation best practice

2004-10-24 Thread struts lover
Hi Everyone, I wanted to know what is the best practice for file type validation. I want the user to allow to upload only certain type of files and disallow all other types. I am using Struts FormFile. Any help would be appreciated. Thanks. ___ Do yo