[jboss-user] [JBoss Seam] - Re: retrieve the URL from request and forward to according p
jyc5131
do-not-reply at jboss.com
Tue Apr 10 05:24:29 EDT 2007
| String path = request.getPathInfo();
| if(path.equals("/")){
| response.sendError(HttpServletResponse.SC_FORBIDDEN);
| return;
| }
| String[] p = path.split("/");
| String uName = null;
| UserMgr uMgr = (UserMgr)Component.getInstance("userMgr",SESSION);
| User u;
| if(p.length == 2){
| uName = p[1];
| u= userMgr.findByUserName(uName);
| }else{
| response.sendError(HttpServletResponse.SC_FORBIDDEN);
| }
| if(u != null)
| RequestDispatcher rd;
| rd = request.getRequestDispatcher("/user/showSetting.do?userID=" + user.getId() );
| rd.forward(request,response);
| return;
| }else {
| response.sendError(HttpServletResponse.SC_FORBIDDEN);
| return;
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035895#4035895
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035895
More information about the jboss-user
mailing list