Dzięki, znalazłem przykładowy kod
<%String user=request.getParameter("user"); %>
<%if(user == null || user.length() == 0){
out.print("I see! You don't have a name.. well.. Hello no name");
}
else {%>
<%@ include file="response.jsp" %>
<% } %>
który jednak trzebaby przerobić tak by w if'ie był warunek dla wartości z bazy. Jakaś podpowiedź?
Zmodyfikowałem trochę kod by łączył się do bazy i robił select, jednak to nadal nie to :/
<%
if
<login-module code="pl.bluemedia.ds.commons.jboss.security.ExtendedDatabaseServerLoginModule" flag="required">
<module-option name="dsJndiName">java:/database</module-option>
<module-option name="principalsQuery"><![CDATA[
select u.changepass from tuser u
where u.changepass = 'true'
)]]></module-option>
</module-option>
<module-option name="unauthenticatedIdentity">nobody</module-option>
<module-option name="hashAlgorithm">MD5</module-option>
<module-option name="hashEncoding">hex</module-option>
<module-option name="hashCharset">UTF-8</module-option>
<module-option name="explodeRoles">true</module-option>
</login-module>
{%>
<jsp:forward page ="/zmiana_hasla" />
<%
else
{%>
<jsp:include page="/pulpit" />
<%
}
%>