Server side redirect
We had a great get together yesterday at the Geek Meet and many technical discussions where taking place not to mention all new connections that where made. Extremely fun and very well organized by Johan Molin at E-Kakan.One small subject that came up where how to do a server side redirect from an agent. There are two ways to do this, I call them internal or external. If you want to redirect the web browser to another host, then you will go with the external solution that sends an 302 to the user.The internal way is completely transpararent to the user. Here are a code examples in java:
1 2 3 4 5 6 7 8 9 10 11 12 13 | import lotus.domino.*; import java.io.*; public class JavaAgent extends AgentBase { public void NotesMain() { try { PrintWriter pw = getAgentOutput(); pw.println("[[/demo.nsf/endPoint?openpage]]"); } catch(Exception e) { e.printStackTrace(); } } } |
