Solved

Unable to pass parameters using session in jsp

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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