I'm trying to realize a simple form:
there's a globalname and globalpass, and the User is asked to type in his name and pass.
If name == globalname and pass = globalpass -> "Hello name"
If name == blank or pass == blank -> "O NOEZ, you fergit sumpn!"
If name != globalname or pass != globalpass -> "WHUT? Who be you, intruder?"
So far I only manage to get the first if-working...
<%
String name = request.getParameter("name");
String pass= request.getParameter("pass");
String globalname = "webeng";
String globalpass = "2009";
if (name !=null && pass!=null && name.equals(globalname) && pass.equals(globalpass))
{
%>
<jsp:include page="formular-modul1.jsp" />
<% } else
{
%>
<% }
%>
<%
else if (name =="b" && pass =="c" && name.equals("b") && pass.equals("c"))
{
%>
<jsp:include page="formular-modul2.jsp" />
<%} else
{
%>
<%
}%>
The name=="b" && pass =="c" was just for test purposes, which failed! Can somebody help me out, please?