Domanda

I've been tasked with making some changes to an old webwork web application, and I'm stuck because I just can't get the application to behave the same in my development and test systems as it does in the production system. I don't really know a lot about webwork and it seems hard to find good documentation online.

More specifically, there is a JSP that displays a date. In production, the date includes the time, which is necessary, but in test only the date portion shows.

In production I get dates like this:

7/16/2013 11:00 AM

and in test I get dates like this:

7/16/2013

After a lot of digging I discovered that the production tomcat "work" folder wasn't where I thought it was and it has some ..._jsp.class files that I guess aren't associated with the JSP files I have. However, version control says the portion of the JSP file that prints the date hasn't changed, so I still don't understand how to fix my test system.

It is using the webwork taglib:

<%@ taglib uri="webwork" prefix="ww" %>

and displaying the dates using the property tag in an iterator:

<ww:iterator value="busySearchDTO.freetimes" status="index2">
<ww:property value="start"/>

freetimes is a java.util.Collection of TimeDTO which has this field and method:

  /**
   * Holds value of property start.
   */
  public java.util.Date start;

  /**
   * Getter for property start.
   * @return Value of property start.
   */
  public java.util.Date getStart() {

    return this.start;
  }

Any explanations or pointers would be appreciated.

È stato utile?

Soluzione

The solution was actually fairly mundane.

There was an xwork-conversion.properties file that had been deleted from and ignored in version control but was still on the server. Somehow I missed it. It specified a class to format java.util.Dates.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top