richardsimnett
asked on
Beginner needs some help with JSP...
Hello,
I recently decided that I wanted to learn JSP. I have a background in j2se, and coldfusion. I downloaded and installed tomcat 6, and got a book called Beginning JSP 2, however, I am finding that none of the examples in the book seem to work with tomcat 6, it appears that it was designed for tomcat 5.0.16... anyways I am having trouble with the taglib directive... I am trying to do something really really simple like this:
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<html>
<body>
<c:redirect url="http://www.yahoo.com">
</body>
</html>
Anyways can someone please point me in the direction of a good online JSP Tutorial, or recommend a good book to learn from, and possibly tell me how to get the above example to work?
Worth 500 points.
Thanks,
Rick
I recently decided that I wanted to learn JSP. I have a background in j2se, and coldfusion. I downloaded and installed tomcat 6, and got a book called Beginning JSP 2, however, I am finding that none of the examples in the book seem to work with tomcat 6, it appears that it was designed for tomcat 5.0.16... anyways I am having trouble with the taglib directive... I am trying to do something really really simple like this:
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<html>
<body>
<c:redirect url="http://www.yahoo.com">
</body>
</html>
Anyways can someone please point me in the direction of a good online JSP Tutorial, or recommend a good book to learn from, and possibly tell me how to get the above example to work?
Worth 500 points.
Thanks,
Rick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
nevermind I got it.
ASKER
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperEx
org.apache.jasper.compiler
org.apache.jasper.compiler
org.apache.jasper.compiler
org.apache.jasper.compiler
Also how do I determine the # of rows returned by a query? Here is my code so far:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<c:forEach var="entry" items="${header}">
Key: ${entry.key}<br>
Value: ${entry.value}<br><br>
</c:forEach>
<!---- execute database update ---->
<sql:setDataSource var="ds"
driver="com.mysql.jdbc.Dri
url="jdbc:mysql://localhos
user="root" password="test" />
<sql:query var="login" datasource="${ds}">
select * from users where username='${param.username
</sql:query>
<h1>Database Access</h1>
UserID: ${login.id}
Thanks,
Rick