You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bjørn T Johansen <bt...@havleik.no> on 2003/06/26 21:58:49 UTC

Automatic redirect in jsp page?

Is it possible to check for an session object in a jsp page and if it
doesn't exist, automatic redirect to an action?


Regards,

BTJ

-- 
-----------------------------------------------------------------------------------------------
Bjørn T Johansen (BSc,MNIF)
Executive Manager
btj@havleik.no                  Havleik Consulting
Phone : +47 67 54 15 17         Conradisvei 4
Fax : +47 67 54 13 91           N-1338 Sandvika
Cellular : +47 926 93 298       http://www.havleik.no
-----------------------------------------------------------------------------------------------
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
-----------------------------------------------------------------------------------------------

bean:write Problem

Posted by Mykola Ostapchuk <my...@sympatico.ca>.
Hello,

I have a problem displaying data with bean:write tag. I simply want to show
the list of users.
UserVO has property userCountry of type CountryVO.
I populate bean "allUsers" and put it into request.

On jsp page:

<logic:iterate id="users" name="allUsers" scope="request"
type="com.iprs.web.users.UsersVO">
     <bean:write name="users" property="userName"/>
     <bean:write name="users" property="userCountry.countryId"/>
     <bean:write name="users" property="userCountry.countryName"/>
</logic:iterate>

When I'm only browsing this list - everything works OK! But after
inserting/updating a user, "userCountry.countryName" property displays
nothing on newly inserted/updated record.

It's strange, because "userCountry.countryId" property always shows current
country ID.
I have to restart web server in order to see updated "countryName"...

For sure I'm not putting "allUsers" bean into session/application, just
request.

Any help will be very appreciated!


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: RE : Automatic redirect in jsp page?

Posted by Bjørn T Johansen <bt...@havleik.no>.
Yes, I do... But I am using ActionForward someplaces and I need this
feature in those pages... :)

Thanks..

BTJ

On Fri, 2003-06-27 at 14:51, Franck Lefebure wrote:

> Hi,
> Something like <logic:present name="sessionObject"><jsp:forward
> page="index.jsp"></logic:present>
> 
> But you should do also this check in actions
> 
> --
> Franck Lefebure
> 
> 
> 
> > -----Message d'origine-----
> > De : Bjørn T Johansen [mailto:btj@havleik.no] 
> > Envoyé : jeudi 26 juin 2003 15:59
> > À : Struts Users Mailing List
> > Objet : Automatic redirect in jsp page?
> > 
> > 
> > Is it possible to check for an session object in a jsp page 
> > and if it doesn't exist, automatic redirect to an action?
> > 
> > 
> > Regards,
> > 
> > BTJ
> > 
> > -- 
> > --------------------------------------------------------------
> > ---------------------------------
> > Bjørn T Johansen (BSc,MNIF)
> > Executive Manager
> > btj@havleik.no                  Havleik Consulting
> > Phone : +47 67 54 15 17         Conradisvei 4
> > Fax : +47 67 54 13 91           N-1338 Sandvika
> > Cellular : +47 926 93 298       http://www.havleik.no
> > --------------------------------------------------------------
> > ---------------------------------
> > "The stickers on the side of the box said "Supported 
> > Platforms: Windows 98, Windows NT 4.0, Windows 2000 or 
> > better", so clearly Linux was a supported platform."
> > --------------------------------------------------------------
> > ---------------------------------
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

-- 
-----------------------------------------------------------------------------------------------
Bjørn T Johansen (BSc,MNIF)
Executive Manager
btj@havleik.no                  Havleik Consulting
Phone : +47 67 54 15 17         Conradisvei 4
Fax : +47 67 54 13 91           N-1338 Sandvika
Cellular : +47 926 93 298       http://www.havleik.no
-----------------------------------------------------------------------------------------------
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
-----------------------------------------------------------------------------------------------

RE : Automatic redirect in jsp page?

Posted by Franck Lefebure <fl...@orange.gp>.
Hi,
Something like <logic:present name="sessionObject"><jsp:forward
page="index.jsp"></logic:present>

But you should do also this check in actions

--
Franck Lefebure



> -----Message d'origine-----
> De : Bjørn T Johansen [mailto:btj@havleik.no] 
> Envoyé : jeudi 26 juin 2003 15:59
> À : Struts Users Mailing List
> Objet : Automatic redirect in jsp page?
> 
> 
> Is it possible to check for an session object in a jsp page 
> and if it doesn't exist, automatic redirect to an action?
> 
> 
> Regards,
> 
> BTJ
> 
> -- 
> --------------------------------------------------------------
> ---------------------------------
> Bjørn T Johansen (BSc,MNIF)
> Executive Manager
> btj@havleik.no                  Havleik Consulting
> Phone : +47 67 54 15 17         Conradisvei 4
> Fax : +47 67 54 13 91           N-1338 Sandvika
> Cellular : +47 926 93 298       http://www.havleik.no
> --------------------------------------------------------------
> ---------------------------------
> "The stickers on the side of the box said "Supported 
> Platforms: Windows 98, Windows NT 4.0, Windows 2000 or 
> better", so clearly Linux was a supported platform."
> --------------------------------------------------------------
> ---------------------------------
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org