child window is opened from parent window.
to access child window elements we need to select child window then only we can click/access child window elements.
Here when user sends a request in https protocol to apache webserver. apache webserver will made a call to application server with http protocol.
apache server retries the http response from application server.
Apache server sends the http response to the user.
Here user is sending https request and getting the response in http.
Below steps are to handle the above issue.
Defining LoginUrlAuthenticationEntryPoint: -
==============================
Here when user tries to acess any url customAuthenticationFilter will be called.
For log out also customLogoutFilter will be called.
<http auto-config="false" entry-point-ref="LoginUrlAuthenticationEntryPoint" use-expressions="true"> <intercept-url pattern="/login.html" filters="none" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <intercept-url pattern="/update/*" access="hasAnyRole('ROLE_ADMIN','ROLE_DEV')" /> <custom-filter position="FORM_LOGIN_FILTER" ref="customAuthenticationFilter" /> <custom-filter position="LOGOUT_FILTER" ref="customLogoutFilter"/> </http>
====================================================
Defining customAuthenticationFilter:-
============================
Depending upon the result of CustomAuthenticationFilter filter successHandler or failureHandler will be called.
<beans:bean id="customAuthenticationFilter" class="com.CustomAuthenticationFilter" > <beans:property name="authenticationManager" ref="authenticationManager" /> <beans:property name="authenticationFailureHandler" ref="failureHandler" /> <beans:property name="authenticationSuccessHandler" ref="successHandler" /> </beans:bean>
======================================================
Defining successHandler: -
====================
In successHandler we are defining customRedirect startegy.
private RequestContext(HttpServletRequest request) { this.request = request; } /** * This method will returns RequestContext object * @return */ public static RequestContext getCurrentInstance() { return instance.get(); }
public static RequestContext newInstance(HttpServletRequest request) { RequestContext context = new RequestContext(request); instance.set(context); return context; } /** * This method will removes RequestContext object from ThreadLocal for current thread * */ public void release() { instance.remove(); }
public HttpServletRequest getRequest() { return request; }
If you have created Userlibraries with JPA
required then select type “User Library. And select user library.
If you have not created user library for JPA
libraries then select “Disable library configuration”.I am going with “Disable library
configuration”.
Click on Finish after selecting “Disable library
configuration” type.
Step 6: Project will be opened in JPA perspective.
Step 7:Right click on the project and select Entity
from Tables.
After selecting entities from tables below option will come.
Step 8: Click on add connections.
Step 9:Select Oracle connection profile and enter OracleConnection
as the name in text field.
Step 10: Click on Next.
Step 11: Enter db details.
Step 12: After entering db details then click on Test
Connection.
You will get Ping Succeeded success message. If not check db
details and enter correctly.
Step 13: Click on Finish and close.
Step 14:Right click on the project and Select Entities
from Tables.
Step 15:Select
Connection as Oracle from dropdown box. After selecting it all the tables will
be displayed.
Step 16:Select Tables for which you want to create
entities.
Step 17:After
selecting tables click on Next.
Step 18:Click on Next.
Step 19 :
Enter key generator for primarykeys.
Select entity access for field or for property
Slect fetch type.
Select Collection Properties type what you reuired.
Step 20: Enter the package name.
Step 21: Click on Next.
Step 22: Default class names will be created if you want
to change Select the Table and change the name.