Newbies jani@callmaker Posted March 16, 2007 Newbies Posted March 16, 2007 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?
Martin Brändle Posted March 16, 2007 Posted March 16, 2007 Have you looked up there? http://xml.apache.org/xalan-j/extensions.html#java-namespace
Newbies jani@callmaker Posted March 16, 2007 Author Newbies Posted March 16, 2007 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.
Recommended Posts
This topic is 6460 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now