JSTL

D

Dennis Dahn

Hello,

I would like to transfer code from JSP to JSTL but have some problems,
especially in the following code:

<%
if (request.getParameter(ISBN) != null){
book= katalog.getBuch(request.getParameter(ISBN));
%>

in jstl i thought it would be like this:

<c:if test="${param.isbn != null}">
<c:set var="buch" value="${katalog.buch}>
<c:param name="isbn"/>
</c:set>
<c:eek:ut value="${buch.buchTitel}"/>
</c:if>

but there is just an error. So how can I declare the parameter ISBN?

Thanks in advance!

Regards,
Dennis
 
S

Steve Sobol

Dennis said:
if (request.getParameter(ISBN) != null){
book= katalog.getBuch(request.getParameter(ISBN));
*snip*

in jstl i thought it would be like this:
*snip*

but there is just an error. So how can I declare the parameter ISBN?

I think the problem might just be one of case: if the form field is ISBN all
caps, then you want ${param.ISBN}, not ${param.isbn}. JSTL property names
are case-sensitive.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top