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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:28:41+00:00 2026-05-23T03:28:41+00:00

I have a JSP page which loads another jsp page’s content which is working

  • 0

I have a JSP page which loads another jsp page’s content which is working perfectly fine. The problem is I want to pass request.getParameter("cfgname") to this content page, so that when it is loaded into the main JSP the content is complete. (Current code shows me null in place of request.getParameter

Here is my main JSP page which gets cfgid=41&cfgname=Abhishek&cfgdesc=test1&cfgtype=Development&filepath=files%2Fcsmclientbuckeye.xml

<title>Testing</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){

   $.get("content.jsp", addContent);

   function addContent(data)
   {
      $("#content").html(data);
   }

 });
</script>
</head>
<body>
<div id="content"></div>
</body>

Content.jsp page

<table class="csm-table" width="100%" cellspacing="0" cellpadding="4" border="0">
        <tbody>
            <tr>
                <th width="25%">Configuration Name</th>
                <td width="25%"><span id="cname"><%= request.getParameter("cfgname") %></span></td>
                <th width="25%">Host Name</th>
                <td width="25%"><span id="chostname">{hostname}</span></td>                
            </tr>
            <tr> </tr>
            <tr>
                <th>Configuration Description</th>
                <td><span id="cdesc"><%= request.getParameter("cfgdesc") %></span></td>
                <th width="25%">Os Name</th>
                <td width="25%"><span id="cosname">{osname}</span></td>
            </tr>
            <tr>
                <th>Configuration Type</th>
                <td><span id="ctype"><%= request.getParameter("cfgtype") %></span></td>
                <th>Product Name</th>
                <td><span id="cproductname"></span></td>
            </tr>
            <tr>
                <th>Last Updated Time</th>
                <td><span id="clastupdatetime"></span></td>
                <th>Configuration File Name</th>
                <td><span id="cfilename"><%= request.getParameter("filepath") %></span></td>
            </tr>
        </tbody>
    </table>

Both of your (Kees and Mick)’s answer helped me
I did $.get("content.jsp?cfgname=<%= request.getParameter("cfgname") %>", addContent); which solved my problem. Thanks guys

  • 1 1 Answer
  • 1 View
  • 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-23T03:28:42+00:00Added an answer on May 23, 2026 at 3:28 am

    Looks from your code sample like you’re calling content.jsp with no parameters:

    $.get("content.jsp", addContent);
    

    You’d need to call it like this:

    $.get("content.jsp?cfgid=41&cfgname=Abhishek&cfgdesc=test1&cfgtype=Development&filepath=files%2Fcsmclientbuckeye.xml", addContent);
    

    Essentially, the AJAX call will not have immediate access to the URL parameters of the page you load first, so if you need to pass them to another HTTP request, which the AJAX call is, then you need to follow the advice of the other poster, to build your query string.

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

Sidebar

Related Questions

I have a jsp page, which imports another jsp. This import is wrapped into
I have made a JSP page which send request to @controller into method UserList()
I have a JSP page in a JSF application which uses A4J. I want
I have a JSP Page which I am using to redirect to another url
I have a jsp page which should load a popup using ajax. The content
I have a JSP page which accepts SQL queries, performs them then returns the
I have a jsp page which needs a java code. This java code inside
I have a JSP page, which accepts user strings in more than 23 languages.
There is a JSP page in which i have an ArrayList variable. I need
Hi I have a page in my java/jsp based web application which shows list

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.