Hi;
Everytime I try to execute the printing function below from my servlet I
get the following error message:
" java.io.FileNotFoundException: \\softdev\nimhsdhp5port (Access is
denied)"
public void printAsText( String sSummaryStatement )
{
String sFormattedSummaryStatement;
sFormattedSummaryStatement = format(sSummaryStatement);
try
{
FileOutputStream fos = new
FileOutputStream("\\\\softdev\\nimhsdhp5port");
PrintStream ps = new PrintStream(fos);
ps.print("\r");
ps.print(sFormattedSummaryStatement);
ps.print("\f");
ps.close();
}
catch ( Exception e )
{
System.err.println("Summary Statement Did Not Print: " + e);
}
}// end function printAsText()
Somebody suggested I might need to alter the security files in my jre,
but that sounds odd. Are servlets allowed to send print jobs without
any special provisions? I am running my servlet on an NT 4.0 server
with a Servlet Exec 2.0.2. Are network told me that all the relevant
permissions are given for all machines/directories involved. I double
checked the security options involved. I have even run the servlet
remotely while it was running on servlet exec.
Any ideas? Thanks in advance
Steve
--
Steve
[EMAIL PROTECTED]
The Java Resource Dump:
http://www.geocities.com/RainForest/Canopy/4774/Java/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html