tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Knox <jk...@lvcm.com>
Subject Re: JSTL and EL question - SOLVED
Date Wed, 04 Jun 2003 15:34:58 GMT
I thought I liked the idea of having the taglib in the web.xml file. 
When I try it I'm getting "This absolute uri 
(http://java.sun.com/jstl/core) cannot be resolved in either web.xml or 
the jar files deployed with this application". Do I have to download it 
somewhere in order to use it in the web.xml file? Any ideas?

Thanks,

Jeff


On Wednesday, June 4, 2003, at 07:36  AM, Jeff Knox wrote:

> I never thought about putting the tablib in the web.xml file. I like 
> that! As for referencing the tablibs on individual pages there are 
> four differentlibraries you can use depending on what you need to do 
> on the page. The core library is:
>
>    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
>
> For internationalization and formatting:
>
>     <%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
>
> Database access:
>
>    <%@taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
>
> XML parsing and transforming:
>
>    <%@taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
>
>
> On Wednesday, June 4, 2003, at 06:35  AM, Schwartz, David (CHR) wrote:
>
>> can you also send the taglib line from the top of jsp?
>>
>> -----Original Message-----
>> From: Nikola Milutinovic [mailto:Nikola.Milutinovic@ev.co.yu]
>> Sent: Wednesday, June 04, 2003 9:32 AM
>> To: Tomcat Users List
>> Subject: Re: JSTL and EL question - SOLVED
>>
>>
>> ----- Original Message -----
>> From: "Schwartz, David (CHR)" <David.Schwartz3@pfizer.com>
>> To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
>> Sent: Wednesday, June 04, 2003 1:55 PM
>> Subject: RE: JSTL and EL question - SOLVED
>>
>>
>>> I'm still having problems. Can you please post a complete sample 
>>> along
>> with
>>> web.xml sample?
>>
>> What exactly are your problems?
>>
>> In web.xml you should declare taglibs:
>>
>>  <taglib>
>>   <taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
>>   <taglib-location>/WEB-INF/c.tld</taglib-location>
>>  </taglib>
>>  <taglib>
>>   <taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
>>   <taglib-location>/WEB-INF/sql.tld</taglib-location>
>>  </taglib>
>>
>>  <resource-ref>
>>   <res-ref-name>jdbc/EVracunDS</res-ref-name>
>>   <res-type>javax.sql.DataSource</res-type>
>>   <res-auth>Container</res-auth>
>>  </resource-ref>
>>
>> And then use this in your JSP:
>>
>> <sql:setDataSource dataSource="EVracunDS"/>
>> <sql:query var="userData">
>>   SELECT * FROM user_tab WHERE user_id = ?
>>   <sql:param value="${userID}"/>
>> </sql:query>
>> ...
>> <c:set var="userRow" value="${userData.rows[0]}"/>
>> <c:out value="${userRow.user_id}"/>
>> ...
>>
>> Nix.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Mime
View raw message