{"id":4404,"date":"2012-02-24T15:34:49","date_gmt":"2012-02-24T20:34:49","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=4404"},"modified":"2012-02-24T15:34:49","modified_gmt":"2012-02-24T20:34:49","slug":"session-sharing-webcenter-and-war","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=4404","title":{"rendered":"Session Sharing: WebCenter and WAR"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Create_a_Webcenter_Application_and_Project\">Create a Webcenter Application and Project<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Import_appA_Web_Application\">Import appA Web Application<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Package_EAR\">Package EAR<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Test\">Test<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Create_a_Webcenter_Application_and_Project\"><h2>Create a Webcenter Application and Project<\/h2><\/span>\n<p>* Create a new Webcenter application according to <a href=\"?p=3792\">this post<\/a>. Name the name app <strong>wc.session.sharing.test<\/strong><br \/>\n* Right click <em>Portal<\/em> project and select <em>Project Properties > Deployment > wc.session.sharing.test_webapps (WAR File) > Edit<\/em>, set web context root to <strong>ssPortal<\/strong> for session sharing portal:<\/p>\n<span id=\"\"><h6><\/h6><\/span>\n<span id=\"Import_appA_Web_Application\"><h2>Import appA Web Application<\/h2><\/span>\n<p>* Import <em>appA.war<\/em> into a new project named <strong>appA<\/strong>.<br \/>\n* Set its web context root to <strong>appA<\/strong><br \/>\n* See <a href=\"?p=4389\">this post<\/a> for additional info<br \/>\n* Add the following scriplet to <em>appA > Web Content > admin > auth.jsp<\/em> right before the &lt;\/body&gt; to enumerate and print out session attribute names.<\/p>\n<pre lang=\"java\">\r\n<%\r\njava.util.Enumeration attrs = session.getAttributeNames(); \r\nfor (Enumeration e = session.getAttributeNames(); e.hasMoreElements() ;) {\r\n%>\r\n    Next element: <%= e.nextElement() %> <br\/>\r\n\r\n<%\r\n}\r\n%>\r\n<\/pre>\n<span id=\"Package_EAR\"><h2>Package EAR<\/h2><\/span>\n<p>* Add <em>appA<\/em> to application assembly:<br \/>\n<em>Application Properties > Deployment > wc.session.sharing.test_application1 (EAR File) > Edit&#8230; > Application Assembly <\/em><\/p>\n<span id=\"_1\"><h6><\/h6><\/span>\n<p>* Enable application level session sharing:<br \/>\n&#8211; Open <em>Application Resources > Descriptors > META-INF > weblogic-application.xml<\/em> file<br \/>\n&#8211; Click Session on the left side menu<br \/>\n&#8211; Check Enable session sharing<\/p>\n<span id=\"_2\"><h6><\/h6><\/span>\n<span id=\"Test\"><h2>Test<\/h2><\/span>\n<p>* Deploy the application (not just Portal project)<br \/>\n* Login portal: <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create a Webcenter Application and Project * Create a new Webcenter application according to this post. Name the name app wc.session.sharing.test * Right click Portal project and select Project Properties > Deployment > wc.session.sharing.test_webapps (WAR File) > Edit, set web &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=4404\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1,117],"tags":[],"class_list":["post-4404","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-webcenter"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-192","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4404"}],"version-history":[{"count":2,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4404\/revisions"}],"predecessor-version":[{"id":4409,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/4404\/revisions\/4409"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}