Personally, my instinct is to think that a tag for such a case might be
somewhat too specific. If you simply store the various URLs as context-
initialization parameters, you should easily be able to migrate between
your different environments. You end up with usage like
<c:url value="${initParam.insecureUrl}"/>
and
<c:url value="${initParam.secureUrl}"/>
You could always write a custom tag to handle this individual case, but it
seems like a fairly specific need. I typically prefer using a general
mechanism like context-initialization parameters to a specific one; it
sounds like you want to break up the URL and feed pieces of it to a tag,
which sounds like more trouble than it's worth.
Hope that helps,
--
Shawn Bayern
"JSP Standard Tag Library" http://www.jstlbook.com
(coming this summer from Manning Publications)
On Mon, 6 May 2002, Girish Patil wrote:
> Shawn,
> Thanks..I guess the XML manipulation tags in JSTL would do number (2).
> by (1) I meant a was suppose I have a set of pages and my travel sequence is
> page1(http)-page2(http)-page3(https)-page4(https)-page5(http). where page4
> and page5 are secure and rest are in non-secure mode.So at page2 i need to
> switch my url from http://www.aaa.com to https://www.aaa.com and at page4 i
> need to switch my url from https://www.aaa.com back to http://www.aaa.com.
> One way of doing this is hardcode the full url in the action part of the
> form inside my jsp. that works fine for a single environment. but in ourcase
> we have 3 environments...development, acpt and prod . All of them have
> different uRL, so hardcoding is out of question.Also sometimes the secure
> and non-secure URl are registered as different domains like non-secure as
> http://www.aaa.com and secured url as https://secure.aaa.com. Add to this
> the port number used in the lower environments(acpt and development) are not
> standard ports like (80,443) but could be 8000 and 8443 for http and https
> respectively.To solve this we need some kind of tag that reads from some
> property file the secure non-secure mapping and prevents us from changing
> the jsp for every deployment.
> Hope this explains the problem.this might be trivial but good to have
> though.
> Girish
>
>
> From: Shawn Bayern <[EMAIL PROTECTED]>
> Reply-To: "Tag Libraries Users List" <[EMAIL PROTECTED]>
> To: Tag Libraries Users List <[EMAIL PROTECTED]>
> Subject: Re: SSL and Xpath tags.
> Date: Mon, 6 May 2002 14:36:21 -0400 (EDT)
>
> I'm not clear from your explanation what you mean by (1), but JSTL 1.0 has
> a rich set of tags to support (2) (inspired by the XTags library in
> Jakarta Taglibs).
>
> --
> Shawn Bayern
> "JSP Standard Tag Library" http://www.jstlbook.com
> (coming this summer from Manning Publications)
>
> On Mon, 6 May 2002, Girish Patil wrote:
>
> > Hi All,
> > I would like to know if we have tags available to do the following
> >
> > 1.nonSSl-to-SSl switch.
> > 2.Tag to take an xpath expression and a node and return the value.
> >
> > 1.I guess many of us have the requirement that a certain portion of the
> site
> > should be secured versus the rest. To do this switching either we need to
> > hardcode the value or use some sort of custom tag that takes in a bunch
> of
> > parameter such as port number, ssl domain name and spit out
> > url inside the form tag.I was wondering if we already have one or
> creating
> > one such general tag was of any value ?
> >
> > 2.Secondly,I was wondering if instead of using XSL, one could achieve the
> > same using JSP, beans and an XPath tag.
> > Basically what we would do is something like this
> >
> > <input type="textbox" name="authorname" value=<xtag:value
> > node="<%=bean.getNode()%>" xpathExp="/doc/author[@authorname]"/>>
> >
> > The idea being that we would still remain in the familiar JSP programming
> > pattern,using java for() loops and stuff and still be open to convert
> this
> > to XSL implementation in the future.I guess I could use XSL tags from the
> > taglibrary, but that mandates me into writing a style sheet( which i
> > currently am not comfortable with :( ).This also seems to be one way
> (from
> > servlet to view), if i need to populate the values back to the node, i
> guess
> > I have to go back to request.getParameter() inside the servelt or the
> same
> > bean , get a handle to the node( from the DOM probabaly in session) and
> > update it.
> >
> > Looks like I have not been thinking much here..sorry.Please advice.
> >
> > Girish
> >
> >
> > _________________________________________________________________
> > Join the world�s largest e-mail service with MSN Hotmail.
> > http://www.hotmail.com
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> _________________________________________________________________
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>