You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave J Dandeneau <Da...@viant.com> on 2001/12/20 21:10:21 UTC

PLEASE: Validating A session level form on the Server side

I have checked the mailing list archives, but have been unable to find a
solution to validating a session level form on the serverside. We have
one action class that passes a form around and needs to validate the
fields in chunks. i.e. it should only validate the first few fields when
on the first page, but the second fields when on the second page. I saw
that the validator.war example does this on the client-side, but we need
to do it on the server-side. Has anyone done this? How was it done? 

Thanks for the help,
Dave Dandeneau


Setting Values To the tag

Posted by "Sudhir S. Shetty" <ss...@powershare.net>.
Hi ,
           I would like to know the way to set a request parameter value to
the <html:text> tag.
Im trying to do it as follows:
<html:text property="companyName"
value="<%=request.getParameter("company")%>"/>

But Nothing is displayed kindly suggest the syntax.
Thanks in advance,
regards,
Sudhir


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Help needing regarding implementing JAAS for a Web application

Posted by "Sudhir S. Shetty" <ss...@powershare.net>.
Hi Mike,
               Im deploying the webapp inside WebLogic , I have refered to the WebLogic security docs, I have modified the Weblogic jaas example, So that the call back handler receives a parameter from the class that instantiates the Logincontext(here I have a method which accepts the username and password as a parameter),
when I execute this class from the command line as a standalone, the authentication occurs without any problems.
For my Web Application, instead of supplying the username and password from the command line when i enter it through a JSP (this JSP has 2 entry fields , username and password) , The request is transfered to another JSP where I receive the username and password ,here I supply these as parameters to the method of the Class that instantiates the Logincontext.
Here I get The following error :-

"The userName= system The Password = weblogic
  Invalid Configuration Class Name: com.security.jaas.SecurityConfig "

Cna You guide me on this Im attaching the web application directory with this mail.
It would be really helpful if you can guide me on this.

thanks in advance ,
regards,
Sudhir

PS.- My starting jsp file is login2.jsp.

----- Original Message ----- 
From: "Mike Finn" <mi...@frontiercorp.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, April 03, 2002 18:48
Subject: RE: Help needing regarding implementing JAAS for a Web application


> Sudhir,
> Are you deploying your webapp outside of WebLogic? The answer to your
> question really depends on the web container you are using. For example, I
> don't *think* there is any 'production' ready support for a JAAS Realm in
> Tomcat. If you are deploying to the WebLogic web container, then RTFM the
> WebLogic security docs. They are pretty good. JAAS is an integral part of
> J2EE and is provided by the container ( I don't think WL 6.x provides
> *authorization* with their JAAS implementation, however  - only
> authentication ). If you are using/can use container security, there should
> be no need to write your own LoginContext and callback handler, AFAIK. Also,
> if you are using container ("declarative") security, if your security
> requirements are simple enough, you won't have to write ANY code. That's the
> idea behind JAAS being in the J2EE spec.
> 
> BTW - your JAAS config file is located by
> using: -Djava.security.auth.login.config=file://path/to/a/config/file on the
> command line.
> 
> HTH,
> Mike
> 
> 
> -----Original Message-----
> From: Sudhir S. Shetty [mailto:sshetty@powershare.net]
> Sent: Wednesday, April 03, 2002 7:20 AM
> To: Struts Users Mailing List
> Subject: Help needing regarding implementing JAAS for a Web application
> 
> 
> Hello Everyone,
>                          I need your help regarding Implementing JAAS for a
> web app based on Struts, I have made a class which instantiates the Login
> context, and has an inner class callback handler(for receiving  the user
> name and password).
> But I get an error when the login context is instantaiated , that the Config
> file cant be found.
> Could anyone please send me some code which depicts clearly how JAAS can be
> implemented in a Web app (my application server is Weblogic).
> I need it urgently as I have a deadline to meet.
> Thanks in advance,
> regards,
> Sudhir
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

RE: Help needing regarding implementing JAAS for a Web application

Posted by Mike Finn <mi...@frontiercorp.com>.
Sudhir,
Are you deploying your webapp outside of WebLogic? The answer to your
question really depends on the web container you are using. For example, I
don't *think* there is any 'production' ready support for a JAAS Realm in
Tomcat. If you are deploying to the WebLogic web container, then RTFM the
WebLogic security docs. They are pretty good. JAAS is an integral part of
J2EE and is provided by the container ( I don't think WL 6.x provides
*authorization* with their JAAS implementation, however  - only
authentication ). If you are using/can use container security, there should
be no need to write your own LoginContext and callback handler, AFAIK. Also,
if you are using container ("declarative") security, if your security
requirements are simple enough, you won't have to write ANY code. That's the
idea behind JAAS being in the J2EE spec.

BTW - your JAAS config file is located by
using: -Djava.security.auth.login.config=file://path/to/a/config/file on the
command line.

HTH,
Mike


-----Original Message-----
From: Sudhir S. Shetty [mailto:sshetty@powershare.net]
Sent: Wednesday, April 03, 2002 7:20 AM
To: Struts Users Mailing List
Subject: Help needing regarding implementing JAAS for a Web application


Hello Everyone,
                         I need your help regarding Implementing JAAS for a
web app based on Struts, I have made a class which instantiates the Login
context, and has an inner class callback handler(for receiving  the user
name and password).
But I get an error when the login context is instantaiated , that the Config
file cant be found.
Could anyone please send me some code which depicts clearly how JAAS can be
implemented in a Web app (my application server is Weblogic).
I need it urgently as I have a deadline to meet.
Thanks in advance,
regards,
Sudhir


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Help needing regarding implementing JAAS for a Web application

Posted by "Sudhir S. Shetty" <ss...@powershare.net>.
Hello Everyone,
                         I need your help regarding Implementing JAAS for a
web app based on Struts, I have made a class which instantiates the Login
context, and has an inner class callback handler(for receiving  the user
name and password).
But I get an error when the login context is instantaiated , that the Config
file cant be found.
Could anyone please send me some code which depicts clearly how JAAS can be
implemented in a Web app (my application server is Weblogic).
I need it urgently as I have a deadline to meet.
Thanks in advance,
regards,
Sudhir


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: PLEASE: Validating A session level form on the Server side

Posted by David Winterfeldt <dw...@yahoo.com>.
The validator example also is doing the validations
server side.

Multi Page Forms
The field element has an optional page attribute. It
can be set to an integer. All validation for the any
field page value less than or equal to the current
page is performed server side. All validation for the
any field page equal to the current page is generated
for the client side Javascript. A mutli-part form
expects the page attribute to be set.
   ex: <html:hidden property="page" value="1"/> 

This could be used instead of page numbers if you
define a separate action for each validation.
ValidatorActionForm
This class extends ValidatorForm and provides basic
field validation based on an XML file.  The key passed
into the validator is the action element's 'path'
attribute from the struts-config.xml which should
match the form element's name attribute in the
validation.xml.


David

--- Dave J Dandeneau <Da...@viant.com> wrote:
> I have checked the mailing list archives, but have
> been unable to find a
> solution to validating a session level form on the
> serverside. We have
> one action class that passes a form around and needs
> to validate the
> fields in chunks. i.e. it should only validate the
> first few fields when
> on the first page, but the second fields when on the
> second page. I saw
> that the validator.war example does this on the
> client-side, but we need
> to do it on the server-side. Has anyone done this?
> How was it done? 
> 
> Thanks for the help,
> Dave Dandeneau
> 
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>