You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eddie Bush <ek...@swbell.net> on 2002/09/14 07:22:56 UTC

Re: [JSTL] Sub-Application based conditionals (Solved)

I should have been using:

test='${prefix == "/member"}'

instead of what I was.  Problem solved.  Man I feel stupid.  I guess I 
wanted it to be Unix shell instead of JSTL - LOL.

Sorry to bother!

Eddie

Eddie Bush wrote:

> I think part of the issue is that the bean tags don't set an attribute 
> -- just make the scripting variable available.  I've managed to get 
> the JSTL to see prefix in page-scope now (it's quite ugly -- I'll 
> figure out a nicer solution later), but I still can't, for the *life* 
> of me, manager to do the equality comparison.
>
> I'm not going to post the code I'm using to expost prefix for fear 
> someone might use it.  Rest assured the JSTL sees it.  My comparison 
> looks like this:
>
> <c:set var="memberPath" value="/member"/>
>
> <c:choose>
>  <c:when test='${prefix} == ${memberPath}'>
>    Member<br>
>  </c:when>
>  <c:when test='${prefix} == "/member"'>
>    Member<br>
>  </c:when>
>  <c:otherwise>
>    <html:link forward='toMember'>Member</html:link>
>  </c:otherwise>
> </c:choose>
>
> I added the set after I couldn't manage to get the literal to compare. 
> Neither seems to work appreciably well.  I'm really stumped on this - 
> any insight would be *most* appreciated!
>
> Thanks,
>
> Eddie
>
>
> -- 
> 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: [JSTL] Sub-Application based conditionals (Solved)

Posted by Eddie Bush <ek...@swbell.net>.
Yeah, I'm hammering hard on some proof-of-concept stuff.  After all the 
"preaching" I've done to folks to "use the JSTL, it's *the* standard!" I 
figured I should actually start using it myself <snicker/>.  I knew it 
had to be something small -- just kept missing the syntax.  You'd laugh 
your butt off if you saw the convoluted ways I was trying to change 
exposing my data so that "the JSTL could find it" - ha!  I'm here to 
tell you my <bean:define> worked just *fine* -- I just didn't look for 
it right using the JSTL!!!

<sigh/>

Well, I've got a nice solution for determining the current sub-app now 
-- and menu-controlling code to make things a link or not, depending on 
the module I'm currently working out of.  There is a lot of "slick" 
power to the JSTL.  I can see where (once you pull your head out of your 
... <clear-throat/>) it's quite intuative and ... very nice.  I'm going 
to enjoy this a lot!

It's too bad this stuff requires spec 2.3/1.2.  I wind up having to help 
a friend some and he's kind of stuck with a 2.2 spec container right 
now...  This would make his life much easier ...

Night!  (Go get some sleep, goof-ball!)

Eddie

James Mitchell wrote:

>No, I think you just wanted to start, host, and end your own
>thread....LOL......talk about having the last work.....sheeesh ;)
>
>James Mitchell
>Software Engineer\Struts Evangelist
>Struts-Atlanta, the "Open Minded Developer Network"
>http://www.open-tools.org/struts-atlanta
>



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


RE: [JSTL] Sub-Application based conditionals (Solved)

Posted by James Mitchell <jm...@telocity.com>.
No, I think you just wanted to start, host, and end your own
thread....LOL......talk about having the last work.....sheeesh ;)

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -----Original Message-----
> From: Eddie Bush [mailto:ekbush@swbell.net]
> Sent: Saturday, September 14, 2002 1:23 AM
> To: Struts Users Mailing List
> Subject: Re: [JSTL] Sub-Application based conditionals (Solved)
>
>
> I should have been using:
>
> test='${prefix == "/member"}'
>
> instead of what I was.  Problem solved.  Man I feel stupid.  I guess I
> wanted it to be Unix shell instead of JSTL - LOL.
>
> Sorry to bother!
>
> Eddie
>
> Eddie Bush wrote:
>
> > I think part of the issue is that the bean tags don't set an attribute
> > -- just make the scripting variable available.  I've managed to get
> > the JSTL to see prefix in page-scope now (it's quite ugly -- I'll
> > figure out a nicer solution later), but I still can't, for the *life*
> > of me, manager to do the equality comparison.
> >
> > I'm not going to post the code I'm using to expost prefix for fear
> > someone might use it.  Rest assured the JSTL sees it.  My comparison
> > looks like this:
> >
> > <c:set var="memberPath" value="/member"/>
> >
> > <c:choose>
> >  <c:when test='${prefix} == ${memberPath}'>
> >    Member<br>
> >  </c:when>
> >  <c:when test='${prefix} == "/member"'>
> >    Member<br>
> >  </c:when>
> >  <c:otherwise>
> >    <html:link forward='toMember'>Member</html:link>
> >  </c:otherwise>
> > </c:choose>
> >
> > I added the set after I couldn't manage to get the literal to compare.
> > Neither seems to work appreciably well.  I'm really stumped on this -
> > any insight would be *most* appreciated!
> >
> > Thanks,
> >
> > Eddie
> >
> >
> > --
> > 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>



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