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

  • Home
  • SEARCH
  • 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 6753099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:07:15+00:00 2026-05-26T13:07:15+00:00

String value = (String) request.getParameter(value); sometimes return null. How can I fix this? I

  • 0
String value = (String) request.getParameter("value"); 

sometimes return null.

How can I fix this?

I am passing the value like this from page to page.

<a href=page2.jsp?value =<%=value %>"> Page2</a>
  • 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-26T13:07:15+00:00Added an answer on May 26, 2026 at 1:07 pm

    You shouldn’t have any white space before the = sign in your URL, and you should have a quote before the URL:

    <a href="page2.jsp?value=<%=value %>">Page2</a>
            ^               ^
    

    You should also encode the parameter value, and avoid scriptlets. Use The JSTL:

    <c:url var="page2Url" value="page2.jsp">
        <c:param name="value" value="${someBean.value}"/>
    </c:url>
    <a href="${fn:escapeXml(page2Url)}">Page2</a>
    

    Read How to avoid Java code in JSP files?

    Other than that, any user may remove the parameter from the URL in its address bar, so maybe that’s the reason for a null parameter.

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

Sidebar

Related Questions

I am getting the value from error.jsp to staff.jsp page. Welcome to <%= (String)request.getParameter(facilityname)%>
In .NET if I do something like: string temp = Request.QueryString[myKey]; is the value
I have a string value coming from a label in the .aspx page as
I am receiving long string of checked html checkbox values (Request.Form[mylist] return Value1,Value2,Value3....) on
I have a string value from a user input box. I have to figure
In .Net you can read a string value into another data type using either
I have to call function based on the request.getParameter(name) value. If I use the
I can get the value of a textfield from html to java using the
I have a servlet that looks like this: public void doPost(HttpServletRequest request, HttpServletResponse response)
Can someone please tell me why this isn't working? I would like to be

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.