public String successLogin(){
int usrname = 0;
boolean fg = true;
con = dbc.connectDB();
if (con == null) {
fg = false;
}
if (fg) {
try {
st = con.createStatement();
String query = "SELECT USER_NAME,USER_ID,USER_PASS FROM UB_SYSTEM_USER WHERE USER_ID = '"+userId+"' AND USER_PASS = '"+userPass+"' AND ACTIVATION_FLAG = 1 ";
System.out.println(query);
ResultSet rs = st.executeQuery(query);
while (rs.next()) {
usrname = rs.getRow();
}
} catch (SQLException sq) {
sq.printStackTrace();
} finally {
try {
if (rs != null) {
rs.close();
}
con.close();
} catch (SQLException ex) {
ex.printStackTrace();
}
}
}
if (usrname>0) {
return "successLogin";
}else{
addFieldError("logMsg", "Invalid User ID or Password");
return "notloginhomePage";
}
}
jsp page ::
<div style="color:#FF0000; ">
<s:fielderror>
<s:param value="logMsg"/>
</s:fielderror>
</div>
java action class :
public class LoadAction extends ActionSupport {
// create method
}
struts2 configure :
<package name="web" extends="jasperreports-default, struts-default, json-default" namespace="/">
</package>
Micro Hair Trimmer - Tithology - ClassicArt
ReplyDeleteThe hairspray are from a tree called Yggdrasil, iron titanium the tree of life. titanium bikes The apple watch 6 titanium branches and remmington titanium roots of titanium aftershokz these trees represent the branches of trees