I have 2 jsp pages where value entered in a textbox in share.jsp is encoded,decoding is done in forwarded.jsp page. if the text entered in the txt box is "xyz +" then decoding is incorrect decoding result is only "xyz" i.e "+" does not get deocded.
Page encoding in both the pages is same:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
snippet:-
share.jsp
document.getElementById('hiddenFolderList').value = (encodeURI(document.getElementById('folderId').value,"UTF-8"));
forwarded.jsp
String folders=java.net.URLDecoder.decode(request.getParameter("hiddenFolderList"),"UTF-8");
I also checked in URL Encode and Decode Tool there also "+" does not get decoded how to escape/prevent this?