Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unable to pass parameters using session in jsp

Posted on 2011-02-16
4
Medium Priority
?
491 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

670 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