tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Duffy <duff...@yahoo.com>
Subject Re: Setting Date Value For SQL Query
Date Wed, 09 Jul 2003 15:55:53 GMT

Good check, Kris, but I did have the EL notation.

I stripped my query down (it got big with joins) to a
"SELECT * FROM DEFECT".  I still get an "invalid
column exception".  The query runs fine in Oracle's
SQL*Plus.

I wrote a simple JSP a while back that lets me type an
ad-hoc query into an HTML text area and displays the
results in a table.  It's been helpful for testing
connections and data source set-ups.  I can type
"SELECT * FROM DEFECT" into that JSP and get a table
result back. 

What does all this tell me?  I must need more coffee,
because I'm still not seeing what I've missed.

Gotta be a bonehead problem.
 


--- Kris Schneider <kris@dotech.com> wrote:
> Are you using:
> 
> <sql:dateParam value="sinceReportDate" type="date"/>
> 
> instead of:
> 
> <sql:dateParam value="${sinceReportDate}"
> type="date"/>
> 
> Quoting Michael Duffy <duffymo@yahoo.com>:
> 
> > 
> > I've got a question that will turn out to be
> simple,
> > but I'm not seeing it.
> > 
> > I'm writing an SQL query that has a date
> parameter, so
> > I'm using the <sql:dateParam> tag nested
> underneath my
> > <sql:query> tag, with the type="date" attribute
> set.
> > 
> > "JSTL In Action" tells me that the value for
> > <sql:dateParam> has to be a scoped variable of
> type
> > java.util.Date, so I've got a <jsp:useBean> tag
> that
> > declares one.
> > 
> > The problem comes when I try to set the value of
> the
> > Date Bean.  I get a string value from an HTML form
> > input text, so I want to use <fmt:parseDate> to
> turn
> > it into a Date.  I wrap the <fmt:parseDate> in a
> > <c:if> tag that makes sure I only parse when the
> > parameter for the text box is not empty.
> > 
> > But when I run the JSP I get an exception back in
> the
> > browser:
> > 
> > javax.servlet.jsp.JspException: An error occurred
> > while evaluating custom action attribute "value"
> with
> > value "sinceReportDate": Attempt to convert String
> > "sinceReportDate" to type "java.util.Date", but
> there
> > is no PropertyEditor for that type (null) 
> > 
> > I'm not seeing my error.  Can anybody on the list
> spot
> > it?  Thanks - MOD
> 
> -- 
> Kris Schneider <mailto:kris@dotech.com>
> D.O.Tech       <http://www.dotech.com/>
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> taglibs-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Mime
View raw message