1 Reply Latest reply on Feb 5, 2004 10:59 AM by bommee

    FomatDateTag in JSTL not working

    cboyd

      I'm getting the following exception when trying to use the <fmt:formatDate/> tag included in the JSTL version 1.0.3 in my JSP:

      [java] org.jboss.util.NestedRuntimeException: Unparseable date: "${policy.s
      tartDate}"; - nested throwable: (java.text.ParseException: Unparseable date: "${
      policy.startDate}")
      [java] at org.jboss.util.propertyeditor.DateEditor.getValue(DateEditor.
      java:42)
      [java] at org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPrope
      rtyEditorManager(JspRuntimeLibrary.java:744)
      [java] at org.apache.jsp.propertyLoad$jsp._jspService(propertyLoad$jsp.
      java:897)
      [java] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.jav
      a:107)
      [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      [java] at org.apache.jasper.servlet.JspServlet$JspServletWrapper.servic
      e(JspServlet.java:201)
      [java] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServle
      t.java:381)
      [java] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:
      473)
      [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      [java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.
      java:360)
      [java] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebA
      pplicationHandler.java:294)
      [java] at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java
      :206)
      [java] at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:
      133)
      [java] at org.apache.struts.action.RequestProcessor.doForward(RequestPr
      ocessor.java:1069)
      [java] at org.apache.struts.tiles.TilesRequestProcessor.doForward(Tiles
      RequestProcessor.java:274)
      [java] at org.apache.struts.action.RequestProcessor.processForwardConfi
      g(RequestProcessor.java:455)
      [java] at org.apache.struts.tiles.TilesRequestProcessor.processForwardC
      onfig(TilesRequestProcessor.java:320)
      [java] at org.apache.struts.action.RequestProcessor.process(RequestProc
      essor.java:279)
      [java] at org.apache.struts.action.ActionServlet.process(ActionServlet.
      java:1482)
      [java] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.ja
      va:507)
      [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      [java] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      [java] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.
      java:360)
      [java] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebA
      pplicationHandler.java:294)
      [java] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandle
      r.java:558)
      [java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      [java] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApp
      licationContext.java:505)
      [java] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      [java] at org.mortbay.http.HttpServer.service(HttpServer.java:879)
      [java] at org.jboss.jetty.Jetty.service(Jetty.java:460)
      [java] at org.mortbay.http.HttpConnection.service(HttpConnection.java:7
      70)
      [java] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.jav
      a:932)
      [java] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:78
      7)
      [java] at org.mortbay.http.SocketListener.handleConnection(SocketListen
      er.java:201)
      [java] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:28
      9)
      [java] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:45
      4)
      [java] Caused by: java.text.ParseException: Unparseable date: "${policy.sta
      rtDate}"
      [java] at java.text.DateFormat.parse(DateFormat.java:334)
      [java] at org.jboss.util.propertyeditor.DateEditor.getValue(DateEditor.
      java:38)

      Here is the tag as it appears in my JSP:

      <fmt:formatDate dateStyle="short" pattern="MM/dd/yyyy" value="${policy.startDate}"/>

      It doesn't even appear to be calling the FormatDateTag, but the DateEditor class instead. The ${policy.startDate} is a property in a JavaBean that is of type java.util.Date. Has anyone had any luck using this tag in their JSP under JBOSS 3.0.8/Jetty bundle? I've had luck getting other JSTL tags to work, just not this one.

      Thanks.

        • 1. Re: Load balancing based on neural network
          bommee

          A very simple neural network can learn load statistics
          (in basic - which node is faster) and therefore it would be able to balance tasks more optimal than RoundRobin or Random policy.

          I am working on it, and I am sure it'll work.

          For example, if I have two nodes in cluster, where one is two times faster than other then RoundRobin isn't the best, is it.

          However there are some minor practical problems, for instance, neural net will have to maintain the information it has learned (weights of neuron connections) somehow

          so... practical meaning of it may not be very big.
          But still interesting research topic.

          BTW I have read that next version of WS is going to have
          some kind of dynamic load balancing "based on server statistics".

          I'll post my results in this forum.

          Maris