Thanks Randy Burgess,

Your suggestion works perfectly! Sorry I didn't reply early I was out of
town..
Have a nice day!

-Ryan Webb


On Fri, Apr 11, 2008 at 9:53 PM, Randy Burgess <[EMAIL PROTECTED]> wrote:

> I wonder if specifying HttpServletResponse.SC_FORBIDDEN would make a
> difference because the HttpServletResponse has those constants and that is
> in the method signature for the Action class.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: ryan webb <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <user@struts.apache.org>
> > Date: Fri, 11 Apr 2008 11:20:35 +0800
> > To: Struts Users Mailing List <user@struts.apache.org>
> > Cc: <[EMAIL PROTECTED]>
> > Subject: How do I make Tomcat send 403 Forbidden page to the client in
> jsp and
> > in struts?
> >
> > I am having difficulty with authentication of user levels.
> > I have to kinds of users "user" and "administrators".
> >
> > What we did in mySQL db is make a user table and in it, a "level" column
> is
> > placed containing whether a user is "administrator" or not.
> > there's no problem with this actually (I just wrote the situation and
> > setup).
> >
> > *Now, I want the server to send a 403 response to non-administrative
> > personnel accessing some secured places in our site.*
> >
> > How can I do this?(Or is this possible? I have no idea actually..)
> >
> > I have a userBean.java that contains all user informations from
> database.
> > I made this in my execute method in Action class. (Something Like this)
> >
> > execute(response, request, form....){
> >
> >     UserActionForm uaf = (UserActionForm) form;
> >
> >     UserBean userbean =  new UserBean();
> >
> >  *   if (userbean.getlevel().equals("user")){
> >         response.sendError(SC_FORBIDDEN);
> >     }
> >
> > *    return mapping.findForward....("Sucess");
> > }
> >
> > this code does not compile..sendError() expects int value. I tried
> > sendError(403) but doesn't work.
> >
> > Any Help is Gladly Appreciated! =)
> >
> > God Bless!
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information.  If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email.  Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information.  If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email.  Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to