March 16, 200718 yr Newbies Hi I'm developing an XSLT custom webpublishing solution that needs to use a single sign on product called Ubilogin. I have successfully added ubilogin to the tomcat server, but I need to get hold of the login name that can be retrieved from the HttpServletRequest, that is used/stored by the tomcat server, using the method getRemoteUser(). I have looked how one can add java code to an XSLT document using xalan-j, but I have yet to figure out how everything fits together in this complex puzzle. Has anyone added some java code to the tomcat server in order to be called from xalan-j in an XSLT document?
March 16, 200718 yr Have you looked up there? http://xml.apache.org/xalan-j/extensions.html#java-namespace
March 16, 200718 yr Author Newbies Yes I have. I managed to create a Java class which i put on the tomcat server (I'm home at the moment so I don't remember the exact path). It was something like public class GetUserName extends HttpServlet { ... private Request request; public doPost(HttpServletRequest req, HttpServletResponse res) { request = req; } public static getUserName(){ return request.getRemoteUserName(); } } ... The code threw a nullpointer exception which I have no idea why.
Create an account or sign in to comment