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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:06:42+00:00 2026-05-18T07:06:42+00:00

I have one query string in my JSP: href=’www.me-me.com/index.jsp?application=<%= myBean.getApplication().replace(&,\\) %>&appId=<%= myBean.getAppId() %>’>LINK Now

  • 0

I have one query string in my JSP:

href='www.me-me.com/index.jsp?application=<%=
  myBean.getApplication().replace("&","\\")
%>&appId=<%=
  myBean.getAppId()
%>'>LINK  

Now I am picking up the appID using request object in the index.jsp and using that appId I am pulling up the data from my DB to fill the page.

But I am getting a blank screen when myBean.getApplication is returning something like Application ##1, certainly because query is getting banged after encountering the "#".

I could replace "#" using the replace() method, but I do not find it reliable and good, as I am pulling that application name using the request object again in my index.jsp page, and the replacement of hashes would make it ugly. So is there a way where I can retain the "#"?

Any other out-of-the-box solution would be appreciated.

  • 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-18T07:06:43+00:00Added an answer on May 18, 2026 at 7:06 am

    URL-encoding the values would be the right thing to do.

    href='www.me-me.com/index.jsp?application=<%=
      URLEncoder.encode(myBean.getApplication(), "UTF-8")
    %>&appId=<%=
      URLEncoder.encode(myBean.getAppId(), "UTF-8") 
    %>'>LINK 
    

    You can transport any string value as an URL parameter, but you must properly encode it or your URLs will break, just like you are experiencing it.

    You’d need a

    <%@ page import="java.net.*" %>
    

    statement in your page, because that’s where URLEncoder is defined.

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

Sidebar

Related Questions

I have one demo application to check select for update query public class Test
Hey, I have a hyperlink column. I need to add just one query string
I have one query that returns string value, my query is select case when
I need two conditional rules. Background: http://www.domain.com/.htaccess http://www.domain.com/index.php http://www.domain.com/admin/index.php I have both re-write rules:
I have a query string parameter that is passed from one page to another.
I have one query. Through while loop I am displaying three random songs from
I have one query on which I would like to get your valuable feedback.
I have one mysql query, which gets rows to designs list. In this list
I have one main array which is the returned data from a MySQL query
I have the following two queries which I want to get in one query.

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.