Yes, thanks for reply . i got the solution.customized login jsp for both login and registration.
On Friday 21 March 2014 08:35 PM, J?r?me LELEU wrote: > Hi, > > I think that your registration page should not be protected by Spring > Security (see the web.xml) as not-authenticated users can register, right? > Best regards, > J??me > > > > 2014-03-21 8:47 GMT+01:00 pavan <[email protected] > <mailto:[email protected]>>: > > Hi Jerome, > > Thanks for your help. > I have configure as you suggested but some mistake happens from my > end and it is redirect to login page. > Please suggest me i am going wrong some where. > it is still going to > > http://localhost:9090/cas/login?service=http%3A%2F%2Fpavan.myapps.com%3A8080%2F%2Fbit%2Ffaces%2Fjsp%2FcasRegistration.jsp > > > following is code cas client side:- > > <filter> > <filter-name>CAS Authentication Filter</filter-name> > > <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> > <init-param>bag > <param-name>casServerLoginUrl</param-name> > <param-value>http://localhost:9090/cas/login</param-value> > </init-param> > <init-param> > <param-name>casServerRegistrationUrl</param-name> > > <param-value>http://localhost:9090/cas/casRegistrationView.jsp?</param-value> > </init-param> > <init-param> > <param-name>serverName</param-name> > <param-value>http://pavan.myapps.com:8080/</param-value> > </init-param> > </filter> > > > following is code cas server side:- > > > ----------------------------------------------------------------------------------------------------- > > 1.default_view.properties > > casRegistrationView.(class)=org.springframework.web.servlet.view.JstlView > casRegistrationView.url=/casRegistrationView.jsp > > > > ----------------------------------------------------------------------------------------------------- > 2.web.xml > > > <filter-mapping> > <filter-name>springSecurityFilterChain</filter-name> > <url-pattern>/casRegistrationView</url-pattern> > </filter-mapping> > > > <servlet-mapping> > <servlet-name>cas</servlet-name> > <url-pattern>/casRegistrationView</url-pattern> > </servlet-mapping> > > > ------------------------------------------------------------------------------------------------------ > 3.cas-server.xml > > > <bean id="xmlViewResolver" > class="org.springframework.web.servlet.view.XmlViewResolver" > p:order="1" > p:location="/WEB-INF/view/views.xml" > /> > > <!-- Locale Resolver --> > <bean id="localeResolver" > class="org.springframework.web.servlet.i18n.CookieLocaleResolver"/> > > <bean id="localeChangeInterceptor" > class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/> > > <bean id="urlBasedViewResolver" > class="org.springframework.web.servlet.view.UrlBasedViewResolver" > p:viewClass="org.springframework.web.servlet.view.InternalResourceView" > p:prefix="/WEB-INF/view/jsp/" > p:suffix=".jsp" > p:order="2"/> > > <bean id="errorHandlerResolver" > class="org.jasig.cas.web.FlowExecutionExceptionResolver"/> > > <bean > > class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"/> > > <bean > id="handlerMappingC" > class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> > <property name="mappings"> > <props> > <prop key="/logout">logoutController</prop> > <prop key="/serviceValidate">serviceValidateController</prop> > <prop key="/validate">legacyValidateController</prop> > <prop key="/proxy">proxyController</prop> > <prop key="/proxyValidate">proxyValidateController</prop> > <prop key="/samlValidate">samlValidateController</prop> > <prop > key="/services/add.html">addRegisteredServiceSimpleFormController</prop> > <prop > key="/services/edit.html">editRegisteredServiceSimpleFormController</prop> > <prop > key="/services/loggedOut.html">serviceLogoutViewController</prop> > <prop > key="/services/viewStatistics.html">viewStatisticsController</prop> > <prop > key="/services/*">manageRegisteredServicesMultiActionController</prop> > <prop key="/openid/*">openIdProviderController</prop> > <prop > key="/authorizationFailure.html">passThroughController</prop> > <prop key="/403.html">passThroughController</prop> > <prop key="/status">healthCheckController</prop> > <prop key="/addUser">registrationController</prop> > <prop > key="/casRegistrationView">casRegistrationController</prop> > </props> > </property> > <property > name="alwaysUseFullPath" value="true"/> > <!-- > uncomment this to enable sending PageRequest events. > <property > name="interceptors"> > <list> > <ref bean="pageRequestHandlerInterceptorAdapter" /> > </list> > </property> > --> > </bean> > <bean id="casRegistrationController" > > class="org.jasig.cas.registration.controller.CasRegistrationViewController" > p:casRegistrationController-ref="casRegistrationController" > > > </bean> > > > ------------------------------------------------------------------------------------------------------ > new controller introduce............ > 4.CasRegistrationViewController.java > > > package org.jasig.cas.registration.controller; > > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > > > import org.springframework.web.servlet.ModelAndView; > import org.springframework.web.servlet.mvc.AbstractController; > > public class CasRegistrationViewController extends > AbstractController { > > private CasRegistrationViewController casRegistrationController; > private String message; > > > public CasRegistrationViewController > getCasRegistrationController() { > return casRegistrationController; > } > > public void setCasRegistrationController( > CasRegistrationViewController casRegistrationController) { > this.casRegistrationController = casRegistrationController; > } > > protected ModelAndView > handleRequestInternal(HttpServletRequest request, > HttpServletResponse response) throws Exception { > > System.out.println("Entered.........."); > > return new > ModelAndView("casRegistrationView","welcomeMessage", message); > } > > public String getMessage() { > return message; > } > > public void setMessage(String message) { > this.message = message; > } > > > > } > > > --------------------------------------------------------------------------------------------------- > > > > Thanks and regards, > Pavan > > > > > On Thursday 20 March 2014 07:53 PM, J?r?me LELEU wrote: >> Hi, >> >> If you want to create a new JSP in the CAS server, you need to >> add the mapping in the web.xml file but also in the >> cas-servlet.xml file. >> Best regards, >> J?r?me >> >> >> >> 2014-03-20 7:23 GMT+01:00 pavan <[email protected] >> <mailto:[email protected]>>: >> >> Hi, >> >> can anyone help me on this. >> >> Regards, >> Pavan >> >> >> On Tuesday 18 March 2014 06:34 PM, pavan wrote: >>> Hi, >>> >>> Thanks Michael , There are two link on my application.one is >>> sign in and sign up.I have overwrite login >>> jsp(casLoginView.jsp) for sign in(Email and pass fields).now >>> i want to registration page.i have added one hiperlink on >>> casLoginview.jsp and that is working for new registration >>> with casRegistration.jsp in?? cas.but i want open this >>> casRegistration.jsp from my application directly for >>> registration. >>> >>> suggest me if?? i am going wrong. >>> >>> Thanks and regards, >>> Pavan >>> >>> On Tuesday 18 March 2014 06:14 PM, Michael Wechner wrote: >>>> What don't you overwrite the login jsp >>>> (WEB-INF/view/jsp/default/ui/casLoginView.jsp)? >>>> >>>> Cheers >>>> >>>> Michael >>>> >>>> Am 18.03.14 12:34, schrieb pavan: >>>>> Hi, >>>>> >>>>> I am new user to cas.your help will be motivate to me. >>>>> Is it this possible goes to custom jsp added to cas. i mean some >>>>> thing >>>>> like >>>>> >>>>> that:http://localhost:9090/cas/casRegisteationView.jsp?service=http%3A%2F%2Fpavan.myapp%3A8080%2F%2Fbit%2Ffaces%2Fjsp%2FcasRegistration.jsp >>>>> >>>>> Iam trying it but it is redirecting to >>>>> >>>>> http://localhost:9090/cas/login?service=http%3A%2F%2Fpavan.myapp%3A8080%2F%2Fbit%2Ffaces%2Fjsp%2FcasRegistration.jsp >>>>> >>>>> it is always redirecting to login page. >>>>> >>>>> <filter> >>>>> <filter-name>CAS Single Sign Out Filter</filter-name> >>>>> >>>>> <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class> >>>>> </filter> >>>>> <filter> >>>>> <filter-name>CAS Authentication Filter</filter-name> >>>>> >>>>> <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> >>>>> <init-param> >>>>> <param-name>casServerLoginUrl</param-name> >>>>> >>>>> <param-value>http://localhost:9090/cas/login</param-value> >>>>> </init-param> >>>>> <init-param> >>>>> <param-name>casServerRegistrationUrl</param-name> >>>>> >>>>> >>>>> >>>>> <param-value>http://localhost:9090/cas/casRegisteationView.jsp?</param-value> >>>>> </init-param> >>>>> <init-param> >>>>> <param-name>serverName</param-name> >>>>> <param-value>http://pavan.myapp:8080/</param-value> >>>>> </init-param> >>>>> </filter> >>>>> <filter> >>>>> <filter-name>CAS Validation Filter</filter-name> >>>>> >>>>> <filter-class>org.jasig.cas.client.validation.Saml11TicketValidationFilter</filter-class> >>>>> <init-param> >>>>> <param-name>casServerUrlPrefix</param-name> >>>>> <param-value>http://localhost:9090/cas/</param-value> >>>>> </init-param> >>>>> <init-param> >>>>> <param-name>serverName</param-name> >>>>> <param-value>pavan.myapp:8080/</param-value> >>>>> </init-param> >>>>> <init-param> >>>>> <param-name>redirectAfterValidation</param-name> >>>>> <param-value>true</param-value> >>>>> </init-param> >>>>> <init-param> >>>>> <param-name>tolerance</param-name> >>>>> <param-value>75000</param-value> >>>>> </init-param> >>>>> </filter> >>>>> <filter> >>>>> <filter-name>CAS HttpServletRequest Wrapper >>>>> Filter</filter-name> >>>>> >>>>> <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class> >>>>> </filter> >>>>> <filter> >>>>> <filter-name>CAS Assertion Thread Local >>>>> Filter</filter-name> >>>>> >>>>> <filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class> >>>>> >>>>> </filter> >>>>> >>>>> <filter-mapping> >>>>> <filter-name>CAS Single Sign Out Filter</filter-name> >>>>> <url-pattern>/jsp/logout.jsp</url-pattern> >>>>> </filter-mapping> >>>>> <filter-mapping> >>>>> <filter-name>CAS Authentication Filter</filter-name> >>>>> <url-pattern>/jsp/casLogin.jsp</url-pattern> >>>>> </filter-mapping> >>>>> <filter-mapping> >>>>> <filter-name>CAS Authentication Filter</filter-name> >>>>> <url-pattern>/jsp/casRegistration.jsp</url-pattern> >>>>> </filter-mapping> >>>>> <filter-mapping> >>>>> <filter-name>CAS Validation Filter</filter-name> >>>>> <url-pattern>/*</url-pattern> >>>>> </filter-mapping> >>>>> <filter-mapping> >>>>> <filter-name>CAS HttpServletRequest Wrapper >>>>> Filter</filter-name> >>>>> <url-pattern>/*</url-pattern> >>>>> </filter-mapping> >>>>> <filter-mapping> >>>>> <filter-name>CAS Assertion Thread Local >>>>> Filter</filter-name> >>>>> <url-pattern>/*</url-pattern> >>>>> </filter-mapping> >>>>> >>>>> >>>>> Thanks and regards, >>>>> Pavan >>>>> >>> >>> -- >>> You are currently subscribed [email protected] >>> <mailto:[email protected]> as:[email protected] >>> <mailto:[email protected]> >>> To unsubscribe, change settings or access archives, >>> seehttp://www.ja-sig.org/wiki/display/JSG/cas-user >> >> -- >> You are currently subscribed [email protected] >> <mailto:[email protected]> as:[email protected] >> <mailto:[email protected]> >> To unsubscribe, change settings or access archives, >> seehttp://www.ja-sig.org/wiki/display/JSG/cas-user >> >> >> -- >> You are currently subscribed [email protected] >> <mailto:[email protected]> as:[email protected] >> <mailto:[email protected]> >> To unsubscribe, change settings or access archives, >> seehttp://www.ja-sig.org/wiki/display/JSG/cas-user > > -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
