Zeeshan Akhter

Spring Interceptors : It has the ability to pre-handle and post-handle the web requests.


<?xml version="1.0" encoding="UTF-8"?>

 "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

 <include file="struts-default.xml" />
 <package name="default" extends="struts-default">
        <interceptor name="bean-scope"/>
        <interceptor name="params"
        <interceptor name="userAuthentication"

        <interceptor-stack name="authStach">
           <interceptor-ref name="bean-scope"/>
           <interceptor-ref name="userAuthentication"/>
           <interceptor-ref name="defaultStack"/>

     <action name="myProfile"class="com.myproject.application.action.EntrepreneurAction"
        <interceptor-ref name="authStach"/>
        <result name="success" type="tiles" >pages/myProfile.jsp</result>
package com.myproject.application.interceptor; import com.myproject.application.model.User; public class AllRoleAuthenticationInterceptor extends UserAuthenticationInterceptor { private static final long serialVersionUID = -5932013298987566795L; @Override public boolean isAllowed(User user) { return true; } } package com.myproject.application.interceptor; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.struts2.ServletActionContext; import com.cofundit.application.action.constants.ActionConstants; import com.cofundit.application.model.User; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.AbstractInterceptor; /** * A base class for authenticating all the users. * Needs to override the isAllowed method to control the access */ public class UserAuthenticationInterceptor extends AbstractInterceptor{ private static final long serialVersionUID = 6487648946271825850L; @Override public String intercept(ActionInvocation invocation) throws…

View original post 62 more words

About Mallik

I born in Good cultural place called India. My family is traditional family. We fallow all Indian traditions.

Posted on January 28, 2013, in About All. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Apple News & Mac Rumors Breaking All Day


Technology news, trends and analysis covering mobile, big data, cloud, science, energy and media


We're already living in the future. It's just not evenly distrbuted yet.


News and reviews from the world of gadgets, gear, apps and the web

The Past and Present Future

Ken Hinckley's Ideas, Visions, and Opinions on the Research Frontiers of Human Technologies

TED Blog

The TED Blog shares interesting news about TED, TED Talks video, the TED Prize and more.

Inside BlackBerry

The Official BlackBerry Blog

Bill Mullins' Weblog - Tech Thoughts

Security and System Tools and Tips. Software Reviews, News, Views, Downloads and Links.


Poetry. Travel. Et cetera.

%d bloggers like this: