Solved

Unable to pass parameters using session in jsp

Posted on 2011-02-16
4
479 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 27

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 27

Accepted Solution

by:
rrz earned 500 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now