islam nigm 0 Newbie Poster

now as an example of validation i have this code

<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<html>
    <head>
        <title>User Info Entry Form</title>
    </head>
    <body bgcolor="white">
        <form action="validate_jstl.jsp" method="post">
            <input type="hidden" name="submitted" value="true">
            <table>
    <c:if test="${empty param.userName}">
        <tr>
            <td></td>
            <td colspan="2"><font color="red">
                    Please enter your Name
            </font></td>
        </tr>
    </c:if>
                <tr>
                    <td>Name:</td>
                    <td>
                        <input type="text" name="userName" 
                               value="<c:out value="${param.userName}" />">
                    </td>
                </tr>
            </table>
        </form>
    </body>
</html>

I have got this error
org.apache.jasper.JasperException: According to TLD or attribute directive in tag file, attribute value does not accept any expressions

the error appear in the lines
<input type="text" name="userName"
value="<c:out value="${param.userName}" />">
and
<c:if test="${empty param.userName}">

How can i solve this problem ?

Thanks in advance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.