java - pass session id to url jsp page in struts 2 -
i have login page , welcome page
here struts.xml
file
<?xml version="1.0" encoding="utf-8" ?> <!doctype struts public "-//apache software foundation//dtd struts configuration 2.1//en" "http://struts.apache.org/dtds/struts-2.1.dtd"> <struts> <constant name="struts.devmode" value="true" /> <constant name="struts.enable.dynamicmethodinvocation" value="true"/> <constant name="struts.objectfactory" value="org.apache.struts2.spring.strutsspringobjectfactory" /> <package name="authentiate" extends="struts-default"> <global-results> <result name="error">/error.jsp</result> </global-results> <action name="loginauthenticate*" class="com.authenticate.actions.loginauthenticate" method="{1}"> <result name="success">/welcome.jsp</result> <result name="redirectregister" type="redirect">/registration.jsp</result> </action> </package> </struts>
how can append session id welcome.jsp
when return success action class in struts.xml
following
http://myopenidhost.com/openid/welcome.jsp?sessionid=swe234323xghf346rrg34r4
in case when submit page use below in javascript function:
you declare hidden field in page , assign jsessionid action hidden.
function abc(){ var jsessionid=document.<hiddenfieldname>.value; document.action="welcomepage.jsp?sessionid="+jsessionid; document.submit(); }
i don't know trying achieve yaa kind of request , can see generated id in url
if not wrong way append values in url.. please let me know if helps...if not need exact criteria want achieved.
Comments
Post a Comment