struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Friedli Beat [UFA AG Her]" <Beat.Frie...@ufa.ch>
Subject AW: Forward request to another jsp-page with struts
Date Fri, 03 Aug 2001 11:45:46 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>AW: Forward request to another jsp-page with struts</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Thanks Jan for your answer</FONT>
</P>

<P><FONT SIZE=2>For an issue I want to check on every jsp-page, a tag is a good
idea indeed.</FONT>
</P>

<P><FONT SIZE=2>But I'm creating a quite complicated B2B-shop-application and
on every page I have to check several different things:</FONT>
</P>

<P><FONT SIZE=2>- Has the user defined a factura-adresse (an object on the servlet-context)</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT
SIZE=2>If not go to...</FONT>
<BR><FONT SIZE=2>- Has the user defined a delivery-adresse (an object on the servlet-context)</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT
SIZE=2>If not go to...</FONT>
<BR><FONT SIZE=2>- Is a valid shopingcart available (an object on the servlet-context)</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT
SIZE=2>If not go to...</FONT>
</P>

<P><FONT SIZE=2>I will end up to write a Tag for each check. If this is state
of the art, I'll do it this way. If there is already an existing tag, where I can check and
forward, then I'll use this.</FONT></P>

<P><FONT SIZE=2>The bad thing with jsp:forward is, that I can't use the forward-definitions
form Struts..</FONT>
</P>

<P><FONT SIZE=2>Mit freundlichen Grüssen</FONT>
</P>

<P><FONT SIZE=2>Beat Friedli</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Ursprüngliche Nachricht-----</FONT>
<BR><FONT SIZE=2>Von: Jan Sorensen [<A HREF="mailto:sorensenjan@yahoo.com">mailto:sorensenjan@yahoo.com</A>]</FONT>
<BR><FONT SIZE=2>Gesendet: Freitag, 3. August 2001 11:16</FONT>
<BR><FONT SIZE=2>An: struts-user@jakarta.apache.org</FONT>
<BR><FONT SIZE=2>Betreff: Re: Forward request to another jsp-page with struts</FONT>
</P>
<BR>

<P><FONT SIZE=2>I'm not sure I understand exactly what you want to do,</FONT>
<BR><FONT SIZE=2>but as I understand you want to check if the user is</FONT>
<BR><FONT SIZE=2>logged in, and if not forward to the login page.</FONT>
</P>

<P><FONT SIZE=2>I don't think it is an overkill to make your own tag.</FONT>
<BR><FONT SIZE=2>Take a look at the checkLogon tag in the</FONT>
<BR><FONT SIZE=2>struts-example application, it is pretty simple.</FONT>
</P>

<P><FONT SIZE=2>If you insists on forwarding directly in the jsp-page</FONT>
<BR><FONT SIZE=2>you can do if with the jsp:forward tag.</FONT>
</P>

<P><FONT SIZE=2>But as I said I don't think it is an overkill to make</FONT>
<BR><FONT SIZE=2>your own tag, the big avantage is that you only have</FONT>
<BR><FONT SIZE=2>the logic to make the check once.</FONT>
</P>

<P><FONT SIZE=2>Hope this helps,</FONT>
</P>

<P><FONT SIZE=2>Jan Sorensen</FONT>
<BR><FONT SIZE=2>email: jan@aragost.com</FONT>
<BR><FONT SIZE=2>aragost</FONT>
<BR><FONT SIZE=2>Dennlerstrasse 7</FONT>
<BR><FONT SIZE=2>8048 Zuerich</FONT>
</P>

<P><FONT SIZE=2>--- &quot;Friedli Beat [UFA AG Her]&quot; &lt;Beat.Friedli@ufa.ch&gt;</FONT>
<BR><FONT SIZE=2>wrote:</FONT>
</P>

<P><FONT SIZE=2>&lt;HR&gt;</FONT>
<BR><FONT SIZE=2>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 3.2//EN&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;HTML&gt;</FONT>
<BR><FONT SIZE=2>&lt;HEAD&gt;</FONT>
<BR><FONT SIZE=2>&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html;</FONT>
<BR><FONT SIZE=2>charset=iso-8859-1&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;META NAME=&quot;Generator&quot; CONTENT=&quot;MS
Exchange Server</FONT>
<BR><FONT SIZE=2>version 5.5.2653.12&quot;&gt;</FONT>
<BR><FONT SIZE=2>&lt;TITLE&gt;Forward request to another jsp-page with</FONT>
<BR><FONT SIZE=2>struts&lt;/TITLE&gt;</FONT>
<BR><FONT SIZE=2>&lt;/HEAD&gt;</FONT>
<BR><FONT SIZE=2>&lt;BODY&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT SIZE=2&gt;Hi list&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;/P&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT SIZE=2&gt;I am shure, it is
possible to check by</FONT>
<BR><FONT SIZE=2>entering a jsp-page if a sertain property is set and</FONT>
<BR><FONT SIZE=2>if not to forward the to another jsp-page.&lt;/FONT&gt;&lt;/P&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT SIZE=2&gt;I'm looking for a
tag like this&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;/P&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT SIZE=2&gt;&amp;lt;logic:equal
name=&amp;quot;nav&amp;quot;</FONT>
<BR><FONT SIZE=2>property=&amp;quot;page&amp;quot;</FONT>
<BR><FONT SIZE=2>value=&amp;quot;logon&amp;quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;</FONT>
<BR><FONT SIZE=2>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</FONT>
<BR><FONT SIZE=2>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</FONT>
<BR><FONT SIZE=2>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;FONT</FONT>
<BR><FONT SIZE=2>SIZE=2&gt;&amp;lt;some_struts_tag:find_forward=&amp;quot;logon&amp;quot;</FONT>
<BR><FONT SIZE=2>/&amp;gt;&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;&lt;FONT SIZE=2&gt;&amp;lt;/logic:equal&amp;gt;&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;/P&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT SIZE=2&gt;I know the way with
a spezial tag I</FONT>
<BR><FONT SIZE=2>create myself. But i thinks it's a little bit</FONT>
<BR><FONT SIZE=2>overkill, and I would like to have the controll in the</FONT>
<BR><FONT SIZE=2>jsp-page and not in a tag.&lt;/FONT&gt;&lt;/P&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT SIZE=2&gt;Mit freundlichen Grüssen&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;/P&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT SIZE=2&gt;Beat Friedli&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;/P&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT</FONT>
<BR><FONT SIZE=2>SIZE=2&gt;------------------------------------------------------------------------------&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;&lt;FONT SIZE=2&gt;UFA AG&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;&lt;FONT SIZE=2&gt;Hofmattstrasse 40&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;&lt;FONT SIZE=2&gt;3360 Herzogenbuchsee&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;&lt;FONT SIZE=2&gt;Tel: ++41 62 956
63 94&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;/P&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;P&gt;&lt;FONT SIZE=2&gt;email: &amp;lt;&lt;A</FONT>
<BR><FONT SIZE=2>HREF=&quot;<A HREF="mailto:beat.friedli@ufa.ch">mailto:beat.friedli@ufa.ch</A>&quot;&gt;<A
HREF="mailto:beat.friedli@ufa.ch">mailto:beat.friedli@ufa.ch</A>&lt;/A&gt;&amp;gt;&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;&lt;FONT SIZE=2&gt;homepage: &amp;lt;&lt;A</FONT>
<BR><FONT SIZE=2>HREF=&quot;<A HREF="http://www.ufa.ch" TARGET="_blank">http://www.ufa.ch</A>&quot;</FONT>
<BR><FONT SIZE=2>TARGET=&quot;_blank&quot;&gt;<A HREF="http://www.ufa.ch"
TARGET="_blank">http://www.ufa.ch</A>&lt;/A&gt;&amp;gt;&amp;nbsp;</FONT>
<BR><FONT SIZE=2>&lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;BR&gt;&lt;FONT SIZE=2&gt;homepage: &amp;lt;&lt;A</FONT>
<BR><FONT SIZE=2>HREF=&quot;<A HREF="http://www.hypona.ch" TARGET="_blank">http://www.hypona.ch</A>&quot;</FONT>
<BR><FONT SIZE=2>TARGET=&quot;_blank&quot;&gt;<A HREF="http://www.hypona.ch"
TARGET="_blank">http://www.hypona.ch</A>&lt;/A&gt;&amp;gt; &lt;/FONT&gt;</FONT>
<BR><FONT SIZE=2>&lt;/P&gt;</FONT>
</P>

<P><FONT SIZE=2>&lt;/BODY&gt;</FONT>
<BR><FONT SIZE=2>&lt;/HTML&gt;</FONT>
</P>
<BR>

<P><FONT SIZE=2>__________________________________________________</FONT>
<BR><FONT SIZE=2>Do You Yahoo!?</FONT>
<BR><FONT SIZE=2>Make international calls for as low as $.04/minute with Yahoo!
Messenger</FONT>
<BR><FONT SIZE=2><A HREF="http://phonecard.yahoo.com/" TARGET="_blank">http://phonecard.yahoo.com/</A></FONT>
</P>

</BODY>
</HTML>

Mime
View raw message