I have a byte array that is a Message digest. And i want send it to another appliction in same server via url.I don't want to convert it to string and pull back the array on the other end.
Can any one help me do this using servlet?
my code like bellow
Sendrequauset.java
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
byte[] encryptedUserName;
String username = request.getParameter("username");
RsaEncryption encrypt = new RsaEncryption();
encryptedUserName = encrypt.encryptClientMassage(username.getBytes(),pk,md);
String url = "domain/server/GetRequset?username="+encryptedUserName+"";
response.sendRedirect(url);
}
}
GetRequset.java
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//i want to get username to byte array from here.I try with request.getParameter("username") but i returns string
}