commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [jelly] csv file to database
Date Thu, 30 Jan 2003 14:26:52 GMT
From: "Gordon" <>
> Would Jelly be a good tool to import a CSV file into a database? If so
> what tag would I use to parse the CSV file?

It might be nice to write a new tag or bean to parse a CSV and iterate over
its rows providing a List for each row. Then you could do things like


<csv:forEach var="row" uri="foo.csv" colSeperator=",">
        insert into foo (a, b, c) values (?, ?, ?)
        <sql:param value="${row[0]}"/>
        <sql:param value="${row[1]}"/>
        <sql:param value="${row[2]}"/>


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

View raw message