RE: Calling HTTPS URL with IO
Hey Hassan, 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? Grtz, Martin -Original Message- From: Hassan Schroeder [mailto:[EMAIL PROTECTED] Sent: donderdag 9 oktober 2003 18:23 To: Tag Libraries Users List Subject: Re: Calling HTTPS URL with IO 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Calling HTTPS URL with IO
Hi Hassan, tnx for the help but, I show you this code, in this code there are 3 calls with the IO taglib to 3 different HTTPS servers, the first one is the one that does not work, I had to put xxx and , the others works correctly without any other codeyou can try.is this correct? The error message for the first call is: org.apache.jasper.JasperException: HTTPS hostname wrong: should be Tnx a lot! Benny -CODE %@ page import=java.net.* ,java.io.* % %@ taglib uri=http://jakarta.apache.org/taglibs/xtags-1.0; prefix=xtags % %@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; prefix=io % htmlbody io:http url=https://add-on-as1.tb.tiscali.it:443/xxx/y; action=GET/ io:http url=https://www.payonline.it/ext; action=POST input=true output=true/ io:http url=https://www.playsecureserver1.com:443; / /body/html END CODE - Original Message - From: Hassan Schroeder [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Thursday, October 09, 2003 6:22 PM Subject: Re: Calling HTTPS URL with IO 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Calling HTTPS URL with IO
Ah Benny! Now you tell us the exact Exception ;) I've noticed before that a lot of older scripts still assume that the - character is not allowed in domain names. We had an email checker that barfed on it. This is probably the case here as well. Can anybody from dev confirm this? And possibly fix it?:) Martin -Original Message- From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED] Sent: vrijdag 10 oktober 2003 9:41 To: Tag Libraries Users List Subject: Re: Calling HTTPS URL with IO Hi Hassan, tnx for the help but, I show you this code, in this code there are 3 calls with the IO taglib to 3 different HTTPS servers, the first one is the one that does not work, I had to put xxx and , the others works correctly without any other codeyou can try.is this correct? The error message for the first call is: org.apache.jasper.JasperException: HTTPS hostname wrong: should be Tnx a lot! Benny -CODE %@ page import=java.net.* ,java.io.* % %@ taglib uri=http://jakarta.apache.org/taglibs/xtags-1.0; prefix=xtags % %@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; prefix=io % htmlbody io:http url=https://add-on-as1.tb.tiscali.it:443/xxx/y; action=GET/ io:http url=https://www.payonline.it/ext; action=POST input=true output=true/ io:http url=https://www.playsecureserver1.com:443; / /body/html END CODE - Original Message - From: Hassan Schroeder [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Thursday, October 09, 2003 6:22 PM Subject: Re: Calling HTTPS URL with IO 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Calling HTTPS URL with IO
I'm really sorry but I had problems with debugging but if I change io:http url=https://add-on-as1.tb.tiscali.it:443/xxx/y; action=GET/ with. io:http url=https://add-on-as1.tb.tiscali2.it:443/xxx/y; action=GET/ I added 2 after Tiscali then the error change org.apache.jasper.JasperException: add-on-as1.tb.tiscali2.it Benny - Original Message - From: Martin van Dijken [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Friday, October 10, 2003 9:46 AM Subject: RE: Calling HTTPS URL with IO Ah Benny! Now you tell us the exact Exception ;) I've noticed before that a lot of older scripts still assume that the - character is not allowed in domain names. We had an email checker that barfed on it. This is probably the case here as well. Can anybody from dev confirm this? And possibly fix it?:) Martin -Original Message- From: Benedetto Dell'Ariccia [mailto:[EMAIL PROTECTED] Sent: vrijdag 10 oktober 2003 9:41 To: Tag Libraries Users List Subject: Re: Calling HTTPS URL with IO Hi Hassan, tnx for the help but, I show you this code, in this code there are 3 calls with the IO taglib to 3 different HTTPS servers, the first one is the one that does not work, I had to put xxx and , the others works correctly without any other codeyou can try.is this correct? The error message for the first call is: org.apache.jasper.JasperException: HTTPS hostname wrong: should be Tnx a lot! Benny -CODE %@ page import=java.net.* ,java.io.* % %@ taglib uri=http://jakarta.apache.org/taglibs/xtags-1.0; prefix=xtags % %@ taglib uri=http://jakarta.apache.org/taglibs/io-1.0; prefix=io % htmlbody io:http url=https://add-on-as1.tb.tiscali.it:443/xxx/y; action=GET/ io:http url=https://www.payonline.it/ext; action=POST input=true output=true/ io:http url=https://www.playsecureserver1.com:443; / /body/html END CODE - Original Message - From: Hassan Schroeder [EMAIL PROTECTED] To: Tag Libraries Users List [EMAIL PROTECTED] Sent: Thursday, October 09, 2003 6:22 PM Subject: Re: Calling HTTPS URL with IO 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XSL: formating date
Hello My XML file looks like this: article id=58043 language=sl created20031003173834/created start20031003173834/start headlineTitle/headline url id=1url to the document/url author id=1author/author /article I have xsl file for formating, but I don't know how to format date created which is in MMddHHmmss format to dd.MM. HH:mm:ss format. Best regard, Stefan
Re: c:import: relative links inside WEB-INF don't work
As an aside, you certainly can, and I think should, execute JSPs within WEB-INF. I even execute my resources within WEB-INF. At 04:55 PM 10/7/2003 -0400, Serge Knystautas wrote: You shouldn't be able to execute JSPs within your WEB-INF, so all 3 of your examples should be forbidden. I think you might want to submit a bug report to whatever servlet engine you're using. -- Serge Knystautas President Lokitech software . strategy . design http://www.lokitech.com p. 301.656.5501 e. [EMAIL PROTECTED] Manolo Ramirez T. wrote: Hi, I have this problem with Tomcat 4.1.24 and taglibs-standard 1.0.3. When I try lo include a jsp inside WEB-INF I must to use an absolute url, this are my files: ### # /WEB-INF/jsp/prueba.jsp # ### %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:import url=prueba2.jsp/ %-- doesn't work! --% # /WEB-INF/jsp/prueba1.jsp # %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:import url=/WEB-INF/jsp/prueba2.jsp/ %-- works fine --% # /WEB-INF/jsp/prueba2.jsp # HELLO WORLD! #/END jsp:include works well with relative url's, What I'm missing? Is there any way to use c:import to do this?. Help please. Thanks in advance. Manolo Ramirez T. PD: forgive my english! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: c:import: relative links inside WEB-INF don't work
You need to use something like struts to operate inside WEB-INF. At 05:34 PM 10/7/2003 -0400, Manolo Ramirez T. wrote: Hi, I have this problem with Tomcat 4.1.24 and taglibs-standard 1.0.3. When I try lo include a jsp inside WEB-INF I must to use an absolute url, this are my files: ### # /WEB-INF/jsp/prueba.jsp # ### %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:import url=prueba2.jsp/ %-- doesn't work! --% # /WEB-INF/jsp/prueba1.jsp # %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:import url=/WEB-INF/jsp/prueba2.jsp/ %-- works fine --% # /WEB-INF/jsp/prueba2.jsp # HELLO WORLD! #/END jsp:include works well with relative url's, What I'm missing? Is there any way to use c:import to do this?. Help please. Thanks in advance. Manolo Ramirez T. PD: forgive my english! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] LEGAL NOTICE This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please delete the message. Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Calling HTTPS URL with IO
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: My favorite tag is ......displaytag.sf.net
This tag looks great, but I haven't been able to find any documentation on using this with JSTL! Can someone help me out with this or point me somewhere? There appears to be a lot of work and suggestions, but little on implementation - Nic Link11 I have use many tags, such as JSTL, etc. I just want to say, this is my favoirete tag!!! http://displaytag.sourceforge.net .V - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]