Re: import tag for dynamic content

2009-09-16 Thread Hassan Schroeder
On Wed, Sep 16, 2009 at 12:43 AM, paulbrickell
paul.brick...@evolvedintelligence.com wrote:

 Agreed. Just doesn't work.

? Uh, doesn't work exactly how?

This
   c:url var=xmlURL value=/x/y/z/
sets `xmlURL`  to a very different value compared to your original
   c:set var=url value=x/y/z/

What's the exact error?
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: import tag for dynamic content

2009-09-16 Thread Hassan Schroeder
On Wed, Sep 16, 2009 at 7:05 AM, paulbrickell
paul.brick...@evolvedintelligence.com wrote:

 If I create a url with a context relative path (e.g. /x/y/z) and the I use
 this in the url attribute of an import tag, the import tag seems to attempt
 a lookup of a file in the web application.

 So given this...

 c:url var=aURL value=/x/y/z/
 ${aURL} Get resource at z
 c:import url=${aURL} var=xml /

 The link in href attribute in the browser is a valid url, but the url
 attribute in the import tag is not. I get a file not found exception for
 /x/y/z. Import seems to want to lookup a static resource (html page for
 example) located on the file system and not open connection to some network
 resource. I am assuming from the name (import) that this is probably what is
 expected.

No, what you're describing works exactly correctly for me -- the
URL is accessed, and the rendered output, not a file, is fetched.

What value does ${aURL} display?
-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: import tag for dynamic content

2009-09-15 Thread Hassan Schroeder
On Tue, Sep 15, 2009 at 1:48 AM, paulbrickell
paul.brick...@evolvedintelligence.com wrote:

 Does anyone know how to use the import tag to access dynamic content from the
 current context?

 I found this...

 c:set var=xmlURL
 value=${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/x/y/z/
 c:import url=${xmlURL} var=xml /

 and it works. But I cannot believe this is the right way to it.

  c:url var=xmlURL value=/x/y/z/

would be easier :-)

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: taglibs-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-user-h...@jakarta.apache.org



Re: Is order of TAG parameters is important?

2008-08-08 Thread Hassan Schroeder
On Thu, Aug 7, 2008 at 5:56 PM, zalek [EMAIL PROTECTED] wrote:

 I am learning JSP - I copied from:
  http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
 a jar with JSTL libraries, definition of c.tld and I copied sample program
 from:
 http://www.developer.com/java/ejb/article.php/1447551

That tutorial is ancient, and out of date -- you don't need to put the
TLD files in web.xml any more, just put jstl.jar and standard.jar in the
lib directory of your app.

And no, the parameter order isn't significant.

FWIW,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs

2008-06-30 Thread Hassan Schroeder
On Sun, Jun 29, 2008 at 11:09 AM, Aaron Freeman [EMAIL PROTECTED] wrote:
 Is Jakarta Taglibs dead?  Last news even on the main page was 2005.  Should
 I look at using other taglib repositories or is it safe to continue
 incorporating these into production?

Dunno about dead, can't speak for any of the developers, but...

 Specifically I am considering using Mailer2 initially, but don't want to do
 that if it and/or the whole taglib project has been abandoned.

..I've used Mailer2 in production. I don't recall any problems with it.

FWIW,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs

2008-06-30 Thread Hassan Schroeder
On Mon, Jun 30, 2008 at 11:01 AM, Andrés M.  Luna
[EMAIL PROTECTED] wrote:

 Hi. I looking for URL to download Mailer2. Please can send me the URL for
 download Taglib Mailer 2.

mmm -- looking just now, it no longer seems to be available, even
as source. That's a bummer.

You should try to contact a jakarta maintainer, I suppose, and see
if they can fix that. Alternatively, use the Mailer taglib, which /is/ still
available.

HTH,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs

2008-06-30 Thread Hassan Schroeder
On Mon, Jun 30, 2008 at 12:02 PM, Kris Schneider [EMAIL PROTECTED] wrote:

 mmm -- looking just now, it no longer seems to be available, even
 as source. That's a bummer.

 This should be the Subversion location:
 http://svn.apache.org/repos/asf/jakarta/taglibs/deprecated-sandbox/mailer2/

Ah, OK. Too bad the links on the jakarta.apache.org site are a total
404-fest. Does anyone know who is (was!) maintaining this?

I'd volunteer some time to help clean this up.

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs

2008-06-30 Thread Hassan Schroeder
On Mon, Jun 30, 2008 at 12:34 PM, Rahul Akolkar [EMAIL PROTECTED] wrote:

  I'd volunteer some time to help clean this up.

 That'd be great. The site sources are here:

  http://svn.apache.org/repos/asf/jakarta/taglibs/proper/src/trunk/doc/

OK, how do I get commit rights, or does this just mean submitting
patches to the dev list, or ? I've contributed to the Tomcat docs, but
that was a how-to I wrote from scratch and sent to Mark Thomas, so
I haven't been on that side of the curtain :-)

And feel free to contact me off-list if you prefer.

H*
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Taglibs

2008-06-30 Thread Hassan Schroeder
On Mon, Jun 30, 2008 at 1:24 PM, Rahul Akolkar [EMAIL PROTECTED] wrote:

  http://www.apache.org/foundation/getinvolved.html

at first glance it seemed more project- than site-centric, but I'll revisit
and figure it out. :-)

 Yup, if you're interested (you can leave the component unmarked or
 choose Unknown Taglib for site):

  http://jakarta.apache.org/taglibs/bugs.html

cool, thanks.

Documentation and broken links aside, it'd be nice if someone could
get the automatic build stuff going again, or at least make sure there
was a most-recent-build to be found where the link currently points...

H*
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:reditect

2008-01-02 Thread Hassan Schroeder
On Jan 2, 2008 9:38 AM, T. Lamine Ba [EMAIL PROTECTED] wrote:

  I am looking for an alternative to the taglib c:redirect.  I would like to
 use a library that can execute a redirection from one page to another while
 passing custom parameters (c:param) without exposing these latter on the
 url; such as the Form Submit procedure.

I don't believe there's any way to send a redirect that won't result
in a GET request from the browser, meaning any additional params
/will/ be exposed in the URL.

Perhaps you could just put whatever you're trying to pass into the
session instead.

HTH,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:reditect

2008-01-01 Thread Hassan Schroeder
On Jan 1, 2008 4:41 AM, Thierno Lamine Ba [EMAIL PROTECTED] wrote:

 I am looking for an alternative to the taglib c:redirect.  I would like to 
 use a library that can execute a redirection from one page to another while 
 passing custom parameters (c:param) without exposing these latter on the url; 
 such as the Form Submit procedure.

Why can't you just use a standard jsp:forward/ ?

Or is an actual 302 redirect required?

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:url and context path completion

2007-11-28 Thread Hassan Schroeder
On Nov 28, 2007 1:01 PM, Trenton Adams [EMAIL PROTECTED] wrote:

  I'm seeing it produce /images/pluslittle.gif, and it completely
  ignores the context path.  I'm using tomcat 6 and java 1.5

I've never seen this *not* work. Do any of your JSTL tags work? What
is the Servlet Spec version in your web.xml?

Can you create a test case WAR to demonstrate the problem?

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: c:url and context path completion

2007-11-28 Thread Hassan Schroeder
On Nov 28, 2007 1:38 PM, Martin Cooper [EMAIL PROTECTED] wrote:

  No, it's sitting in webapps/appname/WEB-INF/jsp/otherdir/somejsp.jsp

 Well, that's very likely the cause of what you're seeing. Anything under
 WEB-INF is not permitted to be accessed directly (i.e. from outside the web
 app itself), so the context is irrelevant for such files, since it could
 never be used to access them.

Sorry, that's just not remotely true. Most of my apps are done that
way, and JSTL, including c:url .../, works fine.

-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual hosting and listener servlets

2007-10-24 Thread Hassan Schroeder
On 10/24/07, T. Lamine Ba [EMAIL PROTECTED] wrote:

 I use Tomcat 5.0.28.

which is no longer officially supported :-)

Regardless, this has nothing to do with taglibs -- you should repost
to the tomcat-users mailing list.

If you do, include the relevant part of your server.xml showing the
virtual host configuration.

FWIW,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help noob get JSTL to work on webpage

2007-10-07 Thread Hassan Schroeder
On 10/7/07, Buggy Buggerio [EMAIL PROTECTED] wrote:
 Hi, I can't get JSTL to work on my webpage.  Here is some info.  Any help is 
 appreicated.

It'd be helpful to post the version of Tomcat, version of JDK/JRE, JSTL
and Servlet Spec, but ...

 this is my classpath:

If you're using Tomcat, you shouldn't set any CLASSPATH.

 on the webserver, there is a directory /WEB-INF/jstl/

jstl.jar and standard.jar belong in WEB-INF/lib

 Here is my taglib statement:
 %@ taglib prefix=c uri=/WEB-INF/jstl/c.tld %

I use the standard recommendation:

%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %

 This is a line in my web.xml.

You don't need to put anything in web.xml to have these recognized.

 Is this a classpath issue?

I'm not sure where you got the idea to set it up as you have, but if
you put things in the standard places it pretty much just works :-)

FWIW!
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Help noob get JSTL to work on webpage

2007-10-07 Thread Hassan Schroeder
On 10/7/07, Buggy Buggerio [EMAIL PROTECTED] wrote:

 i have asked the tech support for the jdk/jre version
 i don't know what a servlet spec is, will look into it

It determines what your web.xml looks like, among other things :-)

 Okay, I tried it with your tag statement and here is the top error:

 org.apache.jasper.JasperException: The absolute uri: 
 http://java.sun.com/jsp/jstl/core cannot be
 resolved in either web.xml or the jar files deployed with this application

 I have removed web.xml

You don't want to do that; your webapp should have a deployment
descriptor. Read up on the Servlet Spec and you'll understand more
about configuring both Tomcat and your application.

HTH,
-- 
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Basic problem

2007-04-01 Thread Hassan Schroeder

On 4/1/07, Rupert Woodman [EMAIL PROTECTED] wrote:


I have a file called response.tag which if I put the taglib tag in it (1st
line). gives me the above error - works fine without it.


What do you mean by works fine without it? How are you invoking
this tag? I tried including your tag as is in a JSP and it worked either
way (with/without the taglib uri inclusion);

--
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSTL 1.1.2 c:url problem?

2006-11-14 Thread Hassan Schroeder

On 11/14/06, Rashmi Rubdi [EMAIL PROTECTED] wrote:


May be if there are languages other than HTML that JSTL works with then, having 
an unescaped ampersand
makes sense if those other languages require an unescaped ampersand. But I 
don't know if there are other languages
at this point.


?! Uh, how about plain text? There's no reason to assume that I'm
using JSTL to generate an HTML/XML-based output; it could be a
text/plain response, it could be creating a plain-text email body --
there are lots of alternative possibilities.

--
Hassan Schroeder  [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Fwd: Support for amp; as a parameter separator in c:url]

2006-09-26 Thread Hassan Schroeder
Rashmi Rubdi wrote:

 By this I mean, irregardless of whether it's HTML4.0
 which requires the un-escaped version of the ampersand

uh, well --

http://www.w3.org/TR/html4/charset.html#didx-character_entity_references

Authors should use amp; (ASCII decimal 38) instead of  to avoid
confusion with the beginning of a character reference (entity reference
open delimiter). Authors should also use amp; in attribute values
since character references are allowed within CDATA attribute values.
-

Just because most browsers render basically *anything* thrown their
way regardless of validity doesn't make using '' by itself right,
even with an HTML4 doctype.

 Also c:redirect requires an unescaped version of the
 ampersand.

You can use c:param and not assemble the query string yourself,
which is probably better practice anyway.

FWIW!
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Content is not allowed in prolog. - text editor for Windows XP that shows special characters before the prolog

2006-07-24 Thread Hassan Schroeder
Rashmi Rubdi wrote:
 I was also able to fix this problem: 
   java.lang.NoClassDefFoundError: org/apache/xpath/XPathException

   by adding jar files from xalan-j 2.7 to
   Tomcat's common\lib
   serializer.jar
 xalan.jar
 xercesImpl.jar
 xml-apis.jar
 xsltc.jar

   I don't know why it didn't work, when these jar files were added to my 
 projects\lib folder 

I don't either :-)

I dropped your WAR file into a relatively fresh 5.5.17 install and
got an xpath exception on your test page; then I added *only* xalan.jar
to WEB-INF/lib, reloaded the context, and it worked.

Make sure you don't have multiple copies of those jars installed in
different places.

You, too, might want to experiment with a clean install of Tomcat.

HTH,
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Content is not allowed in prolog. - text editor for Windows XP that shows special characters before the prolog

2006-07-23 Thread Hassan Schroeder
Rashmi Rubdi wrote:

   ... but I still get the error 
   SAXParseException: Content is not allowed in prolog.

Can you create a simple test case WAR that demonstrates the error?
If so, post it somewhere and we can take a look...

-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Content is not allowed in prolog. - text editor for Windows XP that shows special characters before the prolog

2006-07-22 Thread Hassan Schroeder
Rashmi Rubdi wrote:

   There might be something wrong on what I have in my web.xml , compared to 
 what's in the JSP

   taglib
   taglib-urihttp://java.sun.com/jstl/fmt/taglib-uri
   taglib-location/WEB-INF/tld/fmt.tld/taglib-location
 /taglib
   taglib
   taglib-urihttp://java.sun.com/jstl/core/taglib-uri
   taglib-location/WEB-INF/tld/c.tld/taglib-location
 /taglib
   taglib
   taglib-urihttp://java.sun.com/jstl/sql/taglib-uri
   taglib-location/WEB-INF/tld/sql.tld/taglib-location
 /taglib
   taglib
   taglib-urihttp://java.sun.com/jstl/x/taglib-uri
   taglib-location/WEB-INF/tld/x.tld/taglib-location
 /taglib

   JSP:

   %@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
 %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml; %

This last line's URI doesn't match the rest.

You should be using JSTL 1.0 *or* 1.1, not mixing them :-)

-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Runtime expressions with img:image

2006-05-17 Thread Hassan Schroeder
Robert Bowen wrote:
 Is this possible? According to the docs it is. But when I try the following:
 
 c:set var=path value=/images/splash.jpg scope=page /
 
 img:image src=${path}/
 
 The page fails saying File Not Found: '${path}'. Meaning it's not 
 interpreting the path variable, but rather just spitting it back
 out as plain text. Yes, I have the core jstl libraries working
 properly, since the following statement:
 
 path is c:out value=${path} /

is meaningless :-)  -- does

  path is ${path}

work? If not, you're not using JSTL 1.1 and/or Servlet 2.4, where
the *container* interprets/expands EL statements.

A more precise answer would be possible with actual information
about your configuration...

HTH!
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Runtime expressions with img:image

2006-05-17 Thread Hassan Schroeder
Robert Bowen wrote:

 No, path = ${path} does not work. I am using JSTL 1.0 and Servlet 2.4.
 
 So can I do this? ...Without changing versions of JSTL / Servlet?

short answer: no. Though I'm not sure where that img:... tag comes
from, haven't used it myself.

But if you're using a 2.4 deployment descriptor -- check what's at
the beginning of your application's web.xml -- upgrading to JSTL 1.1
is as simple as downloading and replacing a couple of jar files...

And well worth it, IMO -- replacing all those `c:out value=${path}/`
statements with `${path}` cleans up a workspace most wonderfully :-)

FWIW!
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Runtime expressions with img:image

2006-05-17 Thread Hassan Schroeder
Robert Bowen wrote:
 The image tag I am referring to, img:image is NOT HTML but rather the 
 Jakarta taglib as the last poster mentioned.
 
 Neither this: 

Just out of curiousity, I downloaded the nightly of the image
taglib (and dependencies) and tried it; the following JSP page:


%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
%@ taglib uri=http://jakarta.apache.org/taglibs/image-1.0; prefix=img %

c:set var=imageSource value=/lib/images/button.png/
${imageSource} br/
img:image src=${imageSource} name=minibutton.png/

-
:: works exactly as expected, printing the value of 'imageSource'
and displaying that image...

 I downloaded jstl 1.1 (the jar that comes with Java SDK 1.4, 
 appserv-jstl.jar, right?) 

No idea what that is; I'm using the Apache/Jakarta implementation:
   http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html

HTH!
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to generate subject at runtime (Mailer2 Tag)

2006-05-08 Thread Hassan Schroeder
lk wrote:

 I'm using Mailer2 to send automatic mail to some address.
 I would like to generate automatically the subject passing a variable
 but I can't!
 
 My code is:
 mt:mail
 from=[EMAIL PROTECTED]
 subject=% out.system(request.getParameter('titolo'));%

If you're using a 2.4 container and JSTL 1.1, you'd have, e.g.:

  subject=${param.titolo}

:: which I can vouch works just fine :-)

HTH!
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
opinion: webtuitive.blogspot.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SOAP Requests using the IO taglib

2006-01-04 Thread Hassan Schroeder
Brian Battersby wrote:
 I am currently able to get the correct data back from our Web Service ...

 However, the data is just displayed in the HTML page as a raw string.  I
 would like to store the data in a parameter in the right structure.  The
 structure of the data should be as follows:

If you use view source you'll see your data retains its XML tags,
i.e. its structure, so I'm not sure what you're asking for.

Do you want to save the entire result to a variable to manipulate
with XML/XSLT? Or do you just want to display the result visually
as in your text example, with tags appropriately indented, etc.?

-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SOAP Requests using the IO taglib

2006-01-04 Thread Hassan Schroeder
Brian Battersby wrote:

 I need to get the data back in XML format so I can parse out the individual
 elements.  For some reason, I was expecting the above response.  Now I
 didn't write the Web Service.  Do you think that the Web Service is not
 sending back the proper SOAP response?

It *is* in that XML format -- trust me, I tried it -- and you can
see it if you use view source :-)

Alternatively, paste this into a file -- call it soap.jsp or
whatever (and I assume you have the JSTL jars installed) --


%@ page contentType=text/xml %
%@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; prefix=io %
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %

c:set var=result
io:soap
url=http://216.143.130.38:1080/rnksoapservice.asmx;
SOAPAction=http://216.143.130.38/GetSubjectStatusList;
 io:body
  SOAP-ENV:Envelope
xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
SOAP-ENV:Body
  m:GetSubjectStatusList xmlns:m=http://216.143.130.38//
/SOAP-ENV:Body
  /SOAP-ENV:Envelope
 /io:body
/io:soap
/c:set

${result}


Open the page in Firefox and you'll see the XML displayed; you'd
normally just see the text because, served as (X)HTML, browsers
don't intrinsically understand tags like NumConnections...

HTH,
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Paging Feature broken in Datagrid Taglib

2005-10-29 Thread Hassan Schroeder
[EMAIL PROTECTED] wrote:

 I'm trying to migrate my app. to Tomcat 5.5.12 unfortunately the datagrid
 paging feature does not work anymore. The problem arises with the
 nexUrlVar variable which does not point anymore to my struts action but do
 the absolute path for the jsp page. 

 obviously this does not work. Does anybody have an idea what to do?

Without looking at the source, I'd guess the nextUrlVar needs to be
changed to be set from
  request.getAttribute(javax.servlet.forward.request_uri)

/* Servlet spec V2.4: SRV 8.4.2 'Forwarded Request Parameters */

HTH!
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: random numbers and JSTL

2005-10-24 Thread Hassan Schroeder
Luca Passani wrote:
 is there a JSTL trick to generate a random number?

Not random, but for the cache-busting behavior you want, how about:

jsp:useBean id=now class=java.util.Date scope=request/
a href=http://url.do?d=${now.time};whatever/a

HTH!
-- 
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



fmt:formatNumber ignores maxFractionDigits

2005-08-22 Thread Hassan Schroeder

Should the absence of a locale setting cause fmt:formatNumber to
ignore the maxFractionDigits attribute?

Test case:

%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
%@ taglib uri=http://java.sun.com/jsp/jstl/fmt; prefix=fmt %

c:set var=someCount value=61/
c:set var=counter1
fmt:formatNumber type=number
maxFractionDigits=0 value=${ someCount / 3 }//c:set

${counter1}
|
fmt:setLocale value=en_US/
c:set var=counter2
fmt:formatNumber type=number
maxFractionDigits=0 value=${ someCount / 3 }//c:set

${count}


Most browsers will show
 20 | 20

but user-agents not providing a Locale via an Accept-Language header
like wget (and Amaya) retrieve

 20.332 | 20

If I manually add a header to wget, e.g.
   wget --header='Accept-Language: en-us,en'
then the result is '20 | 20'

Is this proper behavior or a bug?  I realize it's probably a little
suspect using formatNumber to do quick'n'dirty rounding, but it's
for presentational purposes, so... :-)

TIA!

/* Test env: Tomcat 5.5.9 / (Sun) JDK 1.5.0_03 / JSTL 1.1.2 */
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: AW: Newbie Question: EL in attributes for a custom tag not being evaluated??

2005-01-04 Thread Hassan Schroeder
Robert Simmons Jr. wrote:
I changed the web.xml as you suggested but now the JSTL tags blow so I 
obviously need a version of the JSTL that works with 2.4. Which Jakarta 
taglibs version works with that ?
http://jakarta.apache.org/taglibs/index.html
On the left menu you'll see
  JCP Standardized Tag Libraries
Standard-1.0: JSTL 1.0 (1.2)
Standard-1.1: JSTL 1.1 (2.0)
You need the JSTL 1.1, *and* you'll need to do a search/replace on
your taglib URIs, e.g.
  %@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
becomes
  %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %
HTH, and good luck,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [INPUT] Is input:text .../ producing the correct HTML?

2004-10-23 Thread Hassan Schroeder
Adrian Beech wrote:
I've been fiddling with the input:text ... / tag from the input taglib and
noticed that the resulting code has a / at the end of the generated HTML.
For example, input:text name='message'/ produces input type=text
name=message value= /.  

Is this a non-impacting bug?
It's not a bug at all -- that's proper XHTML; empty elements must
be closed.
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to avoid the line breaks when a tag file used within javascript?

2004-10-20 Thread Hassan Schroeder
Rick Reumann wrote:
Thanks, yes still looking:( The problem is I'm still left with just one 
closing break at the end. I had previously tried converting the whole 
tag file to one line and still I'll get one break when it's evaluated in 
the JSP. 
Sorry, I don't recall the start of this thread, but when I want to
eliminate white space from the output of a taglib I use the string
taglib -- str:trim !-- whatever -- /str:trim
Might be worth a look :-)
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: AW: JSTL 1.1: diffs between c and c-1_0

2004-10-06 Thread Hassan Schroeder
Dirk Manske (Mailing list) wrote:
I am using the jstl 1.1.1 version with the following web.xml declaration:
Remove this stuff and reload your webapp --
  taglib
taglib-urijstl/c/taglib-uri
taglib-location/WEB-INF/tld/c.tld/taglib-location
  /taglib
   taglib
taglib-urijstl/fmt/taglib-uri
taglib-location/WEB-INF/tld/fmt.tld/taglib-location
  /taglib

I am still facing the problem, that variables are not evaluated when using
the c taglib. But it works when using c-1_0...
Tomcat version is 5.0.28. Any help appreciated.
On the same version of Tomcat, this test file works as expected:
-- simple.jsp -
%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c   %
c:set var=wow value=WOWSER/
h1${wow}/h1
---
If the above doesn't work for you, doublecheck you've got the right
jar file in /WEB-INF/lib ...
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: x:out error

2004-10-05 Thread Hassan Schroeder
Ben Anderson wrote:
I'm battling what seems to be a pretty elementary problem:
x:parse var=xrpcResponse
 person
firstname nickname=falseBen/firstname
lastnameAnderson/lastname
/person
/x:parse
x:out select=$xrpcResponse//firstname/
This should work, correct? 
Confirmed that it works on Tomcat 5.0.28 using 2.4 spec/JSTL 1.1 :-)
HTH,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [JSTL] Exposing CONTEXT-PARAM defined elements in a JSP

2004-09-17 Thread Hassan Schroeder
Adrian Beech wrote:
Is initParam[...] JSTL 1.1 specific?  I can get TITLEc:out
value='${initParam[applicationName]}'//TITLE to work under Tomcat 5.0
with JSTL 1.1 but not under Tomcat 4.1.24 with JSTL 1.0.
Nope, both of the below work fine on my 4.1.30 systems.
c:out value='${initParam[applicationName]}'/
or
c:out value='${initParam.applicationName}'/
Make sure you're using the appropriate web.xml for each version...
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: sql:query - Aliases and Aggregates

2004-04-14 Thread Hassan Schroeder
Brett Randall wrote:

I have two questions about the use of sql:query:

1) Can sql:query handle aliases of the form select column1 as alias1 
from table1. 

2) Can sql:query handle aggregates of the form select column1, count(*) 
from table1 group by column1.  With reference to 1) above, does 
count(*) need to be aliased?  
Yes to all; here's an example I'm using right now -- works fine :-)

sql:query var=quantities
SELECT
count(product) as thisQuantity
FROM
inventoryByProduct
WHERE
product = ?
GROUP BY
product
sql:param value=${product}/
/sql:query
c:set var=inventoryCount value=${quantities.rows[0].thisQuantity}/

HTH!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Formatted date not returning

2004-03-30 Thread Hassan Schroeder
Keith wrote:
I'm trying to return a formatted date from an Oracle database. I format the date in the 
query itself using the TO_CHAR() funtion. The problem is, when I use the TO_CHAR() 
function, JSP is acting like nothing is returned. If I take the function out and just 
select the column as normal, it outputs but with the full TimeStamp (which I don't want).
I don't know Oracle, but if this was MySQL I'd say you need to
assign an identifier to your returned result, something like
sql:query var=resource_list
	SELECT 
	 TO_CHAR(dob, 'DD-MON-')
 TO_CHAR(dob, 'DD-MON-YYY') AS thisDOB
FROM ccevs_resource_registry
/sql:query
..and then call it as

  c:forEach items=${resource_list.rows} var=resource_row
c:out value=${resource_row.dob} /
c:out value=${resource_row.thisDOB} /

Untested, but FWIW!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Getting request URI with JSTL

2004-03-04 Thread Hassan Schroeder
otisg wrote:

However, c:out value=${pageContext.request.servletPath}/
gives me this:
/WEB-INF/shell/GenericShell.jsp
/
Why does a call to request.getServletPath(), which is that JSTL
call above, give me a path to a _JSP_?
Because a JSP page /is a servlet/*, it's just one that's compiled
by the container. And you're asking for the path of the *current*
servlet, by definition, so if you've got a dozen forwards chained
together, you'll get a dozen different results from the expression
above as you move through the chain.
*cite: JSP 1.2 Specifiction
   JSP.1.2.4 Translation and Execution Steps
   The JSP page is translated to create a servlet class, the JSP
   page implementation class, that is instantiated at request time.
/cite
If I call request.getServletPath() from within a _servlet_, then
I get something like '/Action.do', which is what I needbut I
need it in the JSP.
You're asking for what was the first request in this chain? and
AFAIK there's no object that stores that. Someone may correct me on
that :-) but, in the meantime, what I'd do is use a Filter to set a
request attribute with the original request URI for use anywhere in
the request processing chain.
HTH!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Getting request URI with JSTL

2004-03-03 Thread Hassan Schroeder
otisg wrote:

Does anyone know how to get '/Action.do' or even
'/context/Action.do' from a request such as
http://www.example.com/context/Action.do?foo=bar ?
c:out value=${pageContext.request.servletPath}/	

HTH,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: taglib standard 1.0 in Tomcat

2004-03-01 Thread Hassan Schroeder
Hans Bergsten wrote:

Mixing different versions can cause all kinds of problems, so use
only these combos:
  JSTL 1.0
  
  - A JSP 1.2 or 2.0 container
  - A servlet 2.3/JSP 1.2 web.xml file
  - A JSTL 1.0 or 1.1 implementation, e.g., Standard 1.0 or 1.1
  - JSTL 1.0 taglib URIs, e.g.,
%@ taglib prefix=c uri=http://java.sun.com/jstl/core; %
  JSTL 1.1
  
  - A JSP 2.0 container
  - A servlet 2.4/JSP 2.0 web.xml file
  - A JSTL 1.1 implementation
  - JSTL 1.1 taglib URIs, e.g.,
%@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; %
This is a nice concise explanation, thanks.

Actually, my original problem just evaporated following a restart
of that test machine -- your example code ran perfectly. Sigh.
Thanks for the above compatibility chart, though :-)
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: taglib standard 1.0 in Tomcat

2004-02-27 Thread Hassan Schroeder
Hans Bergsten wrote:

Unless there's a copy of this example in another O'Reilly book, this
looks like an example from my book named JavaServer Pages, 3rd
Edition, 
Unforunately I don't have your book, but I thought I'd try this out;
using Tomcat 5.0.19 and Java 1.4.1, an embedded EL expression like:
c:set var=whatever value=WHATEVER/
pOK, ${whatever}/p
:: produces
OK, WHATEVER
but the cited example (with added catch tag):

c:catch var=oops
c:set var=sessionCounter scope=session value=${sessionCounter + 1}/
c:set var=applCounter scope=application value=${applCounter + 1}/
/c:catch
c:if test=${not empty oops}
c:out value=${oops}/
/c:if
:: gives me the output

javax.servlet.jsp.el.ELException: An exception occured trying to
convert String ${sessionCounter + 1} to type java.lang.Double
I do have a 2.4 web.xml, JSTL 1.1 jars (and presumably the first
trivial example wouldn't work if all that wasn't right).
Any thoughts? Does your original full example from the book define
sessionCounter and applCounter somewhere else prior to use?
TIA!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Attribute select has no value error

2004-02-08 Thread Hassan Schroeder
Moazam Raja wrote:

I have a JSP page which is trying to connect to a JDBC mySQL database 
but I keep getting this error when I try to compile:


articles.jsp [19:7] Attribute select has no value
Errors compiling articles.


sql:query var=articles dataSource=${dataSource}
select * from Articles
/sql:query
You SQL statement goes in the *body* of the tag:

  sql:query var=articles dataSource=${dataSource}

  select * from Articles

  /sql:query

HTH,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cannot access JNDI datasource from SQL JSTL

2003-12-30 Thread Hassan Schroeder
Dima Gutzeit wrote:

You can use the JSTL way , not JNDI directly.
put the following in the we.xml of your application
context-param
  param-name
  javax.servlet.jsp.jstl.sql.dataSource
 /param-name
  param-value
  jdbc:mysql://your.ip/dbname,driver.name,user,password
/param-value
 /context-param
? I'm no expert here, but in my web.xml file I'm using:

 context-param
param-namejavax.servlet.jsp.jstl.sql.dataSource/param-name
param-valuejdbc/MyDBName/param-value
 /context-param
 resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/MyDBName/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
 /resource-ref
:: referring back to the DataSource defined in server.xml.

FWIW,
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to use c:url with c:import?

2003-11-04 Thread Hassan Schroeder
K.C. Baltz wrote:

For various reasons, I am generating a URL for a context relative 
resource using c:url and storing the result in a variable.  Then I'm 
using that value in a c:import in an attempt to include the content of 
the resource in the page.  Example:

I'm pretty sure the problem is snip/
Uh, problem? the above works fine plugged into a page on my system.

Does import work if you specify `url=/text.html` explicitly?

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Calling HTTPS URL with IO

2003-10-10 Thread Hassan Schroeder
Martin van Dijken wrote:

I was aware of the fact taht there were several extra steps necessary 
 to get an HTTPS connection, but not that it required this much code in
 the page. This makes the use of IO very impractical for this use case.
 Now it would seem to be a very good idea to put this code in the tag
 itself, but I wonder if that is possible at all. I see a lot of Sun in
 the code you wrote, is that code that is dependant on a Sun JVM?
I *think* I tested this on a non-Sun VM (Kaffee) at the time, but
can't swear to it. In any case, both of the following methods say
they will search all available packages for an alternate if the
specified provider isn't found.
   KeyStore ks = KeyStore.getInstance(JKS,SUN);
   myFactory = TrustManagerFactory.getInstance(SunX509);
Given that, and that I suspect this is relatively boiler-plate for
most applications, this becomes the significant local variable:
  FileInputStream(/path/to/cacerts), null);

// which could easily - in theory! - be an io tag attribute:

io:http url=https://secure.example.com/program;
cert=/path/to/cacerts
action=POST input=true output=true
Anyway, if someone has an easier way to do the necessary setup, I'd
be interested in seeing it :-)
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Calling HTTPS URL with IO

2003-10-09 Thread Hassan Schroeder
Benedetto Dell'Ariccia wrote:

I'm still trying to call a HTTPS URL with the IO TAGLIB, 
Sorry, missed this earlier.

The IO taglib works, but you need to prep your environment first;
here's a sample that should get you started...
%@ page
import = javax.servlet.http.*,
java.io.*,
javax.net.ssl.*,
java.security.cert.X509Certificate,
java.security.cert.*,
java.security.KeyStore,
java.security.Provider,
java.util.*
errorPage = oops.jsp
%
%@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; prefix=io %
%
try
{
KeyStore ks = KeyStore.getInstance(JKS,SUN);
ks.load(new FileInputStream(/path/to/cacerts), null);
TrustManagerFactory myFactory;
myFactory = TrustManagerFactory.getInstance(SunX509);
myFactory.init(ks);
SSLContext ctx;
ctx = SSLContext.getInstance(SSL);
ctx.init(null, myFactory.getTrustManagers(), null);
HttpsURLConnection.setDefaultSSLSocketFactory(ctx.getSocketFactory());

}
catch (Exception noSSLConnectionAvailable)
{
System.out.println(noSSLConnectionAvailable.getMessage());
/* noSSLConnectionAvailable needs to divert to an error page,
 * since we can't process the transaction this way.
 */
}
%
io:http url=https://secure.example.com/program;
action=POST input=true output=true
... and Bob's y'r uncle  :-)

HTH!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Pass scrape taglib to a method (string)

2003-08-30 Thread Hassan Schroeder
Karen D. Wiens wrote:

How can I pass the value of the scrape taglib to a method?  It seems to
me that it should be something like:
% // snag text and stick it into 'teststring' 

String teststring = pageContext.getAttribute( scrp:result
scrape=pj3/ );
%
One approach:

 c:set var=teststringscrp:result scrape=pj3//c:set

HTH!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Pass scrape taglib to a method (string)

2003-08-30 Thread Hassan Schroeder
Karen D. Wiens wrote:

Thank you for responding.  I've tried this and I'm still getting a
syntax error.

% // snag text and stick it into 'teststring' 
c:set var=teststringscrp:result scrape=pj3//c:set;
%
Yep, that'll create one :-) -- don't enclose these tags:

 c:set var=teststringscrp:result scrape=pj3//c:set

in a scriptlet section ( the  % ... % )

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Whitespace Galore!

2003-06-30 Thread Hassan Schroeder
Rick Ross wrote:

This exact character sequence:
[EMAIL PROTECTED] language=java buffer=12kb autoFlush=false %%@ taglib
uri=http://java.sun.com/jstl/core; prefix=c %c:if test={true}
c:redirect url=http://google.com; //c:if
Will always fail on my system.  (notice I have no newlines.)  In this case,
the _jsp.java file does not have a single out.write() statement, yet it
still fails.  It's not the c:redirect either, because %
response.sendRedirect() % fails there as well.

And finally, of course I have other problems!!  I'm writing to this list,
aren't I?
Yeah, I think that's key :-)  This following snippet will redirect
if it's at the top, middle, wherever of a page on my system, which
is Tomcat 4.1.18, JDK 1.4.0, W2K.
%@ taglib uri=http://java.sun.com/jstl/core; prefix=c %
c:if test=${true}
c:redirect url=http://google.com//
/c:if
And I've never had any problems with redirects, as scriptlets or as
taglib output.
So I'd say there's something suspect in your installation. When you
say the redirect fails, is there anything logged?
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
  dream.  code.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


io taglib + SSL

2003-01-12 Thread Hassan Schroeder
I'm trying to pass form data to a credit card authorization service
using the IO taglib, like so:

io:http url=https://certification.authorize.net/gateway/transact.dll;
	action=POST input=true output=true
  io:header name=Content-Type value=text/html /
	io:body
	foo=baryou=know
	/io:body
/io:http

which results in an SSLHandShakeException
	( message = Could not find trusted certificate )

The question is -- whose certificate? I can submit data manually so
I'm confident the CC company is OK :-)  so it would seem that I need
a certificate for my end of the transaction. But if so, how do I make
the certificate available to my JSP? (I *do* have a test certificate
for one system, but am not sure how exactly to apply it.)

All the references to Tomcat/JSP/SSL I find seem focused on handling
an incoming connection from a browser rather than generating outbound
requests to another server.

Any hints cheerfully (and gratefully) accepted!
--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: io taglib + SSL

2003-01-12 Thread Hassan Schroeder
Dave Newton wrote:


Well, you don't need a certificate to _request_ an HTTPS transaction,
you need one (from the server being requested from) to _receive_ one. 

Ah. Yes. Nature abhors a vacuum, and so do I, especially when
it's between my ears :-)  But now that I've looked into what the
SSL handshake actually does...


So (to me, anyway :) it sounds like the certificate being offered by
authorize.net isn't being recognized as a trusted one. 

..this isn't it, since a cert not recognized by a browser as trusted
prompts a warning popup, and I can manually submit a form to the URL
in question with no problem.

So what else might cause an SSLHandShakeException?

--
Hassan Schroeder - [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

  dream.  code.




--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]