Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6333227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:25:14+00:00 2026-05-24T18:25:14+00:00

I have problem in retrieving the request attributes in IFRAME. the following are the

  • 0

I have problem in retrieving the request attributes in IFRAME.
the following are the snippets, in jsp1.jsp, i have 2 IFRAMES whose src are jsp2.jsp and jsp3.jsp .i would like to retrieve the request attributes in both the pages.Basically the attribute is an object of a class and some values were set for class variables in the jsp1.jsp page.I would like to share that object between these 3 pages. Inside the IFRAME i am getting null value for the attribute..I have tried both session.setAttribute and request.setAttribute

jsp1.jsp

<td>
<%
Search beans=(Search)request.getAttribute("s");
session.setAttribute("s");
%>
<iframe name="frame1" id="frame1" tabIndex="-1" width="100%" height="100%"   
frameborder="0" src="jsp2.jsp"></iframe>
<iframe name="frame2" id="frame2" tabIndex="-1" width="100%" height="100%" 
frameborder="0" src="jsp3.jsp"></iframe>
</td>

jsp2.jsp

Search beans = (Search)session.getAttribute("s");
if (beans != null) {
//process the bean
}

Could someone please let me know how to retrieve the set Attribute. And also i can’t pass it as an parameter to the jsp2.jsp since it is an object

Thanks
Priyam

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:25:17+00:00Added an answer on May 24, 2026 at 6:25 pm

    The HTML <iframe> basically instructs the webbrowser to send a brand new HTTP request on the given src URL and embed its response. It does not run within the request of the parent JSP page in the webserver. So passing objects as a request attribtue ain’t going to work. The session will only work if it has already been established before you request the parent JSP page.

    I do not understand why you’re using an <iframe> this way. It’s a very poor approach when the sole purpose is to include page fragments which reside at the same server as the parent page. The <iframe> is only useful whenever you want to embed external content in your webpage.

    Replace them by server side includes like <jsp:include> and it’ll work the way you initially want.

    <jsp:include page="jsp2.jsp" />
    <jsp:include page="jsp3.jsp" />
    

    They’ll be included within the very same HTTP request and thus have access to its attributes. The benefits are big. Your problem is instantly solved, the SEO will be greatly improved (the <iframe> content is namely not indexed as part of the parent page) and the User Experience also (more predictable and robust website behaviour whenever there are links and forms inside the <iframe>).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a problem with the Euro character when saving and retrieving it from
I have a problem retrieving all the data inside the rows added by the
I have small problem with retrieving the state of a canvas' visibility property. When
I have a problem retrieving default values from the settings bundle when first launching
I have a problem retrieving items from a fairly large list. I can quickly
i have the problem of retrieving the querystring and verifying the email in mvc3
I have a problem retrieving the exact css property value (in '%') on firefox.
I have problem today about retrieving data from SQLite. Here is my coding public
I have a problem in retrieving the $_POST data from jquery serializeArray(); . I
I have a problem with retrieving data from a database using PHP statements. At

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.