You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ana Narvaez Vila <an...@sema.es> on 2001/03/02 11:20:51 UTC

Beans and frames

I have a JSP page that receives a bean in scope request. That page
contains one frameset with two frames; the question is: 
How can I pass my bean to the 'source' (src) of the frame?

<bean:define id="myBean" name"com.mycompany.MyClass" scope="request">

<frameset rows="81%, 19% " border="0">
        <frame src="Myurl" name="frame1" scrolling="auto"></frame>
        <frame src="Myurl2" name="frame2" scrolling="no"></frame>
</frameset>


Thank you
------------------------------------------------------------------
This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Sema Group. 
If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited.
------------------------------------------------------------------


Re: Beans and frames

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Ana Narvaez Vila wrote:

> I have a JSP page that receives a bean in scope request. That page
> contains one frameset with two frames; the question is:
> How can I pass my bean to the 'source' (src) of the frame?
>
> <bean:define id="myBean" name"com.mycompany.MyClass" scope="request">
>
> <frameset rows="81%, 19% " border="0">
>         <frame src="Myurl" name="frame1" scrolling="auto"></frame>
>         <frame src="Myurl2" name="frame2" scrolling="no"></frame>
> </frameset>
>

Each of your frames is going to generate its own individual request, so using request scope will not work.  However, you could use session scope and your "myBean" would be visible to the frames as well.

Craig



Re: Servlet 2.2 Authentication

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Marcello Teodori wrote:

> I would like to use standard a Servlet 2.2 standard authentication scheme
> with struts adding a domain where to authenticate the user, has anyone
> already done this? thanx
>

There is no portable mechanism to do this -- the details of how you set up the
lookup of valid users is container-specific.  For example, in Tomcat the
default mechanism is to look at the contents of file "conf/tomcat-users.xml",
but you can also tell Tomcat to look up users in a database (or you can write
your own Tomcat extension for other mechanisms).

Once you've accomplished this, the request.getRemoteUser(),
request.getUserPrincipal(), and request.isUserInRole() methods become useful.

Craig



Re: Servlet 2.2 Authentication

Posted by Incze Lajos <in...@mail.matav.hu>.
On Fri, Mar 02, 2001 at 12:38:30PM +0100, Marcello Teodori wrote:
> I would like to use standard a Servlet 2.2 standard authentication scheme
> with struts adding a domain where to authenticate the user, has anyone
> already done this? thanx
> 

It is independent from struts. With tomcat I had difficulties
with form based authentication (both jdbc realm and simple realm).
There are some problems with the phylosophy behind this concept, too,
so I will probably abandon it when I'll have anough time. As I see,
definitely the 2.3 servlet filter the way to go. I will keep
container managed security to prohibit direct access to certain
areas.                                                      incze

Servlet 2.2 Authentication

Posted by Marcello Teodori <m....@quinary.it>.
I would like to use standard a Servlet 2.2 standard authentication scheme
with struts adding a domain where to authenticate the user, has anyone
already done this? thanx

----- Original Message -----
From: "Ana Narvaez Vila" <an...@sema.es>
To: "Struts" <st...@jakarta.apache.org>
Sent: Friday, March 02, 2001 11:20
Subject: Beans and frames


> I have a JSP page that receives a bean in scope request. That page
> contains one frameset with two frames; the question is:
> How can I pass my bean to the 'source' (src) of the frame?
>
> <bean:define id="myBean" name"com.mycompany.MyClass" scope="request">
>
> <frameset rows="81%, 19% " border="0">
>         <frame src="Myurl" name="frame1" scrolling="auto"></frame>
>         <frame src="Myurl2" name="frame2" scrolling="no"></frame>
> </frameset>
>
>
> Thank you
> ------------------------------------------------------------------
> This email is confidential and intended solely for the use of the
individual to whom it is addressed. Any views or opinions presented are
solely those of the author and do not necessarily represent those of Sema
Group.
> If you are not the intended recipient, be advised that you have received
this email in error and that any use, dissemination, forwarding, printing,
or copying of this email is strictly prohibited.
> ------------------------------------------------------------------
>
>