commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wynter" <da...@stpenable.com>
Subject [Jelly] More accessible general examples?
Date Sat, 06 Nov 2004 15:33:35 GMT
Hi,

I have used Jelly exclusivelywith blissed until now. When I needed to use it
for a broader purpose I found it really difficult to find decent examples. I
have Jelly embedded and find the exceptions return are fairly useless. While
the tag libs are pretty well catered for in the test script more general
things like how to concatenate a string I have found nowhere. So here is my
script

<j:jelly xmlns:j="http://www.blah.com/ns/jelly"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blah.com/ns/jelly jelly.xsd"
xmlns:sql="jelly:sql">
  <j:set var="datepattern" value="MMdd"/>
  <j:set var="databaseUrl"
value="jdbc:jtds:sqlserver://localhost:1433/RWTransformer"/>
  <j:set var="databaseDriver" value="net.sourceforge.jtds.jdbc.Driver"/>
  <j:set var="databaseUser" value="Loader"/>
  <j:set var="databasePassword" value="********"/>
  <j:new className="java.util.Date" var="today"/>
  <j:new className="java.text.SimpleDateFormat" var="sdf"/>
  <j:invoke method="applyPattern" on="${sdf}">
      <j:arg value="${datepattern}"/>
  </j:invoke>
  <j:invoke method="format" on="${sdf}" var="partdatestr">
      <j:arg value="${today}"/>
  </j:invoke>
  <j:set var="pattern" value="????"+"${partdatestr}"+".I"/>
  <sql:setDataSource url="${databaseUrl}" driver="${databaseDriver}"
user="${databaseUser}"
    password="${databasePassword}"/>
  <sql:update>
      update rw_file set filename_pattern=?
      <sql:param value="${pattern}"/>
  </sql:update>
</j:jelly>

The best the excpetion can give me is "Process script could not be compiled
and therefore run." which doesn't really help me. Trying to trace into Jelly
to find out the problem is a nightmare, so quickly gave up on that. Is there
some sort of console application in which you can test Jelly scripts that
gives decent exception, like where the syntax error is?

Thx.

David Wynter


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message