PDA

View Full Version : JSP - user input - error using JSTL


superman
11-03-2006, 07:16 PM
i've just started JSP's in college

i am using this code - one of the lecturers examples

<html>
<body>
<form method= "post" action ="test.jsp">
Please select the Honda 2000 features needed <BR>
Aero Screen: <Input type = text Name = "screen"><br>
CD Changer: <Input type = text Name = "cd"><br>
Spoiler: <Input type = text Name = "spoiler"><br>
<input type = "submit" value = "add to shopping cart">
</form>
</body>
</html>

this is just the form with 3 text values


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

<html> other head html etc….
<body>
<%-- calculate the sum of 1 plus 2 plus 3 dynamically --%>
Choices selected for your screen, cd changer and spoiler were: <br>
Screen: <c:out value="${param.screen}" /> <br>
CD changer: <c:out value="${param.cd}" /> <br>
Spoiler: <c:out value="${param.spoiler}" /><br>
</body>
</html>

this is supposed to retrieve and display the values entered in the form.jsp

but i keep getting an error. i have attached the error that tomcat gives me

many thanks

superman
11-13-2006, 08:48 PM
got it sorted. some problem with the files in WEB-INF