JSTL library problems

Discussion in 'Java' started by Joey P, Oct 10, 2004.

  1. Joey P

    Joey P Guest

    Hi,

    I've been trying all day to get JSP files working through Tomcat on my
    home computer. I'm very new to JSP so don't really know how to do
    basic programming in it yet. I copied out some JSP from my workbook
    into JPadPro just to see how it would look in Tomcat. The code is
    listed below:-

    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

    <c:set value="Tiddles" var="myCat" />
    <c:set var="myDbId" scope="application">jdbc:mysql://localhost/eg02dsdb</c:set>

    <html>
    <head>
    <title> Question 1 </title>
    </head>
    <body>
    <p>
    <br />myCat is
    <c:eek:ut value="${pageScope.myCat}" default="No myCat object on this
    page"/>
    <br />myDbId is
    <c:eek:ut value="${applicationScope.myDbId}" default="No myDbId object in
    this application"/>
    </p>
    </body>
    </html>

    I then got an error message when I tried to load the page in Tomcat.
    I eventually managed to overcome this problem by deploying the c.tld
    file into WEB-INF\tld and the standard.jar and jstl.jar files into the
    WEB-INF\lib folder. The page then loaded, but instead of
    displaying...

    'myCat is Tiddles'
    'myDbId is jdbc:mysql://localhost/eg02dsdb'

    it displays...

    'myCat is ${pageScope.myCat}'
    'myDbId is ${applicationScope.myDbId}'

    If anyone could help me understand what I'm doing wrong, I'd be very
    grateful. Thank you!

    Joe P
     
    Joey P, Oct 10, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. steve

    JSTL to C# conversion?

    steve, Jun 1, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    369
    steve
    Jun 1, 2004
  2. luca
    Replies:
    0
    Views:
    376
  3. Robert Mark Bram

    Custom JSTL that accepts JSTL expression

    Robert Mark Bram, Dec 15, 2004, in forum: Java
    Replies:
    0
    Views:
    1,016
    Robert Mark Bram
    Dec 15, 2004
  4. Replies:
    6
    Views:
    9,632
    Roedy Green
    Sep 20, 2005
  5. DaFoot
    Replies:
    1
    Views:
    1,773
    DaFoot
    Oct 23, 2008
Loading...

Share This Page