This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes encryption of url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "encryption of url" Watch "encryption of url" New topic

encryption of url

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 421
Hello, how would you do this:

Could you help me figure out how to use querycrypt with java servlets and xsl / xml 1.0:

amp;parentid= <xsl:value-of select=""/> to pass the URL to a different war file's reports.

For example, I am working from a prototype which utilizes .jsp only. Here is the example for the .jsp:

Suppose you had a query string such as the following:
By definition, a query string consists of name=value pairs seperated by "ampersand". The system will not accept input data of a miss-matched name=value pair.
To encrypt the string in JSP:

<%@ page import="com.guhesan.querycrypt.QueryCrypt" %>
String plainString = "BankID=1234&AccountID=J5678&TrasactionID=25";
String encryptedS = QueryCrypt.getInstance().encrypt(request, plainString);
<A HREF="<%=request.getContextPath()%>/URL_U_WANT_TO_GO.jsp?<%=encryptedS%>">Click here for the secure transaction</A>

Decrypting the query string: Suppose you had a encrypted string such as the following:
To decrypt in JSP:

<%@ page import="com.guhesan.querycrypt.QueryCrypt" %>
<%@ page import="com.guhesan.querycrypt.beans.RequestParameterObject" %>
RequestParameterObject rpo = QueryCrypt.getInstance().decrypt(request);

Have you checked out Aspose?
subject: encryption of url
It's not a secret anymore!