I’m creating createEdit.jsp , the page which can handle both edit and create new users.
Here is my jstl tag
<c:if test="${ pageAction == 'edit' }">
<input type="text" name="loginU" disabled="disabled" value="${userEdit.login}"/>
</c:if>
if this page is ‘edit’ I have disabled textfield with login (e.g. ‘user’ ) shown.
The problem is – this value can’t be posted further as request expires.
And When I’m trying to get loginU on my servlet I get null.
String loginU = req.getParameter("loginU");
out.println("login: " + loginU);
What should I do to pass this ${userEdit.login} further
inputsmarked asdisableddo not get POSTed, ones marked asreadonlydo however, so you could:The alternative, which may look better, is to spit the value out and add a hidden input to send the value: