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 8897747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:25:39+00:00 2026-06-15T00:25:39+00:00

i m trying to set value in request scope and getting it another jsp

  • 0

i m trying to set value in request scope and getting it another jsp as i click on button pop window open and getting null value , cause my requirement is getting the value of button on other jsp to validate the two section of code if user on button 1 then find by id text area open and if click on button 2 then find by name text area open then that pop window should be closed

    <HTML>
    <HEAD>
        <TITLE>Using Buttons</TITLE>
        <script type="text/javascript">


               function button1()
               {
                var mywindow= window.open("file.jsp", "file","status=1,width=350,height=150");
         }    

        </SCRIPT>
    </HEAD>

    <BODY>
        <H1>Using Buttons</H1>

         <INPUT TYPE="BUTTON" name="butto" VALUE="Button 1" ONCLICK="button1()"/>
               <% request.setAttribute("button1" ,"butto");%>

       <% request.setAttribute("button1" ,"butto");%>



    </BODY>
</HTML>

and this is my file .jsp

<!

DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml"%>
<%@page
    import="com.nousinfo.tutorial.employee.service.model.bo.EmployeeBO"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

</head>
<%= (String)request.getAttribute("button1") %>
<body>



</body>
</html>

what is the error in this why i getting null value

  • 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-06-15T00:25:40+00:00Added an answer on June 15, 2026 at 12:25 am

    By simple calling window.open() it doesn’t transfer your request scope object to other jsp.You cannot send data from request scope to another JSP without using forward();

    Example USAGE

    RequestDispatcher rd = servletContext.getRequestDispatcher("/pathToResource");
    rd.forward(request, response);
    

    But, in your example it doesn’t work by simply calling window.open()

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

Sidebar

Related Questions

I am trying to set the value in session scope but it is not
I'm trying to set a value from the database into a Html component, the
I have been trying to set the value of a hidden input by using
I'm trying to set a default value for a search field. The idea is
I am trying to set the selected value of a combobox from a style
I'm trying to set the input value to 1 when checking the checkbox and
I'm trying to set a time value into a data frame: ps = data.frame(t(rep(NA,
I'm trying to set an initial value in my jquery ui datepicker. I've tried
I'm trying to set the initial value of a input field. In the template,
I have a dataset that i am trying to set the default value as

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.