J
Joey P
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
ut value="${pageScope.myCat}" default="No myCat object on this
page"/>
<br />myDbId is
<c
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
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
page"/>
<br />myDbId is
<c
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