I have a web-application where the users can be sent directly to some specific pages (such as a page where he can view or edit an item). To achieve that, we provide a specif
Assume that foo.jsp is your jsp file. and following code is the button that you want do redirect.
And now we'll check the method for directing in your java (service) class
public String enter() {
if (userName.equals("xyz") && password.equals("123")) {
return "enter";
} else {
return null;
}
}
and now this is a part of faces-config.xml file
'class_name'
'package_name'
request
enter
/foo.jsp