public class LoginAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String status; String msg=null; String originalURI=(String)request.getAttribute(org.apache.struts.Globals.ORIGINAL_URI_KEY); System.out.println("originalurl========"+originalURI); Loginform lf=(Loginform)form; String name=lf.getName(); String pwd=lf.getPwd(); if(name.equals("swapna") && pwd.equals("swappna")) { status="success"; } else { status="Failure"; } //System.out.println("hfjkfhkfhef===="+ mapping.getPath()); String url=request.getAttribute("javax.servlet.forward.request_uri"); String url1=request.getAttribute("javax.servlet.forward.query_string") System.out.println("path========-----"+url); return mapping.findForward(status); } }
ActionForward af = mapping.findForward(status); System.out.println("path========-----".concat(af.getPath()));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)