fmt:formatDate /
According the documentation of JSTL 1.0 The fmt:formatDate / should output a current date and time. But even in fmt.tld and fmt-rt.tld the value attribute is required. I downloaded JSTL final release yesterday. I am preparing a presentation of JSTL for my company development section, so I wouldn't like to any scriptlets as value="%=new Date()% " in my demo. Is it a JSTL bug or I am doing something wrong? Thank you, Yuri. tag nameformatDate/name tag-classorg.apache.taglibs.standard.tag.el.fmt.FormatDateTag/tag-class body-contentempty/body-content description Formats a date and/or time using the supplied styles and pattern /description attribute namevalue/name requiredtrue/required rtexprvaluefalse/rtexprvalue /attribute attribute nametype/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute namedateStyle/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nametimeStyle/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute namepattern/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute nametimeZone/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute namevar/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute attribute namescope/name requiredfalse/required rtexprvaluefalse/rtexprvalue /attribute /tag -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: fmt:formatDate /
Thank you very much for fast response, It is not perfect but at least now I understand the situation. I hope in future (1-2 years later :-) servlet container specifications will be much better refined or JSTL will find some way around problem. We use MVC approach and JSTL is used only for data displaying, so we will use something like fmt:formatDate value="${ now }" / (ms are not important). Thank you, Yuri. -Original Message- From: Hans Bergsten [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 4:05 PM To: Tag Libraries Users List Subject: Re: fmt:formatDate / Yuri Peter Kazakov wrote: According the documentation of JSTL 1.0 The fmt:formatDate / should output a current date and time. No, not in the final version of the JSTL 1.0 spec, available at http://java.sun.com/products/jsp/jstl/. The behavior you describe was in one of the preliminary versions of the spec but was removed because of different interpretations between containers about how a custom action with an empty body should be handled, leading to portability problems. But even in fmt.tld and fmt-rt.tld the value attribute is required. I downloaded JSTL final release yesterday. I am preparing a presentation of JSTL for my company development section, so I wouldn't like to any scriptlets as value="%=new Date()% " in my demo. You can create a java.util.Date instance that represents the current time and then format it: jsp:useBean id="now" class="java.util.Date" / fmt:formatDate value="${now}" / [...] Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com JavaServer Pages http://TheJSPBook.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: EL
Thank you, I understand. Maybe a stupid question, but why Java is not used as EL? Is not it possible to just generate JSP script in the page with minor substitution of variable names to pageContext.getAttribute() calls? Sorry I am not very professional in this area yet, so just a question. Best regards, Yuri. -Original Message- From: Shawn Bayern [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 31, 2002 6:46 AM To: Tag Libraries Users List Subject: Re: EL On Fri, 29 Mar 2002, Yuri Peter Kazakov wrote: Hello, how can I use JS functions in EL, for example: c:if test="${ a.indexOf( b ) 0 }" doesn't work. Any ideas? Regards, Yuri. You can't. The JSTL expression language is really just for simple references to request parameters, attributes, and other commonly accessed data. For more complex operations -- e.g., on Strings and Collections -- I suggest using custom tag libraries. Having said that, the EL may grow slightly to include some common functionality, either for JSTL 1.0 or JSP 1.3. These features are still being debated. -- Shawn Bayern Author, "JSP Standard Tag Library" http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JSTP Resin
Hello, I downloaded JSP Standard Tag Library from Sun and installed it under Resin. But I can't run Examples (see error message at the end of the mail). It looks like web app listener specified in web.xml doesn't work... (no application object are created for examples) Is listener tag in web.xml (Servlet 2.3 Spec) supported by Resin 2.0.3? Should I register something in resin.conf? Sincerely, Kazakov Yuri. 500 Servlet Exception TypeError: Cannot convert null to an object. at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.init(Compiled Code) at java.lang.Exception.init(Compiled Code) at java.lang.RuntimeException.init(RuntimeException.java:47) at org.mozilla.javascript.EcmaError.init(Unknown Source) at org.mozilla.javascript.NativeGlobal.constructError(Unknown Source) at org.mozilla.javascript.NativeGlobal.constructError(Unknown Source) at org.mozilla.javascript.NativeGlobal.typeError0(Unknown Source) at org.mozilla.javascript.ScriptRuntime.toObject(Unknown Source) at org.mozilla.javascript.Context.toObject(Compiled Code) at org.apache.taglibs.standard.lang.javascript.JavascriptExpressionEvaluator.pu tAttributesInScope(Compiled Code) at org.apache.taglibs.standard.lang.javascript.JavascriptExpressionEvaluator.ev aluate(JavascriptExpressionEvaluator.java:104) at org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager.evaluate (ExpressionEvaluatorManager.java:200) at org.apache.taglibs.standard.tag.el.core.ForEachTag.evaluateExpressions(ForEa chTag.java:196) at org.apache.taglibs.standard.tag.el.core.ForEachTag.doStartTag(ForEachTag.jav a:107) at _elsupport._Expr__jsp._jspService(/standard-examples/elsupport/Expr.jsp: 20) at com.caucho.jsp.JavaPage.service(JavaPage.java:74) at com.caucho.jsp.Page.subservice(Page.java:476) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:176) at com.caucho.server.http.Invocation.service(Invocation.java:277) at com.caucho.server.http.CacheInvocation.service(Compiled Code) at com.caucho.server.http.HttpRequest.handleRequest(Compiled Code) at com.caucho.server.http.HttpRequest.handleConnection(Compiled Code) at com.caucho.server.TcpConnection.run(Compiled Code) at java.lang.Thread.run(Thread.java:485) Resin 2.0.3 (built Wed Oct 17 10:11:08 PDT 2001) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]