I want to create an object for UserService(app engine User service) class in my jsp using struts tags and call it’s createLoginURL(req.getRequestURI()) method.
How can I do it? Any help is greatly appreciated.
Thank you all in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This should all be handled in an action (or utility class), not in JSP.
Get an instance of
UserServicein the action. The action should implementServletRequestAwaresince it needs to call a method on the request (normally this is discouraged as it ties the action to the servlet spec).Save the results of
userService.createLoginURL(req.getRequestURI())method as an action property and render it in the JSP.The only thing that should happen in the JSP is the rendering of that string as a link.