RE: JSTL
Hey Riaan, Try fiddling around with setting the locale in JSTL. In your example code you create a SimpleDateFormat with a pattern as argument. JSTL uses the constructor with a Locale as additional parameter. Grtz, Martin > -Original Message- > From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] > Sent: woensdag 25 februari 2004 8:18 > To: Tag Libraries Users List > Subject: RE: JSTL > > > Could you post the code to manually format the date? > > I can easily compare that to what is being done by > > the JSTL implementation and give you some feedback > > on that. > > Something to the extend of: > > static > { > SimpleDateFormatter sdf = new > SimpleDateFormatter("-MM-dd HH:mm"); > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > } > > user inputs time in above format in jsp, then I do: > > sdf.parseDate(inputtedDate) and do a getTime and then > create a java.sql.Timestamp with the long value and > put that in the DB. Mysql displays is as one hour > later, the Dutch time, which is expected. > > When displaying it manually, I use the same sdf above > and do something like: > > sdf.formatDate(new Date(resultSet.getTimestamp("time").getTime())). > > Not 100% sure, as I do not have the code with me, but > somthing to this extend. The sdf is a static in a > singleton utility class. > > And, as I said, it only gets messed up after DST kicks > in. Maybe "Europe/London" is somehow (wrongly) > interpreted as GMT? > > > PS Thanks for hosting your application in our fine > > little country:) > > I live here, but I'm not Dutch. :) > > > > __ > Do you Yahoo!? > Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - 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: JSTL
I'm a bit lost here can you give me an example of what I should give to jstl to print the time as "Europe/London" ? Thanks Charl --- Martin van Dijken <[EMAIL PROTECTED]> wrote: > Hey Riaan, > > Try fiddling around with setting the locale in JSTL. > In your example > code you create a SimpleDateFormat with a pattern as > argument. JSTL uses > the constructor with a Locale as additional > parameter. > > Grtz, > > Martin > > > -Original Message- > > From: Riaan Oberholzer > [mailto:[EMAIL PROTECTED] > > Sent: woensdag 25 februari 2004 8:18 > > To: Tag Libraries Users List > > Subject: RE: JSTL > > > > > > Could you post the code to manually format the > date? > > > I can easily compare that to what is being done > by > > > the JSTL implementation and give you some > feedback > > > on that. > > > > Something to the extend of: > > > > static > > { > > SimpleDateFormatter sdf = new > > SimpleDateFormatter("-MM-dd HH:mm"); > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > } > > > > user inputs time in above format in jsp, then I > do: > > > > sdf.parseDate(inputtedDate) and do a getTime and > then > > create a java.sql.Timestamp with the long value > and > > put that in the DB. Mysql displays is as one hour > > later, the Dutch time, which is expected. > > > > When displaying it manually, I use the same sdf > above > > and do something like: > > > > sdf.formatDate(new > Date(resultSet.getTimestamp("time").getTime())). > > > > Not 100% sure, as I do not have the code with me, > but > > somthing to this extend. The sdf is a static in a > > singleton utility class. > > > > And, as I said, it only gets messed up after DST > kicks > > in. Maybe "Europe/London" is somehow (wrongly) > > interpreted as GMT? > > > > > PS Thanks for hosting your application in our > fine > > > little country:) > > > > I live here, but I'm not Dutch. :) > > > > > > > > __ > > Do you Yahoo!? > > Yahoo! Mail SpamGuard - Read only the mail you > want. > http://antispam.yahoo.com/tools > > - > 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] > __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL
Try: Or: It might be that this actually changes something. Personally I've found the whole Locale business very confusing and illogical to work with, but that's just my personal frustration. Martin > -Original Message- > From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] > Sent: woensdag 25 februari 2004 10:48 > To: Tag Libraries Users List > Subject: RE: JSTL > > I'm a bit lost here can you give me an example of > what I should give to jstl to print the time as > "Europe/London" ? > > Thanks > > Charl > > > --- Martin van Dijken <[EMAIL PROTECTED]> wrote: > > Hey Riaan, > > > > Try fiddling around with setting the locale in JSTL. > > In your example > > code you create a SimpleDateFormat with a pattern as argument. JSTL > > uses the constructor with a Locale as additional > > parameter. > > > > Grtz, > > > > Martin > > > > > -Original Message- > > > From: Riaan Oberholzer > > [mailto:[EMAIL PROTECTED] > > > Sent: woensdag 25 februari 2004 8:18 > > > To: Tag Libraries Users List > > > Subject: RE: JSTL > > > > > > > > > Could you post the code to manually format the > > date? > > > > I can easily compare that to what is being done > > by > > > > the JSTL implementation and give you some > > feedback > > > > on that. > > > > > > Something to the extend of: > > > > > > static > > > { > > > SimpleDateFormatter sdf = new > > > SimpleDateFormatter("-MM-dd HH:mm"); > > > > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > > } > > > > > > user inputs time in above format in jsp, then I > > do: > > > > > > sdf.parseDate(inputtedDate) and do a getTime and > > then > > > create a java.sql.Timestamp with the long value > > and > > > put that in the DB. Mysql displays is as one hour > > > later, the Dutch time, which is expected. > > > > > > When displaying it manually, I use the same sdf > > above > > > and do something like: > > > > > > sdf.formatDate(new > > Date(resultSet.getTimestamp("time").getTime())). > > > > > > Not 100% sure, as I do not have the code with me, > > but > > > somthing to this extend. The sdf is a static in a > > > singleton utility class. > > > > > > And, as I said, it only gets messed up after DST > > kicks > > > in. Maybe "Europe/London" is somehow (wrongly) > > > interpreted as GMT? > > > > > > > PS Thanks for hosting your application in our > > fine > > > > little country:) > > > > > > I live here, but I'm not Dutch. :) > > > > > > > > > > > > __ > > > Do you Yahoo!? > > > Yahoo! Mail SpamGuard - Read only the mail you > > want. > > http://antispam.yahoo.com/tools > > > > > - > > 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] > > > > > __ > Do you Yahoo!? > Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - 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: JSTL
> > timeZone="Europe/London" type="time"/> I want to keep the language english... possible? IE, say that we are in The Netherlands, but work in English ... otherwise it will try to locate Dutch resource bundles which ain't there. And should the locale indicate the country where the server is situated (NL), or the country from where the application is operated (UK)? > Personally I've found the whole Locale business very > confusing and illogical to work with, but > that's just my personal frustration. You're not alone - I feel the same. The TimeZone class in JDK is much clearer and easier to use. Throwing in the language issue when you work in plain English apps is confusing. > > Martin > > > -Original Message- > > From: Riaan Oberholzer > [mailto:[EMAIL PROTECTED] > > Sent: woensdag 25 februari 2004 10:48 > > To: Tag Libraries Users List > > Subject: RE: JSTL > > > > > I'm a bit lost here can you give me an example > of > > what I should give to jstl to print the time as > > "Europe/London" ? > > > > Thanks > > > > Charl > > > > > > --- Martin van Dijken <[EMAIL PROTECTED]> > wrote: > > > Hey Riaan, > > > > > > Try fiddling around with setting the locale in > JSTL. > > > In your example > > > code you create a SimpleDateFormat with a > pattern as argument. JSTL > > > uses the constructor with a Locale as additional > > > parameter. > > > > > > Grtz, > > > > > > Martin > > > > > > > -Original Message- > > > > From: Riaan Oberholzer > > > [mailto:[EMAIL PROTECTED] > > > > Sent: woensdag 25 februari 2004 8:18 > > > > To: Tag Libraries Users List > > > > Subject: RE: JSTL > > > > > > > > > > > > Could you post the code to manually format > the > > > date? > > > > > I can easily compare that to what is being > done > > > by > > > > > the JSTL implementation and give you some > > > feedback > > > > > on that. > > > > > > > > Something to the extend of: > > > > > > > > static > > > > { > > > > SimpleDateFormatter sdf = new > > > > SimpleDateFormatter("-MM-dd HH:mm"); > > > > > > > > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > > > } > > > > > > > > user inputs time in above format in jsp, then > I > > > do: > > > > > > > > sdf.parseDate(inputtedDate) and do a getTime > and > > > then > > > > create a java.sql.Timestamp with the long > value > > > and > > > > put that in the DB. Mysql displays is as one > hour > > > > later, the Dutch time, which is expected. > > > > > > > > When displaying it manually, I use the same > sdf > > > above > > > > and do something like: > > > > > > > > sdf.formatDate(new > > > Date(resultSet.getTimestamp("time").getTime())). > > > > > > > > Not 100% sure, as I do not have the code with > me, > > > but > > > > somthing to this extend. The sdf is a static > in a > > > > singleton utility class. > > > > > > > > And, as I said, it only gets messed up after > DST > > > kicks > > > > in. Maybe "Europe/London" is somehow (wrongly) > > > > interpreted as GMT? > > > > > > > > > PS Thanks for hosting your application in > our > > > fine > > > > > little country:) > > > > > > > > I live here, but I'm not Dutch. :) > > > > > > > > > > > > > > > > __ > > > > Do you Yahoo!? > > > > Yahoo! Mail SpamGuard - Read only the mail you > > > want. > > > http://antispam.yahoo.com/tools > > > > > > > > > - > > > 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] > > > > > > > > > __ > > Do you Yahoo!? > > Yahoo! Mail SpamGuard - Read only the mail you > want. > http://antispam.yahoo.com/tools > > - > 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] > __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL
Hi ALL I need your help regarding DisplayTag Libray 1. How to Group a column using Display Tag ? my out put is like below (group by City) EmpID Name DesignSalary etc City : WC 1 XXX 3999$ .. 2 XXX 4838$... City : MC 4 C 3434$... 5 2212$ ... in the above format I am using Display Tag because I need to sort, Pagination etc of Display tag. "TABLE" and Column values in the Display Tag... please help me to resolve the above problem with some Examples. R.Sreekant -Original Message- From: Martin van Dijken [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 4:39 PM To: 'Tag Libraries Users List' Subject: RE: JSTL Or: It might be that this actually changes something. Personally I've found the whole Locale business very confusing and illogical to work with, but that's just my personal frustration. Martin > -Original Message- > From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] > Sent: woensdag 25 februari 2004 10:48 > To: Tag Libraries Users List > Subject: RE: JSTL > > I'm a bit lost here can you give me an example of > what I should give to jstl to print the time as > "Europe/London" ? > > Thanks > > Charl > > > --- Martin van Dijken <[EMAIL PROTECTED]> wrote: > > Hey Riaan, > > > > Try fiddling around with setting the locale in JSTL. > > In your example > > code you create a SimpleDateFormat with a pattern as argument. JSTL > > uses the constructor with a Locale as additional > > parameter. > > > > Grtz, > > > > Martin > > > > > -Original Message- > > > From: Riaan Oberholzer > > [mailto:[EMAIL PROTECTED] > > > Sent: woensdag 25 februari 2004 8:18 > > > To: Tag Libraries Users List > > > Subject: RE: JSTL > > > > > > > > > Could you post the code to manually format the > > date? > > > > I can easily compare that to what is being done > > by > > > > the JSTL implementation and give you some > > feedback > > > > on that. > > > > > > Something to the extend of: > > > > > > static > > > { > > > SimpleDateFormatter sdf = new > > > SimpleDateFormatter("-MM-dd HH:mm"); > > > > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > > } > > > > > > user inputs time in above format in jsp, then I > > do: > > > > > > sdf.parseDate(inputtedDate) and do a getTime and > > then > > > create a java.sql.Timestamp with the long value > > and > > > put that in the DB. Mysql displays is as one hour > > > later, the Dutch time, which is expected. > > > > > > When displaying it manually, I use the same sdf > > above > > > and do something like: > > > > > > sdf.formatDate(new > > Date(resultSet.getTimestamp("time").getTime())). > > > > > > Not 100% sure, as I do not have the code with me, > > but > > > somthing to this extend. The sdf is a static in a > > > singleton utility class. > > > > > > And, as I said, it only gets messed up after DST > > kicks > > > in. Maybe "Europe/London" is somehow (wrongly) > > > interpreted as GMT? > > > > > > > PS Thanks for hosting your application in our > > fine > > > > little country:) > > > > > > I live here, but I'm not Dutch. :) > > > > > > > > > > > > __ > > > Do you Yahoo!? > > > Yahoo! Mail SpamGuard - Read only the mail you > > want. > > http://antispam.yahoo.com/tools > > > > > - > > 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] > > > > > __ > Do you Yahoo!? > Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - 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: JSTL
I'd suggest to try it first in order to see if this accomplishes anything at all toward fixing the time. I'll try to help you sort out the other business if necessary later... Martin > -Original Message- > From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] > Sent: woensdag 25 februari 2004 12:17 > To: Tag Libraries Users List > Subject: RE: JSTL > > > > > > timeZone="Europe/London" type="time"/> > > I want to keep the language english... possible? IE, > say that we are in The Netherlands, but work in > English ... otherwise it will try to locate Dutch > resource bundles which ain't there. > > And should the locale indicate the country where the > server is situated (NL), or the country from where the > application is operated (UK)? > > > Personally I've found the whole Locale business very > > > confusing and illogical to work with, but > > that's just my personal frustration. > > You're not alone - I feel the same. The TimeZone class > in JDK is much clearer and easier to use. Throwing in > the language issue when you work in plain English apps > is confusing. > > > > > > Martin > > > > > -Original Message- > > > From: Riaan Oberholzer > > [mailto:[EMAIL PROTECTED] > > > Sent: woensdag 25 februari 2004 10:48 > > > To: Tag Libraries Users List > > > Subject: RE: JSTL > > > > > > > > I'm a bit lost here can you give me an example > > of > > > what I should give to jstl to print the time as "Europe/London" ? > > > > > > Thanks > > > > > > Charl > > > > > > > > > --- Martin van Dijken <[EMAIL PROTECTED]> > > wrote: > > > > Hey Riaan, > > > > > > > > Try fiddling around with setting the locale in > > JSTL. > > > > In your example > > > > code you create a SimpleDateFormat with a > > pattern as argument. JSTL > > > > uses the constructor with a Locale as additional parameter. > > > > > > > > Grtz, > > > > > > > > Martin > > > > > > > > > -Original Message- > > > > > From: Riaan Oberholzer > > > > [mailto:[EMAIL PROTECTED] > > > > > Sent: woensdag 25 februari 2004 8:18 > > > > > To: Tag Libraries Users List > > > > > Subject: RE: JSTL > > > > > > > > > > > > > > > Could you post the code to manually format > > the > > > > date? > > > > > > I can easily compare that to what is being > > done > > > > by > > > > > > the JSTL implementation and give you some > > > > feedback > > > > > > on that. > > > > > > > > > > Something to the extend of: > > > > > > > > > > static > > > > > { > > > > > SimpleDateFormatter sdf = new SimpleDateFormatter("-MM-dd > > > > > HH:mm"); > > > > > > > > > > > > > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > > > > } > > > > > > > > > > user inputs time in above format in jsp, then > > I > > > > do: > > > > > > > > > > sdf.parseDate(inputtedDate) and do a getTime > > and > > > > then > > > > > create a java.sql.Timestamp with the long > > value > > > > and > > > > > put that in the DB. Mysql displays is as one > > hour > > > > > later, the Dutch time, which is expected. > > > > > > > > > > When displaying it manually, I use the same > > sdf > > > > above > > > > > and do something like: > > > > > > > > > > sdf.formatDate(new > > > > Date(resultSet.getTimestamp("time").getTime())). > > > > > > > > > > Not 100% sure, as I do not have the code with > > me, > > > > but > > > > > somthing to this extend. The sdf is a static > > in a > > > > > singleton utility class. > > > > > > > > > > And, as I said, it only gets messed up after > > DST > > > > kicks > > > > > in. Maybe "Europe/London" is somehow (wrongly) interpreted as > > > > > GMT? > > > > > > > > > > > PS Thanks for hosting your application in > > our > > > > fine > > > > > > little country:) > > > > > > > > > > I live here, but I'm not Dutch. :) > > > > > > > > > > > > > > > > > > > > __ > > > > > Do you Yahoo!? > > > > > Yahoo! Mail SpamGuard - Read only the mail you > > > > want. > > > > http://antispam.yahoo.com/tools > > > > > > > > > > > > > > - > > > > 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] > > > > > > > > > > > > > __ > > > Do you Yahoo!? > > > Yahoo! Mail SpamGuard - Read only the mail you > > want. > > http://antispam.yahoo.com/tools > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > >
Re: JSTL
On 02/25/2004 12:16 PM Riaan Oberholzer wrote: I want to keep the language english... possible? IE, say that we are in The Netherlands, but work in English ... otherwise it will try to locate Dutch resource bundles which ain't there. And should the locale indicate the country where the server is situated (NL), or the country from where the application is operated (UK)? I know that in there is a deficiency which means that date formatting of parameters to the message does not happen. It may well be fixed in a nightly build. I haven't checked for a few months! Don't worry about not having Dutch resource bundles. There is a very good algorithm for auto-selecting the correct resource bundle based on what is available and what is specified as acceptable in your request-headers. i.e. if your request-header says "NL", but there is no NL bundle, then the taglib will give you the webapps default (specified in web.xml or the bundle with no _en or _nl file-name suffix). Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL
> I know that in there is a deficiency > which means that date > formatting of parameters to the message does not > happen. I'm using the latest version, 1.0.5, released on January 27 pretty much up to date. > Don't worry about not having Dutch resource bundles. OK, good to hear that. Thanks. Will try it out later tonight and see how it goes Charl __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mail mysteriously not sent by mailer taglib
Hello list, I am using the mailer taglib, mainly to be able to generate the message body from a jsp. However, I find that in a number of cases my mails are simply not sent and I don't receive any notification of that (neither by mail, in web output, nor in the logs). So, I guess that counts as 2 problems. I am hoping somebody can help me pinpoint what is going wrong. (Preferred solution: increasing a log4j log level.) I am using the tag inside the tag, but no error is detected here. I also have "mail.smtp.dsn.notify" turned on for "SUCCESS,FAILURE,DELAY", but I only receive notification in case the message was sent/delivered successfully, so that doesn't help a lot. From a number of attempts, I expect the reason that some of my messages are not sent has to do with the 'from' address I give them. Still, if the SMTP server rejects the 'from' address, I would like to have some Exception thrown that I can at least log... (Unfortunately, I don't have access to the SMTP logs... yet) Am I missing something? Thanks, Yours, Jurjan-Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mail mysteriously not sent by mailer taglib
Since you mentioned that the from address might be the problem, I've found that you shouldn't list more than one address in the from line (it happens quite a bit) and you should make sure the from email address actually does exist. The other thing that might be stopping your email from being delivered is spam filters. It's amazing sometimes how much legitimate email is trapped by spam filters, although they are getting better. I'm interested to see if anyone else has better logging techniques as I have had little luck in tracking down errors that might be occuring in the delivery of email. Thanks! Derek Jurjan-Paul Medema <[EMAIL PROTECTED]> wrote: Hello list, I am using the mailer taglib, mainly to be able to generate the message body from a jsp. However, I find that in a number of cases my mails are simply not sent and I don't receive any notification of that (neither by mail, in web output, nor in the logs). So, I guess that counts as 2 problems. I am hoping somebody can help me pinpoint what is going wrong. (Preferred solution: increasing a log4j log level.) I am using the tag inside the tag, but no error is detected here. I also have "mail.smtp.dsn.notify" turned on for "SUCCESS,FAILURE,DELAY", but I only receive notification in case the message was sent/delivered successfully, so that doesn't help a lot. >From a number of attempts, I expect the reason that some of my messages are not sent has to do with the 'from' address I give them. Still, if the SMTP server rejects the 'from' address, I would like to have some Exception thrown that I can at least log... (Unfortunately, I don't have access to the SMTP logs... yet) Am I missing something? Thanks, Yours, Jurjan-Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want.
RE: mail mysteriously not sent by mailer taglib
Hey Derek and Jurjan-Paul, It is true that there are SMTP servers which deny mail forwarding based on invalid emails. What is however more likely is that the from-address is being accepted by your SMTP server. When your SMTP server tries to forward it to the recipient, one of the SMTP servers in the line to the recipient denies the mail-address. At this point I have to start guessing, but I think it is returned to the SMTP server that you used to forward your mail. Your SMTP server however can't send the from-person an email that processing failed, because the from-address was a dud. What I always do, is use a definitely valid emailaddress as the from, and set the reply-to header to the address that was entered on the website. Good luck! Martin van Dijken > -Original Message- > From: Derek Haidle [mailto:[EMAIL PROTECTED] > Sent: woensdag 25 februari 2004 15:22 > To: Tag Libraries Users List > Subject: Re: mail mysteriously not sent by mailer taglib > > > Since you mentioned that the from address might be the > problem, I've found that you shouldn't list more than one > address in the from line (it happens quite a bit) and you > should make sure the from email address actually does exist. > > The other thing that might be stopping your email from being > delivered is spam filters. It's amazing sometimes how much > legitimate email is trapped by spam filters, although they > are getting better. > > I'm interested to see if anyone else has better logging > techniques as I have had little luck in tracking down errors > that might be occuring in the delivery of email. > > Thanks! > Derek > > > Jurjan-Paul Medema <[EMAIL PROTECTED]> wrote: > Hello list, > > I am using the mailer taglib, mainly to be able to generate > the message > body from a jsp. > > However, I find that in a number of cases my mails are simply > not sent > and I don't receive any notification of that (neither by mail, in web > output, nor in the logs). So, I guess that counts as 2 problems. > > I am hoping somebody can help me pinpoint what is going > wrong. (Preferred solution: increasing a log4j log level.) > > I am using the tag inside the tag, but no error is > detected here. > I also have "mail.smtp.dsn.notify" turned on for > "SUCCESS,FAILURE,DELAY", but I only receive notification in case the > message was sent/delivered successfully, so that doesn't help a lot. > > From a number of attempts, I expect the reason that some of > my messages > are not sent has to do with the 'from' address I give them. > Still, if the SMTP server rejects the 'from' address, I would like to > have some Exception thrown that I can at least log... > > (Unfortunately, I don't have access to the SMTP logs... yet) > > Am I missing something? > > Thanks, Yours, > Jurjan-Paul > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > Do you Yahoo!? > Yahoo! Mail SpamGuard - Read only the mail you want. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mail mysteriously not sent by mailer taglib
Thanks Martin and Derek for sharing your experiences! As a 'from' address I have so far used my own email addres. So I know it is not wrong and I know it can receive an 'undeliverable' notification. (But my email address's domain is not the same as the SMTP server's domain, so that might still be an issue?!) But indeed: my biggest problem is that I don't even get/see a javax.mail.SendFailedException or something like that. Can this be turned on in the mailer taglib ?? When testing from another Java App on the same server (using my own email address for both the 'to' and the 'from' address) I get: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:804) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:320) So, this might be something related to correctly specifying the smtp host, which I really think I do. Otherwise this message doesn't make a lot of sense to me either, but then I am not yet an SMTP expert. Any insights? Regards, Jurjan-Paul Martin van Dijken wrote: Hey Derek and Jurjan-Paul, It is true that there are SMTP servers which deny mail forwarding based on invalid emails. What is however more likely is that the from-address is being accepted by your SMTP server. When your SMTP server tries to forward it to the recipient, one of the SMTP servers in the line to the recipient denies the mail-address. At this point I have to start guessing, but I think it is returned to the SMTP server that you used to forward your mail. Your SMTP server however can't send the from-person an email that processing failed, because the from-address was a dud. What I always do, is use a definitely valid emailaddress as the from, and set the reply-to header to the address that was entered on the website. Good luck! Martin van Dijken -Original Message- From: Derek Haidle [mailto:[EMAIL PROTECTED] Sent: woensdag 25 februari 2004 15:22 To: Tag Libraries Users List Subject: Re: mail mysteriously not sent by mailer taglib Since you mentioned that the from address might be the problem, I've found that you shouldn't list more than one address in the from line (it happens quite a bit) and you should make sure the from email address actually does exist. The other thing that might be stopping your email from being delivered is spam filters. It's amazing sometimes how much legitimate email is trapped by spam filters, although they are getting better. I'm interested to see if anyone else has better logging techniques as I have had little luck in tracking down errors that might be occuring in the delivery of email. Thanks! Derek Jurjan-Paul Medema <[EMAIL PROTECTED]> wrote: Hello list, I am using the mailer taglib, mainly to be able to generate the message body from a jsp. However, I find that in a number of cases my mails are simply not sent and I don't receive any notification of that (neither by mail, in web output, nor in the logs). So, I guess that counts as 2 problems. I am hoping somebody can help me pinpoint what is going wrong. (Preferred solution: increasing a log4j log level.) I am using the tag inside the tag, but no error is detected here. I also have "mail.smtp.dsn.notify" turned on for "SUCCESS,FAILURE,DELAY", but I only receive notification in case the message was sent/delivered successfully, so that doesn't help a lot. From a number of attempts, I expect the reason that some of my messages are not sent has to do with the 'from' address I give them. Still, if the SMTP server rejects the 'from' address, I would like to have some Exception thrown that I can at least log... (Unfortunately, I don't have access to the SMTP logs... yet) Am I missing something? Thanks, Yours, Jurjan-Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- - --- -- - - - - - - - - J.P. Medema E: [EMAIL PROTECTED] - --- -- - - - - - - - - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL
> > timeZone="Europe/London" type="time"/> No luck same results. JSTL still shows times without taking DST into account I guess I'll have to replace JSTL date tags with my own. :( > > Or: > > > timeZone="Europe/London" type="time"/> > > It might be that this actually changes something. > Personally I've found > the whole Locale business very confusing and > illogical to work with, but > that's just my personal frustration. > > Martin > > > -Original Message- > > From: Riaan Oberholzer > [mailto:[EMAIL PROTECTED] > > Sent: woensdag 25 februari 2004 10:48 > > To: Tag Libraries Users List > > Subject: RE: JSTL > > > > > I'm a bit lost here can you give me an example > of > > what I should give to jstl to print the time as > > "Europe/London" ? > > > > Thanks > > > > Charl > > > > > > --- Martin van Dijken <[EMAIL PROTECTED]> > wrote: > > > Hey Riaan, > > > > > > Try fiddling around with setting the locale in > JSTL. > > > In your example > > > code you create a SimpleDateFormat with a > pattern as argument. JSTL > > > uses the constructor with a Locale as additional > > > parameter. > > > > > > Grtz, > > > > > > Martin > > > > > > > -Original Message- > > > > From: Riaan Oberholzer > > > [mailto:[EMAIL PROTECTED] > > > > Sent: woensdag 25 februari 2004 8:18 > > > > To: Tag Libraries Users List > > > > Subject: RE: JSTL > > > > > > > > > > > > Could you post the code to manually format > the > > > date? > > > > > I can easily compare that to what is being > done > > > by > > > > > the JSTL implementation and give you some > > > feedback > > > > > on that. > > > > > > > > Something to the extend of: > > > > > > > > static > > > > { > > > > SimpleDateFormatter sdf = new > > > > SimpleDateFormatter("-MM-dd HH:mm"); > > > > > > > > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > > > } > > > > > > > > user inputs time in above format in jsp, then > I > > > do: > > > > > > > > sdf.parseDate(inputtedDate) and do a getTime > and > > > then > > > > create a java.sql.Timestamp with the long > value > > > and > > > > put that in the DB. Mysql displays is as one > hour > > > > later, the Dutch time, which is expected. > > > > > > > > When displaying it manually, I use the same > sdf > > > above > > > > and do something like: > > > > > > > > sdf.formatDate(new > > > Date(resultSet.getTimestamp("time").getTime())). > > > > > > > > Not 100% sure, as I do not have the code with > me, > > > but > > > > somthing to this extend. The sdf is a static > in a > > > > singleton utility class. > > > > > > > > And, as I said, it only gets messed up after > DST > > > kicks > > > > in. Maybe "Europe/London" is somehow (wrongly) > > > > interpreted as GMT? > > > > > > > > > PS Thanks for hosting your application in > our > > > fine > > > > > little country:) > > > > > > > > I live here, but I'm not Dutch. :) > > > > > > > > > > > > > > > > __ > > > > Do you Yahoo!? > > > > Yahoo! Mail SpamGuard - Read only the mail you > > > want. > > > http://antispam.yahoo.com/tools > > > > > > > > > - > > > 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] > > > > > > > > > __ > > Do you Yahoo!? > > Yahoo! Mail SpamGuard - Read only the mail you > want. > http://antispam.yahoo.com/tools > > - > 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] > __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
xalan extensions?
I am trying to use JSTL tag libraries within xsl as I am using XSL as my front end in the struts architecture. However I guess I need xalan extensions to interpret these tags in my XSL because right now XSL doesn't interpret them and spews them out as is. Does anyone know of xalan extensions for html JSTL tagilb and other tablibs or would I need to write my own? Thanks, Sohil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL
More on what I do: User enters string with date"2004-05-01 15:00" sdf = new SimpleDateFormat("-MM-dd HH:mm"); sdf.setTimeZone("Europe/London"); Date date = sdf.parse(dateStr); System.out.println(date); System.out.println(date.toGMTString()); gives me Sat May 08 16:00:00 CEST 2004 8 May 2004 14:00:00 GMT I store it in the MySQL database as: new java.sql.Timestamp(date.getTime()); mysql command line tool shows the time (correctly) as 16:00, as the mysql server runs in The Netherlands. That's correct. But now I read it from the database: gives me 08-05-2004 at 14:00 08-05-2004 at 16:00 that 14:00 is GMT and should be 15:00, which is UK time. --- Martin van Dijken <[EMAIL PROTECTED]> wrote: > Try: > > > timeZone="Europe/London" type="time"/> > > Or: > > > timeZone="Europe/London" type="time"/> > > It might be that this actually changes something. > Personally I've found > the whole Locale business very confusing and > illogical to work with, but > that's just my personal frustration. > > Martin > > > -Original Message- > > From: Riaan Oberholzer > [mailto:[EMAIL PROTECTED] > > Sent: woensdag 25 februari 2004 10:48 > > To: Tag Libraries Users List > > Subject: RE: JSTL > > > > > I'm a bit lost here can you give me an example > of > > what I should give to jstl to print the time as > > "Europe/London" ? > > > > Thanks > > > > Charl > > > > > > --- Martin van Dijken <[EMAIL PROTECTED]> > wrote: > > > Hey Riaan, > > > > > > Try fiddling around with setting the locale in > JSTL. > > > In your example > > > code you create a SimpleDateFormat with a > pattern as argument. JSTL > > > uses the constructor with a Locale as additional > > > parameter. > > > > > > Grtz, > > > > > > Martin > > > > > > > -Original Message- > > > > From: Riaan Oberholzer > > > [mailto:[EMAIL PROTECTED] > > > > Sent: woensdag 25 februari 2004 8:18 > > > > To: Tag Libraries Users List > > > > Subject: RE: JSTL > > > > > > > > > > > > Could you post the code to manually format > the > > > date? > > > > > I can easily compare that to what is being > done > > > by > > > > > the JSTL implementation and give you some > > > feedback > > > > > on that. > > > > > > > > Something to the extend of: > > > > > > > > static > > > > { > > > > SimpleDateFormatter sdf = new > > > > SimpleDateFormatter("-MM-dd HH:mm"); > > > > > > > > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > > > } > > > > > > > > user inputs time in above format in jsp, then > I > > > do: > > > > > > > > sdf.parseDate(inputtedDate) and do a getTime > and > > > then > > > > create a java.sql.Timestamp with the long > value > > > and > > > > put that in the DB. Mysql displays is as one > hour > > > > later, the Dutch time, which is expected. > > > > > > > > When displaying it manually, I use the same > sdf > > > above > > > > and do something like: > > > > > > > > sdf.formatDate(new > > > Date(resultSet.getTimestamp("time").getTime())). > > > > > > > > Not 100% sure, as I do not have the code with > me, > > > but > > > > somthing to this extend. The sdf is a static > in a > > > > singleton utility class. > > > > > > > > And, as I said, it only gets messed up after > DST > > > kicks > > > > in. Maybe "Europe/London" is somehow (wrongly) > > > > interpreted as GMT? > > > > > > > > > PS Thanks for hosting your application in > our > > > fine > > > > > little country:) > > > > > > > > I live here, but I'm not Dutch. :) > > > > > > > > > > > > > > > > __ > > > > Do you Yahoo!? > > > > Yahoo! Mail SpamGuard - Read only the mail you > > > want. > > > http://antispam.yahoo.com/tools > > > > > > > > > - > > > 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] > > > > > > > > > __ > > Do you Yahoo!? > > Yahoo! Mail SpamGuard - Read only the mail you > want. > http://antispam.yahoo.com/tools > > - > 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] > __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL
Actually does not work does !!! ( Constants.TIMEZONE = ="Europe/London") So the java scriplet <%= xxx %> is not allowed? --- Martin van Dijken <[EMAIL PROTECTED]> wrote: > Try: > > > timeZone="Europe/London" type="time"/> > > Or: > > > timeZone="Europe/London" type="time"/> > > It might be that this actually changes something. > Personally I've found > the whole Locale business very confusing and > illogical to work with, but > that's just my personal frustration. > > Martin > > > -Original Message- > > From: Riaan Oberholzer > [mailto:[EMAIL PROTECTED] > > Sent: woensdag 25 februari 2004 10:48 > > To: Tag Libraries Users List > > Subject: RE: JSTL > > > > > I'm a bit lost here can you give me an example > of > > what I should give to jstl to print the time as > > "Europe/London" ? > > > > Thanks > > > > Charl > > > > > > --- Martin van Dijken <[EMAIL PROTECTED]> > wrote: > > > Hey Riaan, > > > > > > Try fiddling around with setting the locale in > JSTL. > > > In your example > > > code you create a SimpleDateFormat with a > pattern as argument. JSTL > > > uses the constructor with a Locale as additional > > > parameter. > > > > > > Grtz, > > > > > > Martin > > > > > > > -Original Message- > > > > From: Riaan Oberholzer > > > [mailto:[EMAIL PROTECTED] > > > > Sent: woensdag 25 februari 2004 8:18 > > > > To: Tag Libraries Users List > > > > Subject: RE: JSTL > > > > > > > > > > > > Could you post the code to manually format > the > > > date? > > > > > I can easily compare that to what is being > done > > > by > > > > > the JSTL implementation and give you some > > > feedback > > > > > on that. > > > > > > > > Something to the extend of: > > > > > > > > static > > > > { > > > > SimpleDateFormatter sdf = new > > > > SimpleDateFormatter("-MM-dd HH:mm"); > > > > > > > > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > > > } > > > > > > > > user inputs time in above format in jsp, then > I > > > do: > > > > > > > > sdf.parseDate(inputtedDate) and do a getTime > and > > > then > > > > create a java.sql.Timestamp with the long > value > > > and > > > > put that in the DB. Mysql displays is as one > hour > > > > later, the Dutch time, which is expected. > > > > > > > > When displaying it manually, I use the same > sdf > > > above > > > > and do something like: > > > > > > > > sdf.formatDate(new > > > Date(resultSet.getTimestamp("time").getTime())). > > > > > > > > Not 100% sure, as I do not have the code with > me, > > > but > > > > somthing to this extend. The sdf is a static > in a > > > > singleton utility class. > > > > > > > > And, as I said, it only gets messed up after > DST > > > kicks > > > > in. Maybe "Europe/London" is somehow (wrongly) > > > > interpreted as GMT? > > > > > > > > > PS Thanks for hosting your application in > our > > > fine > > > > > little country:) > > > > > > > > I live here, but I'm not Dutch. :) > > > > > > > > > > > > > > > > __ > > > > Do you Yahoo!? > > > > Yahoo! Mail SpamGuard - Read only the mail you > > > want. > > > http://antispam.yahoo.com/tools > > > > > > > > > - > > > 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] > > > > > > > > > __ > > Do you Yahoo!? > > Yahoo! Mail SpamGuard - Read only the mail you > want. > http://antispam.yahoo.com/tools > > - > 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] > __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
bug in jstl 1.1 c:set?
Hi, Using TC 5, JSTL 1.1 final, with J2SDK 1.4.2_03 , the following code fails to execute : <% request.setAttribute( "pqParams", new java.util.HashMap(3) ); %> with error : javax.servlet.ServletException: Invalid property in: "currentDate" org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:864) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800) org.apache.jsp.index_jsp._jspService(index_jsp.java:71) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) javax.servlet.http.HttpServlet.service(HttpServlet.java:856) clubmom.framework.ProfileFilter.doFilter(ProfileFilter.java:98) com.opensymphony.webwork.lifecycle.RequestLifecycleFilter.doFilter(RequestLifecycleFilter.java:62) clubmom.framework.SecureRedirectFilter.doFilter(SecureRedirectFilter.java:63) clubmom.framework.PersistentHibernateSession.doFilter(PersistentHibernateSession.java:60) Anyone know why it wouldn't work? I'm DLing the source as we speak, but I wanted to see if I could get some more assistance without creating a patch. Thanks, -a - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: bug in jstl 1.1 c:set?
Aadi, Which version of Tomcat 5 are you running it? I just ran the code below on Tomcat 5.0.16 (and JSTL 1.1.0) and it worked fine: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> <% request.setAttribute( "pqParams", new java.util.HashMap(3) ); %> PARAMS: The error message you're getting it's weird, as it complains about and not . It seems to be some WebWork/Tomcat integration issue - could you please try the code above, in a page of its own (instead of chained in your WebWork environment)? Regards, Felipe On Wed, 2004-02-25 at 15:05, Aadi Deshpande wrote: > Hi, > > Using TC 5, JSTL 1.1 final, with J2SDK 1.4.2_03 , the following code > fails to execute : > > <% request.setAttribute( "pqParams", new java.util.HashMap(3) ); %> > value="11/22/2003"/> > with error : > > javax.servlet.ServletException: Invalid property in: > "currentDate" > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dbTag Error
Ok, I'm sure this is just a class file that I'm missing, but if I create a JSP page with just this line: <%@ taglib uri="/WEB-INF/dbtags.tld" prefix="sql" %> I get this error: org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.taglibs.dbtags.connection.ConnectionTEI (Rest of the stack removed for brevity.) root cause: java.lang.ClassNotFoundException: org.apache.taglibs.dbtags.connection.ConnectionTEI (Again the rest of the stack removed for brevity.) I've copied the dbtags.jar to my /lib/ directory, placed the dbtags.tld in the /WEB-INF/ directory and put the following reference in my web.xml file: http://jakarta.apache.org/taglibs/dbtags /WEB-INF/dbtags.tld What .jar/class file am I missing and where do I get it?!? Or am I doing something else incorrectly? Thanks! Derek - Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want.
Re: dbTag Error
On Wed, 2004-02-25 at 16:27, Derek Haidle wrote: > What .jar/class file am I missing and where do I get it?!? That class should be in dbtags.jar: [EMAIL PROTECTED]/java/taglibs/dbtags/WEB-INF/lib: unzip -t /usr/local/Jakarta/taglibs/dbtags-1.0-B1/dbtags.jar |grep TEI testing: org/apache/taglibs/dbtags/connection/ConnectionTEI.class OK testing: org/apache/taglibs/dbtags/preparedstatement/PreparedStatementTEI.class OK testing: org/apache/taglibs/dbtags/resultset/BaseGetterTEI.class OK testing: org/apache/taglibs/dbtags/resultset/ResultSetTEI.class OK testing: org/apache/taglibs/dbtags/statement/StatementTEI.class OK > Or am I doing something else incorrectly? You doesn't seems to be doing anything wrong. Anyway, what web container/server are you using? If it's a JSP 1.2 or later container (like Tomcat 4.x), I'd suggest that you remove the element on web.xml and use the taglib's full URI: <%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags"; prefix="sql" %> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL
Riaan Oberholzer wrote: Actually timeZone="<%= Constants.TIMEZONE %>" pattern="dd-MM- 'at' HH:mm"/> does not work timeZone="Europe/London" pattern="dd-MM- 'at' HH:mm"/> does !!! ( Constants.TIMEZONE = ="Europe/London") So the java scriplet <%= xxx %> is not allowed? It depends. If you're on a JSP 2.0 container (JSTL 1.1), then this works. It won't on a JSP 1.2 container (JSTL 1.0). In JSTL 1.0, you need to use the RT libraries to use rtexprvalues. See the spec for details. -- Pierre --- Martin van Dijken <[EMAIL PROTECTED]> wrote: Try: Or: It might be that this actually changes something. Personally I've found the whole Locale business very confusing and illogical to work with, but that's just my personal frustration. Martin -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: woensdag 25 februari 2004 10:48 To: Tag Libraries Users List Subject: RE: JSTL I'm a bit lost here can you give me an example of what I should give to jstl to print the time as "Europe/London" ? Thanks Charl --- Martin van Dijken <[EMAIL PROTECTED]> wrote: Hey Riaan, Try fiddling around with setting the locale in JSTL. In your example code you create a SimpleDateFormat with a pattern as argument. JSTL uses the constructor with a Locale as additional parameter. Grtz, Martin -Original Message- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: woensdag 25 februari 2004 8:18 To: Tag Libraries Users List Subject: RE: JSTL Could you post the code to manually format the date? I can easily compare that to what is being done by the JSTL implementation and give you some feedback on that. Something to the extend of: static { SimpleDateFormatter sdf = new SimpleDateFormatter("-MM-dd HH:mm"); sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); } user inputs time in above format in jsp, then I do: sdf.parseDate(inputtedDate) and do a getTime and then create a java.sql.Timestamp with the long value and put that in the DB. Mysql displays is as one hour later, the Dutch time, which is expected. When displaying it manually, I use the same sdf above and do something like: sdf.formatDate(new Date(resultSet.getTimestamp("time").getTime())). Not 100% sure, as I do not have the code with me, but somthing to this extend. The sdf is a static in a singleton utility class. And, as I said, it only gets messed up after DST kicks in. Maybe "Europe/London" is somehow (wrongly) interpreted as GMT? PS Thanks for hosting your application in our fine little country:) I live here, but I'm not Dutch. :) __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - 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] __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - 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] __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - 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: bug in jstl 1.1 c:set?
Thanks Felipe, It turned out to be a timing issue between 2 machines and code never recompiled. I blew away the work directory and started anew and it was all good. -a Felipe Leme wrote: Aadi, Which version of Tomcat 5 are you running it? I just ran the code below on Tomcat 5.0.16 (and JSTL 1.1.0) and it worked fine: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> <% request.setAttribute( "pqParams", new java.util.HashMap(3) ); %> PARAMS: The error message you're getting it's weird, as it complains about and not . It seems to be some WebWork/Tomcat integration issue - could you please try the code above, in a page of its own (instead of chained in your WebWork environment)? Regards, Felipe On Wed, 2004-02-25 at 15:05, Aadi Deshpande wrote: Hi, Using TC 5, JSTL 1.1 final, with J2SDK 1.4.2_03 , the following code fails to execute : <% request.setAttribute( "pqParams", new java.util.HashMap(3) ); %> with error : javax.servlet.ServletException: Invalid property in: "currentDate" - 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]
taglib standard 1.0 in Tomcat
I put all the jars in the standard 1.0 package in \WEB-INF\lib. That didn't work. So I put all the tlds in \WEB-INF. That didn't work either. My error is this: org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application And my jsp is this: <[EMAIL PROTECTED] prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> Counter Page <%-- Increment Counters --%> Counter page This page has been visited ${sessionCounter} times within the current session and ${applCounter} times by all users since the application was started. In my Web.xml I have this: http://java.sun.com/jstl/core /WEB-INF/c.tld Nothing helps. Any suggestions? -- George Hester __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
taglib standard 1.0 in Tomcat
1. You can put all the JAR files of standard library to the WEB-INF/lib directory, without specifying a thing in web.xml. Tomcat searches for .tld files in his classpath (and those tlds are encapsulated in standard.jar) , so it should be enough. 2. You can put your tld files in some directory in classpath , lets say WEB-INF/classes or WEB-INF/lib and specify that location in web.xml. Hope it helps. "George Hester" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I put all the jars in the standard 1.0 package in \WEB-INF\lib. That didn't work. So I put all the tlds in \WEB-INF. That didn't work either. My error is this: org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application And my jsp is this: <[EMAIL PROTECTED] prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> Counter Page <%-- Increment Counters --%> Counter page This page has been visited ${sessionCounter} times within the current session and ${applCounter} times by all users since the application was started. In my Web.xml I have this: http://java.sun.com/jstl/core /WEB-INF/c.tld Nothing helps. Any suggestions? -- George Hester __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Output encoding of JSP pages
I tested with Russian and now I don't have nomore problems with this kind of properties file contents either: test=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f I am using c:import and not c:redirect To my mind ?? refers to a situation that you have lost your properties key at this point as if there is a non-existing key (e.g. "missing.key") you'll see results like ???missing.key??? Are your keys always ASCII? If they weren't something odd might happen. Marketta -Original Message- From: Dima Gutzeit [mailto:[EMAIL PROTECTED] Sent: 24. helmikuuta 2004 15:13 To: [EMAIL PROTECTED] Subject: Re: Output encoding of JSP pages I've done it , but still I can see only "??". It happens when the .properties file is not with "latin" letters but with encoded with native2ascii. the most instresting part is that the very first page of the application is OK, the issue starts after first . - Original Message - From: "Priha Marketta" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 23, 2004 16:23 Subject: Re: Output encoding of JSP pages Dima, For some reason I can't find the link to reply to the mailing list directly so would you mind sharing this answer with others by copying it to the mailing list. I struggled with the same encoding problem. I have two JSP pages (file1.jsp and file2.jsp) both having a definition: <[EMAIL PROTECTED] contentType="text/html;charset=UTF-8" language="java" %> if I wrote in file1.jsp the UTF-8 encoding worked just fine but if I wrote in file1.jsp the UTF-8 encoding didn't work Then I found the answer inhere http://www.mail-archive.com/[EMAIL PROTECTED]/msg05218.htm l and I added to my import and now the encoding works also with c:import (I read the JSTL spec again but really couldn't figure out do I really have to have the encoding defined three times but who cares) Marketta - 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: Output encoding of JSP pages
When using app. with only one page in it and even with c:import , I do see the correct lang. with no problems. The "" issue starts after doing c:redirect to some other page in the application. And no there are no "missing keys". Can anyone confirm that behavior ? Thanks in advance. - Original Message - From: "Priha Marketta" <[EMAIL PROTECTED]> To: "Tag Libraries Users List" <[EMAIL PROTECTED]> Sent: Thursday, February 26, 2004 08:40 Subject: RE: Output encoding of JSP pages I tested with Russian and now I don't have nomore problems with this kind of properties file contents either: test=\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f I am using c:import and not c:redirect To my mind ?? refers to a situation that you have lost your properties key at this point as if there is a non-existing key (e.g. "missing.key") you'll see results like ???missing.key??? Are your keys always ASCII? If they weren't something odd might happen. Marketta -Original Message- From: Dima Gutzeit [mailto:[EMAIL PROTECTED] Sent: 24. helmikuuta 2004 15:13 To: [EMAIL PROTECTED] Subject: Re: Output encoding of JSP pages I've done it , but still I can see only "??". It happens when the .properties file is not with "latin" letters but with encoded with native2ascii. the most instresting part is that the very first page of the application is OK, the issue starts after first . - Original Message - From: "Priha Marketta" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 23, 2004 16:23 Subject: Re: Output encoding of JSP pages Dima, For some reason I can't find the link to reply to the mailing list directly so would you mind sharing this answer with others by copying it to the mailing list. I struggled with the same encoding problem. I have two JSP pages (file1.jsp and file2.jsp) both having a definition: <[EMAIL PROTECTED] contentType="text/html;charset=UTF-8" language="java" %> if I wrote in file1.jsp the UTF-8 encoding worked just fine but if I wrote in file1.jsp the UTF-8 encoding didn't work Then I found the answer inhere http://www.mail-archive.com/[EMAIL PROTECTED]/msg05218.htm l and I added to my import and now the encoding works also with c:import (I read the JSTL spec again but really couldn't figure out do I really have to have the encoding defined three times but who cares) Marketta - 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: taglib standard 1.0 in Tomcat
You're declaring the uri for your prefix as http://java.sun.com/jsp/jstl/core, and you have your taglib-uri in web.xml as http://java.sun.com/jstl/core The former is for JSTL 1.1 ( jsp/jstl ) and the latter is for JSTL 1.0 (jstl), so you should change your page references. And, like Dima pointed out, you really don't need to be cluttering up your web.xml with tags... hth, -a George Hester wrote: I put all the jars in the standard 1.0 package in \WEB-INF\lib. That didn't work. So I put all the tlds in \WEB-INF. That didn't work either. My error is this: org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jsp/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application And my jsp is this: <[EMAIL PROTECTED] prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %> Counter Page <%-- Increment Counters --%> Counter page This page has been visited ${sessionCounter} times within the current session and ${applCounter} times by all users since the application was started. In my Web.xml I have this: http://java.sun.com/jstl/core /WEB-INF/c.tld Nothing helps. Any suggestions? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSTL
> It depends. If you're on a JSP 2.0 container (JSTL > 1.1), then this works. > It won't on a JSP 1.2 container (JSTL 1.0). > > In JSTL 1.0, you need to use the RT libraries to > use rtexprvalues. See the spec for details. But would this work? I'm using both rt and EL in the same tag ? > -- Pierre > > > --- Martin van Dijken <[EMAIL PROTECTED]> > wrote: > > > >>Try: > >> > >> > >> >>timeZone="Europe/London" type="time"/> > >> > >>Or: > >> > >> > >> >>timeZone="Europe/London" type="time"/> > >> > >>It might be that this actually changes something. > >>Personally I've found > >>the whole Locale business very confusing and > >>illogical to work with, but > >>that's just my personal frustration. > >> > >>Martin > >> > >> > >>>-Original Message- > >>>From: Riaan Oberholzer > >> > >>[mailto:[EMAIL PROTECTED] > >> > >>>Sent: woensdag 25 februari 2004 10:48 > >>>To: Tag Libraries Users List > >>>Subject: RE: JSTL >>> > >>> > >>>I'm a bit lost here can you give me an > example > >> > >>of > >> > >>>what I should give to jstl to print the time as > >>>"Europe/London" ? > >>> > >>>Thanks > >>> > >>>Charl > >>> > >>> > >>>--- Martin van Dijken <[EMAIL PROTECTED]> > >> > >>wrote: > >> > Hey Riaan, > > Try fiddling around with setting the locale in > >> > >>JSTL. > >> > In your example > code you create a SimpleDateFormat with a > >> > >>pattern as argument. JSTL > >> > uses the constructor with a Locale as additional > parameter. > > Grtz, > > Martin > > > >-Original Message- > >From: Riaan Oberholzer > > [mailto:[EMAIL PROTECTED] > > >Sent: woensdag 25 februari 2004 8:18 > >To: Tag Libraries Users List > >Subject: RE: JSTL > > > > > > >>Could you post the code to manually format > >> > >>the > >> > date? > > >>I can easily compare that to what is being > >> > >>done > >> > by > > >>the JSTL implementation and give you some > > feedback > > >>on that. > > > >Something to the extend of: > > > >static > >{ > >SimpleDateFormatter sdf = new > >SimpleDateFormatter("-MM-dd HH:mm"); > > > > > > sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"); > > > >} > > > >user inputs time in above format in jsp, then > >> > >>I > >> > do: > > >sdf.parseDate(inputtedDate) and do a getTime > >> > >>and > >> > then > > >create a java.sql.Timestamp with the long > >> > >>value > >> > and > > >put that in the DB. Mysql displays is as one > >> > >>hour > >> > >later, the Dutch time, which is expected. > > > >When displaying it manually, I use the same > >> > >>sdf > >> > above > > >and do something like: > > > >sdf.formatDate(new > > Date(resultSet.getTimestamp("time").getTime())). > > >Not 100% sure, as I do not have the code with > >> > >>me, > >> > but > > >somthing to this extend. The sdf is a static > >> > >>in a > >> > >singleton utility class. > > > >And, as I said, it only gets messed up after > >> > >>DST > >> > kicks > > >in. Maybe "Europe/London" is somehow (wrongly) > >interpreted as GMT? > > > > > >>PS Thanks for hosting your application in > >> > === message truncated === __ Do you Yahoo!? Get better spam protection with Yahoo! Mail. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]