Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Unable to pass parameters using session in jsp

Posted on 2011-02-16
4
Medium Priority
?
492 Views
Last Modified: 2012-05-11
I have two .jsp's.

In first jsp, i have String []
and used <A></A> to open second jsp in which .swf is embedded.

so , i am able to pass this cmd(String arrays) from firstjsp to second jsp, from there i can see my .swf opening in second jsp by passing this cmd using flashvars.

Now, when i colse secondjsp window, trying to agian click on <A>Commands Help</A> from firstjsp,i see showing blank window for secondjsp.


I have two .jsp's.

In first jsp, i have String []
<%
	String []cmd = (String [])request.getAttribute("cmd_list");
	
%>
and used <A>Commands Help</A> to open second jsp in which .swf is embedded.

so , i am able to pass this cmd(String arrays) from firstjsp to second jsp, from there i can see my .swf opening in second jsp by passing this cmd using 

flashvars.

Now, when i colse secondjsp window, trying to agian click on <A>Commands Help</A> from firstjsp,
i see showing blank window for secondjsp.

code in first .jsp:
--------------

<%
	String []cmd = (String [])request.getAttribute("cmd_list");
	session.setAttribute("cmdlist",cmd);
	String urlEnc = response.encodeURL("/second.jsp");
%>

	<A HREF="javascript:var w = window.open('','IpfrHelp','resizable=yes,scrollbars=yes,height=700,width=718'); w.location.href='<%=urlEnc%>'; void 

1;">Commands Help</A></TR>

code in second .jsp:
--------------

<%
    
     String[] cmdlist={};
     StringBuffer strData = new StringBuffer();
     String separator = ",";

      cmdlist = (String [])session.getAttribute("cmdlist");
      if(cmdlist.length>0)
		{
			strData.append(cmdlist[0]);
			for(int i=1;i<cmdlist.length;i++)
			{
				strData.append(separator);
				strData.append(cmdlist[i]);
			}
		}
%>
<script type="text/javascript">
            var swfVersionStr = "0";
            var xiSwfUrlStr = "";
            var flashvars = {};
            flashvars.strData = "<%= strData %>";
	    swfobject.embedSWF(
                "/flexapp/E2EView/CmdHelpViewRedesign.swf ", "flashContent",
                "700", "700",
                swfVersionStr, xiSwfUrlStr,
                flashvars, params, attributes);
</script>

the first .jsp control comes from some .jsp <-- .cgi, when i close these first and second .jsp's and start opening from .cgi page , it is working well. Not 

showing any blank screen.

Open in new window

0
Comment
Question by:Alpita
  • 2
  • 2
4 Comments
 
LVL 28

Expert Comment

by:rrz
ID: 34910526
I am just a JSP expert. I don't know about the flash code. Maybe I will be able to help you.
Please look at the page source in the browser. Show us both sources. One for the page that works and the other for the page that is blank.
0
 

Author Comment

by:Alpita
ID: 34912652
Thanks for your information. I solved my problem. I see some code related to session in second jsp page.
session.invalidate();
Once i comment that code, it is working fine.
0
 
LVL 28

Accepted Solution

by:
rrz earned 2000 total points
ID: 34912690
Ok, you can accept your comment as the solution.
0
 

Author Closing Comment

by:Alpita
ID: 34931512
Thanks.It is working now.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I came across an interesting issue that had me pulling my hair out.  I was troubleshooting a new internal web site which uses integrated security instead of anonymous.  When browsing the site from my laptop, I was able to access it with no iss…
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question