I am using form-based authentication and j_security_check in my j2ee application which runs on glassfish 3.1. Problem is when login succeed I have to update some data related to authenticated user. How to make post-login operation after j_security_check ends it's execution? Thanks.
post login operation with j_security_check
2k Views Asked by user992140 At
2
There are 2 best solutions below
2
Hesham Yassin
On
Create a filter which is mapped to
j_security_checkYou need to overwrite the
Originheader of the response beforechain.doFilter(request, response);of that filter and also to place your post redirect URL in the cookieWASReqURL(Or the cookie of glassfish that holds the next url)The link you chose in step 2 need to be mapped to a servlet which executes the post-j_security_check stuff and afterward, to redirect back to the overwritten link from step 2.
Related Questions in JAKARTA-EE
- Which Should i use for date,time,email in servlet?
- Simple JavaEE HTML GET/POST application
- Updating the message contents for a MessageDialog wicket
- Access roles from multiple applications
- How to compile an individual jsp file from command line
- DB2, Hibernate, JPA: Schema does not exist
- Spring load a file
- Execute RequestDispatcher after 5 seconds
- Hibernate Lazy loading not work in OneToOne relation
- Websphere 8.5.5 - shared session context not working
- withSchedule(ScheduleBuilder<SBT>) in the type TriggerBuilder<Trigger> is not applicable for arguments (MutableTrigger)
- Setting response header using interceptor?
- How to use the same ContainerRequestFilter for multiple projects?
- [Ljava.lang.Object; cannot be cast to List from a request SQL
- which should i use in request.getParameter in servlet?
Related Questions in JSF-2
- Strange java.lang.ArrayIndexOutOfBoundsException rendering error in jsf application under high load
- Ajax-update only a component attribute, not the whole component nor its children
- How to instantiate a backing bean on page load
- How to add '%' symbol in textbox using jsf and jsp?
- Primefaces datatable duplicate "No records found" while doing column freeze for empty records
- How to provide a file download from a JSF backing bean using af:commandMenuItem?
- Using multiple FluidGrids in one form
- Masks in JSF2 with rich:jQuery?
- IceFaces message not showing
- Add table plugin to primefaces editor
- this.jq.draggable is not a function when using primefaces dialog framework
- Setting f:setPropertyActionListener value with a f:param value
- It is possible to download file on p:poll
- Spring Boot with Jsf views
- JSF, Target unreachable
Related Questions in GLASSFISH-3
- Understanding Grizzly 1.9.36 internals
- Warning: This page calls for XML namespace http://xmlns.jcp.org/jsf/XXX declared with prefix XXX but no taglibrary exists for that namespace
- Make deployment fail with customized error in Glassfish 3.1
- Change colour of Glassfish 3.1 Community Edition Domain Application Server
- Primefaces wizard in internet explorer is rendering the next button multiple times
- Glassfish 3.0: Exception while deploying ejb module...Invalid ejb j ar: it contains zero ejb
- Glassfish 3 Connection Pool throws java.sql.SQLSyntaxErrorException: ORA-00933
- IllegalArgumentException: Invalid ejb jar: it contains zero ejb
- java.lang.AbstractMethodError while deplyong war on GlassFish Open Source Edition 3.1
- asadmin list-instances cluster glassfish
- Spring-Data-JPA in CDI environment?
- Can one change the domain xml configuration file of glassfish 3.1.2.2 while the server is running?
- Lazy loading in TomEE is not working as expected
- JSF PhaseListener called not at all or twice
- Apache Fop: Galssfish 3.1.2 fails to render pictures
Related Questions in J-SECURITY-CHECK
- Jboss Wildfly 8.1 session timeout on login page
- Remember Me auto fill value in forms
- JBoss 4 j_security_check filter
- How do I programmatically call authenticate from within a servlet like j_security_check would do
- Spring Security authenticationSuccessHandler and j_security_check
- How can I get j_username on my index.jsp after successful authentication with j_security_check?
- UTF-8 encoded j_security_check username incorrectly decoded as Latin-1 in Tomcat realm
- Glassfish 3.1.2 - after creating cluster & deploying app j_security_check loop
- j_security_check is not available if user is already logged in
- post login operation with j_security_check
- CDI SessionScoped Bean instance remains unchanged when login with different user
- Passing additional parameters to j_security_check
- How to check if a user is logged in when using auth-method FORM
- How to make weblogic form authentication in wicket
- Java forms auth with j_security_check and Glassfish
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
A workaround with Servlet 3.0 (or Java EE 6): Call
HttpServletRequest.login()from a managed bean and if it doesn't throw an exception do your post login operations.