I have a simple servlet that upload a PDF to adobe esign and I manage to get a URL back.
I now want to redirect the client to this URL. The actual URL is valid if I copy-paste it into a browser, but the AEM override the below URL from
https://secure.na1.echosign.com/.....
to
https://my.aem.server.url/.... ==> Error "Resource at '/public/apiesign' not found
How do i prevent this change in URL?
@component(service=Servlet.class,
property={
"sling.servlet.methods=" + HttpConstants.METHOD_GET,
"sling.servlet.paths="+ "/bin/test
})
@ServiceDescription("test")
public class test extends SlingAllMethodsServlet {
private static final Logger log = LoggerFactory.getLogger(test.class);
private static final long serialVersionUID = 1L;
@Override
protected void doGet(final SlingHttpServletRequest req,
final SlingHttpServletResponse resp) throws ServletException, IOException {
try {
.
.
.
.
.
String url = "https://secure.na1.echosign.com/public/apiesign?pid=CBFCI...U3in9aXcBSzz4pjulXWk14_14%2A&client_id=C...
log.info("Redirect url : " + url);
resp.setStatus(301);
resp.setHeader("Location", url);
} catch (Exception e) {
log.error("",e);
}
}
}