On Sat 26 Nov 2011 02:33:06 PM IST, Mihir Mehta wrote:
> Hi people,
>
> I'm developing a web application using Servlets, Java and Apache
> Tomcat server. Part of my application involves allowing the user to
> upload files to the server, and it is there that I am encountering a
> problem: when I try to upload a protected file such as /etc/sudoers,
> my form submission just fails, and nothing happens on the page,
> instead of the appearance of the error messages which are there in the
> exception handlers in my servlet. Thus, I need a way to handle errors
> of this type gracefully, can anyone suggest a possible reason for the
> above behaviour, and a fix for it?
>
> Mihir.
>
> -- 
> Mailing list guidelines and other related articles:
> http://lug-iitd.org/Footer

I'm no Java programmer, but from your situation, it is clear that you 
need to put a check if the file was uploaded or not. It is failing for 
/etc/sudoers simply because you aren't allowed to read it as a user.

-- 
Nilesh Govindarajan
http://nileshgr.com

-- 
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer

Reply via email to