You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by krishnamohan <kr...@indosoft.stph.net> on 2003/10/20 08:36:58 UTC
Problem, very Urgent!
Hi all,
The following is my jsp page where I want to pass values to another jsp
using <html:frame> tag.
This is my code snipplet,
<jsp:useBean id="test1" class="com.xx.XX.QuestionInfo" />
ArrayList al=(ArrayList)request.getAttribute("QuestionsDB");
request.getSession().getServletContext().setAttribute("QuestionsDB",al);
//HashMap hash=new HashMap();
//hash.put("QuestionsDB",al);
test1.setValue(al);
%>
<bean:define id="sample" name="test1" property="value" toScope="request"/>
<%
java.util.HashMap params = new java.util.HashMap();
params.put("QuestionsDB", sample);
pageContext.setAttribute("sample1", params);
%>
<frameset rows="44%,43%,13%" name="mainframe">
<html:frame page="/displayQuestion.jsp" frameName="first"
scrolling="auto" frameborder="0" paramId="sample1" paramName="sample1"
name="sample1" />
</frameset>
<br>
in displayQuestion.jsp page i am trying to retrive value "sample1" by using
request.getAttribute("sample1");
This is not giving any values for me
please help me ,and please correct code, if any thing is wrong
Its very very Urgent.
regards
Mohan.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem, very Urgent!
Posted by Andrew Hill <an...@gridnode.com>.
Hmm... No. Doesnt look that urgent to me mate.
http://www.catb.org/~esr/faqs/smart-questions.html#urgent
<snip>
<html:frame page="/displayQuestion.jsp" frameName="first"
scrolling="auto" frameborder="0" paramId="sample1" paramName="sample1"
name="sample1" />
</snip>
<snip>
request.getAttribute("sample1");
</snip>
If your passing it as a parameter you should use
request.getParameter("sample1") to get its value. (Attributes and parameters
arent the same thing).
-----Original Message-----
From: krishnamohan [mailto:krishnamohan@indosoft.stph.net]
Sent: Monday, 20 October 2003 14:37
To: 'struts-user@jakarta.apache.org'
Cc: Mohan Reddy
Subject: <html:frame> Problem, very Urgent!
Importance: High
Hi all,
The following is my jsp page where I want to pass values to another jsp
using <html:frame> tag.
This is my code snipplet,
<jsp:useBean id="test1" class="com.xx.XX.QuestionInfo" />
ArrayList al=(ArrayList)request.getAttribute("QuestionsDB");
request.getSession().getServletContext().setAttribute("QuestionsDB",al);
//HashMap hash=new HashMap();
//hash.put("QuestionsDB",al);
test1.setValue(al);
%>
<bean:define id="sample" name="test1" property="value" toScope="request"/>
<%
java.util.HashMap params = new java.util.HashMap();
params.put("QuestionsDB", sample);
pageContext.setAttribute("sample1", params);
%>
<frameset rows="44%,43%,13%" name="mainframe">
<html:frame page="/displayQuestion.jsp" frameName="first"
scrolling="auto" frameborder="0" paramId="sample1" paramName="sample1"
name="sample1" />
</frameset>
<br>
in displayQuestion.jsp page i am trying to retrive value "sample1" by using
request.getAttribute("sample1");
This is not giving any values for me
please help me ,and please correct code, if any thing is wrong
Its very very Urgent.
regards
Mohan.
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org