Hi all I posted this one a few days back but got no response - so I thought I would have another go - I'll try an improved explanation of the problem.
I need to generate a dynamic forward to an action/script (I have no control over implementation) on a remote server. A typical URL for the forward looks like: "http://www.somesite.com/actionpath?customer=Joe Bloggs&address=Address line 1 Address line 2 Address line 3" The problem is that the receiving site requires that new line characters in of the address string are encoded as " " (the HTML entity for ASCII 10, the new line character). If I were to use an on page form, I could generate the required behaviour by coding like: <form action="http://www.somesite.com/actionpath" method="POST"> <input type="hidden" name="customer" value="Joe Bloggs"> <input type="hidden" name="address" value="Address line 1 Address line 2 Address line 3"> -- rest of form-- But I don't want to use a form!! I want to use a dynamic forward Something like: StringBuffer sb = new StringBuffer(); sb.append("http://www.somesite/actionpath?"); sb.append("&customer=" + customer.getName()); sb.append("&address=" + customer.getAddress()); etc.. ActionForward forward = mapping.findForward("success"); forward.setPath(sb.toString); forward.setRedirect(true); mapping.addForward(forward); return forward; If I try to encode the new line in the above, the forward fails at the first new line character. Any ideas please? David -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>