File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes NTSystem class Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "NTSystem class Error" Watch "NTSystem class Error" New topic
Author

NTSystem class Error

Nandan Jain
Ranch Hand

Joined: Feb 14, 2006
Posts: 44
Hi,

I want to run a JSP on client machine which will find out who user is logged into. Its like the windows user ID. For that purpose I have used following code which using NTSystem class.
----------------------------------------
<%@ page import="com.sun.security.auth.module.NTSystem" %>

<%
String userID = "";
try {
NTSystem ntSystem = new NTSystem() ;
userID = ntSystem.getName();
} catch (Exception ex) {
System.out.println(ex);
}
out.println("USERID=" + userID);
}
%>
----------------------------------------

and I am receiving error :
----------------------------------------
[12/Oct/2006:14:06:57] failure (17750): for host 151.110.167.122 trying to GET /Test.jsp, service-j2ee reports: StandardWrapperValve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException: no jaas_nt in java.library.path
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:536)
at _jsps._Test_jsp._jspService(_Test_jsp.java:80)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:675)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:447)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
----- Root Cause -----
java.lang.UnsatisfiedLinkError: no jaas_nt in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at com.sun.security.auth.module.NTSystem.loadNative(NTSystem.java:130)
at com.sun.security.auth.module.NTSystem.<init>(NTSystem.java:46)
at com.sun.security.auth.module.NTSystem.<init>(NTSystem.java:37)
at _jsps._Test_jsp._jspService(_Test_jsp.java:65)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:675)
at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:447)
at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)

----------------------------------------

Pls help anyone.

Thanks,
Nandan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NTSystem class Error