0

I'm passing one parameter param from jsp to servlet having a value like %xyz.

When I'm trying to get the value in servlet by request.getParameter("param") I'm not getting any value.

Instead it is coming as blank (Not even Null).

Can, anyone please explain the reason.

2

1 Answer 1

7

The % is a special character in uri. You have to encode the % value using uri encoding. In your case the % should be encoded as %25

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.