I am working with MAM 7.5 (Nuc), App Server WebSphere 7 Oracle 11g at the backend.
I have a custom link on the "Attach New Webpage" dialog box of Maximo Attachment functionality, when I click on the the link it calls a custom JSP file and it should display the Application and current MBOSET name.
What did I do so far?
I included ../webclient/common/componentheader.jsp file in my custom JSP usinc <include> tag. This file has a WebClientSession variable, I used that variable to get the current app instance and
AppInstance curApp = wcs.getCurrentApp();
MboRemote mbo = curApp.getAppBean().getMbo();
System.out.println("Application name : " + mbo);
MboSetRemote mboSet = mbo.getMboSet("DOCLINKS");
This worked well with MAM 126.96.36.199, My bad luck now I have applied fixpack MAM 188.8.131.52 and the same code gives internal server error. I investigated it but no clue why this error is coming.
I could include other file and it works well I am able to access their variables but I want webclient session variable and is present in this file only.
Please suggest if you have any other idea to achieve this.... :-(
Pinned topic Obtaining webclientsession in custom JSP file
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-23T08:44:31Z at 2013-02-23T08:44:31Z by SystemAdmin
Re: Obtaining webclientsession in custom JSP file2013-02-12T10:02:11ZThis is the accepted answer. This is the accepted answer.I am having the exact same problem, were you able to fix it?
when i include the component header and footer it generates a null pointer
please reply ASAP
maxmix 2700038K0W83 Posts
Re: Obtaining webclientsession in custom JSP file2013-02-15T12:48:29ZThis is the accepted answer. This is the accepted answer.where exactly does your code error out?
worked for me so far, though I am not on 184.108.40.206 yet...
So we could help each other, could you please check if that works?
Though I do not need the current app name...
Re: Obtaining webclientsession in custom JSP file2013-02-18T11:18:49ZThis is the accepted answer. This is the accepted answer.
- maxmix 2700038K0W
WebClientSessionManager wcsm = WebClientSessionManager.getWebClientSessionManager(session);
WebClientSession wcs = wcsm.getWebClientSession(request);
AssetAppBean assetO= (AssetAppBean)wcs.getCurrentApp().getAppBean();
it doesn't work on first time, however when i press f5 it works :s
its confusing me its not getting the session directly
maxmix 2700038K0W83 Posts
Re: Obtaining webclientsession in custom JSP file2013-02-20T10:24:18ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
How do you reach your page, what was in the browser tab before?
Re: Obtaining webclientsession in custom JSP file2013-02-23T08:44:31ZThis is the accepted answer. This is the accepted answer.ComponentInstance tempComponent = (ComponentInstance)session.getAttribute("currentcomponent");
WebClientSession wcs = tempComponent.getWebClientSession();
voila! solution :)