Printing from trusted applet

Hey boys and girls.
I need a litle help. Does someone has expirience with printing on local raw printer from browser? I think that is possible, but since I am new with Java and some time to learn it good, I will relly on your help. It would be a super if your have a piece of code. Again, we are talking about raw dot-matrix printers and they will be used for printing data for documents like passport, personal ID's driver licence. You know, the old style... Thanks

Hi Milind
I never had security exception for printing from an Applet even if applet jar is not a signed jar and security policy file is not altered.

Similar Messages

  • Printing From The Applet

    Can any body help me how to print from the applet. Without the security exception

    Hi Milind
    I never had security exception for printing from an Applet even if applet jar is not a signed jar and security policy file is not altered.

  • Printing from an applet on a Mac

    Printing from an unsigned applet is allowed by the java plug-in. When a print request is made it pops up a confirmation dialog after which the print job goes through on Windows. On a Mac, however, a security exception is thrown after the confirmation dialog:
    java.security.AccessControlException: access denied (java.net.SocketPermission localhost:631 connect,resolve)
    The entire stack trace is copied at the end.
    It appears that the applet is trying to open a connection to port 631 on localhost (Port 631 is the standard port for the IPP protocol). Usually an applet is only allowed to open a connection to the host that it came from (not localhost in this case). Therefore, the exception seems reasonable. However, when the print request is sent a second time the print job goes through! I don�t know why!
    Has anyone encountered this problem on a Mac (OS 10.4.7; Java version 1.5.0_06) ? Is there a solution? It works just fine on Windows!
    Thank you!
    java.security.AccessControlException: access denied (java.net.SocketPermission localhost:631 connect,resolve)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkConnect(SecurityManager.java:1034)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:459)
         at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
         at sun.net.www.http.HttpClient.New(HttpClient.java:287)
         at sun.net.www.http.HttpClient.New(HttpClient.java:299)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)
         at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669)
         at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)
         at sun.print.IPPPrintService.opGetAttributes(IPPPrintService.java:1419)
         at sun.print.IPPPrintService.initAttributes(IPPPrintService.java:323)
         at sun.print.IPPPrintService.getSupportedDocFlavors(IPPPrintService.java:697)
         at sun.print.IPPPrintService.isDocFlavorSupported(IPPPrintService.java:773)
         at sun.print.RasterPrinterJob.getPrintService(RasterPrinterJob.java:431)
         at sun.print.RasterPrinterJob.setAttributes(RasterPrinterJob.java:1002)
         at apple.awt.CPrinterJob.setAttributes(CPrinterJob.java:130)
         at apple.awt.CPrinterJob.print(CPrinterJob.java:173)
         at sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1200)
         at PrintTest.printApplet(PrintTest.java:47)
         at PrintTest$1.actionPerformed(PrintTest.java:25)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.Component.processMouseEvent(Component.java:5554)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5319)
         at java.awt.Container.processEvent(Container.java:2010)
         at java.awt.Component.dispatchEventImpl(Component.java:4021)
         at java.awt.Container.dispatchEventImpl(Container.java:2068)
         at java.awt.Component.dispatchEvent(Component.java:3869)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
         at java.awt.Container.dispatchEventImpl(Container.java:2054)
         at java.awt.Component.dispatchEvent(Component.java:3869)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Yes!!  This is VERY HARD to find.  I literally spent ONE YEAR looking for solutions to my printing problems until I found this little drop-down box in the middle of the second or third dialog box that the Mac OS offers you when you're printing.  If you're still not finding it, ask us again.  I'm not in front of my Mac right now, and I'll be glad to give you detailed instructions.  I tried several hundred different things before I could get my photos to print well, and the secret was always right there, hidden in that tiny drop-down menu in the center of that dialog box.  VERY frustrating.

  • Provider !DOCTYPE ... error while printing from an applet

    Hi,
    I'm developing a (signed) applet that requires access to the local printer. The applet will parse an XML document using [Flying Saucer|http://xhtmlrenderer.dev.java.net/] . I'm developing it in Eclipse.
    When I run the applet from Eclipse, everything works fine, and a print is produced by the printer. I then export the applet as a jar file, sign it, and put it on a local server. When I run the applet in any browser (whether its IE or Firefox) the thing crashes with this error:
    Exception in thread "AWT-EventQueue-2" javax.xml.parsers.FactoryConfigurationError: Provider <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> not foundThis exception seems mangled to me - shouldn't it produce a classname as opposed to the DOCTYPE declaration String?
    I've signed all the jars required (Flying Saucer's core-renderer.jar & jtidy.jar), accepted them in the browser. All dependencies should therefore be resolved.
    To be sure: I am NOT referencing the DOCTYPE anywhere in the Java code, nor in the HTML source document, nor in the HTML document hosting the applet. In short, I cannot find any trace of the DOCTYPE given in my source code. Where does it come from?
    Here's a stack trace. Hopefully someone has a great tip! :)
    Reading certificates from 2718 http://w2668.gerben.mylocalserver/overig/awtprinting/AwtPrinting.jar | C:\Users\jeroen\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\63\7843b8ff-292dbe4c.idx
    Reading certificates from 10062 http://w2668.gerben.mylocalserver/overig/awtprinting/jtidy.jar | C:\Users\jeroen\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\20\1e6e98d4-7d7b6963.idx
    line 1 column 110 - Warning: inserting missing 'title' element
    Reading certificates from 76688 http://w2668.gerben.mylocalserver/overig/awtprinting/core-renderer.jar | C:\Users\jeroen\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\33\62996421-47904dc4.idx
    Reading certificates from 53283 http://w2668.gerben.mylocalserver/overig/awtprinting/iText.jar | C:\Users\jeroen\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\4\1a988704-442d6437.idx
    Exception in thread "AWT-EventQueue-2" javax.xml.parsers.FactoryConfigurationError: Provider <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> not found
                    at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
                    at org.xhtmlrenderer.resource.XMLResource.newXMLReader(XMLResource.java:145)
                    at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:170)
                    at org.xhtmlrenderer.resource.XMLResource.load(XMLResource.java:75)
                    at org.xhtmlrenderer.pdf.ITextRenderer.setDocumentFromString(ITextRenderer.java:157)
                    at com.mycompanyname.printing.Printable.print(Printable.java:193)
                    at com.mycompanyname.printing.ClientPrinterApplet.print(ClientPrinterApplet.java:350)
                    at com.mycompanyname.printing.ClientPrinterApplet.paint(ClientPrinterApplet.java:145)
                    at sun.awt.RepaintArea.paintComponent(Unknown Source)
                    at sun.awt.RepaintArea.paint(Unknown Source)
                    at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
                    at java.awt.Component.dispatchEventImpl(Unknown Source)
                    at java.awt.Container.dispatchEventImpl(Unknown Source)
                    at java.awt.Component.dispatchEvent(Unknown Source)
                    at java.awt.EventQueue.dispatchEvent(Unknown Source)
                    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
                    at java.awt.EventDispatchThread.run(Unknown Source)

    The problem was with the entity resolver, which points to the w3c.org web site. The access to the reference DTDs on this site has been restricted for application use. The solution was to implement my own entity resolver.

  • How to print from an applet to console

    Hi,
    I'm passing my applet a parameter then I'm trying to print it using System.out.println but I don't see any output. My web app is deployed in weblogic 7. From the html page I pass in applet param but I don't see any out put in weblogic console.How can I see the output. here is what I have in my html page.
    <APPLET codebase="classes" code="taqDingHILoNew.class" width=550 height=420
         archive="../../../lib/EspressAPI.jar">
    <PARAM name="cabbase" value="../../../lib/EspressAPI.cab">
    <PARAM NAME=FontName VALUE="Arial" >
    </APPLET>
    And here is code for my applet. Any help would be greatly appreciated.
    public class taqDingHILoNew extends Applet implements ActionListener{
    TextField tf;
    public static void main(String argv[]){
    taqDingHILoNew chartFrame = new taqDingHILoNew();
    Frame frame = new Frame();
    frame.setLayout(new BorderLayout());
    frame.add("Center", chartFrame.createComponent2(null));
    frame.pack();
    frame.show();
    public void init() {
    setLayout(new BorderLayout());
    String param = this.getParameter("FontName");
    System.out.println("GOT APPLET PARAM " + param);
    add("Center", createComponent2(this));
    Component createComponent2(Applet applet) {
    QbChart.setChartServerUsed(false);
    setLayout(new BorderLayout());
    // primary axis value column 3
    // secondary axis value column 2
    // ColInfo(series, category, sumby, primary_value, secondary_value)
    QbChart chart;
    String param = this.getParameter("FontName");
    System.out.println("GOT APPLET PARAM " + param);

    If you're using the java plug-in, you can right click on the java icon in that system tray to the bottom right of the screen if you've got a normal set-up. Also I think you can invoke it via the start menu.
    If you're not using the plug-in, MSIE and Netscape both have "show java console" options. However on MSIE I think you have to turn on an Advanced Option first that lets you see the "show java console" option. It's a pain.
    Of course, if it's an applet, normally you're not the one viewing the console at all. It's the user who sees it. You only get to see the client java console if you happen to be the user.

  • Printing from a applet toolbar the image displayed in the applet

    Hi ,
    I have a JApplet which displays a tiff image. The applet uses JAI API and Java 2D for printing. I can zoom in . zoom out , invert the image and I am printing the displayed image also .
    In the action handler class for the print button , I have made an inner class implementing printable and executing the print function.
    I am doing printing via a separate thread as i don't want my action handler class to keep waiting till the image gets printed . The user should be able to manipulate the image after it has clicked on the "ok" of the print dialog, while the image is being printed. This is the reason for printing the image in a separate thread
    and the actual printing process is a synchronized method called by the run method of the thread .
    If I click on print button twice , one after another , the second image gets printed only after I get a response from the printer that image has been printed as expected (as the print method is synchronized ).
    In the action handler class of print , I do not call join on the thread as I do not want it to wait for printing to get over ( printing of a tiff image actually takes a long time ?? )
    Is there anyway to make the threads independent of the main applet . Like after firing the print command , if I close the applet and I haven't got a confirmation from the printer, I get a blank page or nothing but i get a response message from printer that printing is done .
    Is it essential for a thread to wait till the printer sends a response that printing is over ?
    Similarly , If after firing the printing command and without waiting for the confirmation from the printer , I refresh the applet , proper printing does not occur but I get a message from the printer that printing is done .
    If i use synchronized method for printing and wait till the printer response from the printer comes without closing or refreshing the applet , printing occurs fine .
    Can anyone please tell me what is actually happening and is there a better way to print and that printing occurs after the print command has been fired irrespective of the applet ?
    Regards , Navneet

    Hey can you send me the code for the same. I know its been a long while, but I am new to JAI and need the same stuff u coded. u can mail it to me on [email protected]
    Thanks in advance.

  • Print from an applet

    Hi,
    My application requires to print data retrieved through an applet. The applet
    receives data thruogh a servlet. My applet is designed using swings. How can i print the contents of a JTextArea object on the applet?

    first, you need to Sign the applet.
    then, just use a PrintJob to print whatever you want.
    actually..it can get more compilcated thatn that..depends on how you want to print.
    Use google. they have lots of tutorial, examples on "signing applet" and "printing Java component or text"
    try use a JTextPane..it holds the text in a Document that you can manipulate and then send to the printer.

  • Print From Applet

    Can I print from an Applet without signing it or messing about with the policy file? A simple enough question but one I haven'e been able to find a definitive answer for. If possible I'd like to avoid popping up a new browser window with the document to be printed.

    An Applet runs in a sandbox which without proper authentication, will not allow any actions outside the sandbox, i.e. on the local filesystem.
    You cannot print from an unsigned applet.
    The signing process is very simple using Jarsigner and the Java Plugin.
    You can generate your own certificates too, no need to purchase one.

  • Print HTML doument without open it from an applet

    I need to know how I can print an HTML document from an applet developed with Jbuilder 4. I'm not a very expert developer and I need a detailed information about this problem. Important is that the HTML document is printed without open it.
    I use: win 2000 pro
    J2RE 1.4.0
    thanks in advance for your help
    Mauro Losa

    Thanks for your help but my problem is that i want print the document without display it.
    I think to have find a solution using Java Print Service API (JDK 1.4) but when i run the example the system display this error refered to this instruction
    "PrintService[] pservices = PrintServiceLookup.lookupPrintServices(flavor, aset);":
    java.lang.UnsatisfiedLinkError: getDefaultPrinterName
    at sun.print.Win32PrintServiceLookup.getDefaultPrinterName(Native Method)
    at sun.print.Win32PrintServiceLookup.getDefaultPrintService(Unknown Source)
    at sun.print.Win32PrintServiceLookup.getPrintServices(Unknown Source)
    at sun.print.Win32PrintServiceLookup.getPrintServices(Unknown Source)
    at javax.print.PrintServiceLookup.getServices(Unknown Source)
    at javax.print.PrintServiceLookup.lookupPrintServices(Unknown Source)
    at untitled4.applet1.main(Applet1.java:32)

  • Print from applet running in IE5.5

    Application is standalone and can be used as applet as well. If it works as standalone application everything works fine. When I put it on a Web server and try to run it as applet from within IE5.5 it hangs. The problem is in the part of code that invokes printing, without it applet works fine.
    I know the problem is that applet can�t invoke printing if it isn�t signed but in that case it should throws exception not hangs at the very beginning. Also, applet can�t be closed without closing IE5.5.
    public void printGraph() {
    PageAttributes pa = new PageAttributes();
    JobAttributes ja = new JobAttributes();
    pa.setOrientationRequested(PageAttributes.OrientationRequestedType.LANDSCAPE);
    pa.setOrigin(PageAttributes.OriginType.PRINTABLE);
    PrintJob printJob = getToolkit().getPrintJob(this, graph.name, ja, pa);
    if(printJob != null) {
    int xmargin = 30;
    int ymargin = 30;
    Dimension printArea = printJob.getPageDimension();
    printArea.width -= xmargin;
    printArea.height -= ymargin;
    for(int i=0; i<ja.getCopies(); i++) {
    Graphics g = printJob.getGraphics();
    if( g != null) {
    graph.print(g, printArea, xmargin, ymargin);
    g.dispose();
    printJob.end();
    public void actionPerformed(ActionEvent event) {
    String command = event.getActionCommand();
    Object source = event.getSource();
    int index;
    } else if (command == "Print") {
    try {
    SecurityManager sm = System.getSecurityManager();
    if( sm != null) sm.checkPrintJobAccess();
    printGraph();
    } catch (SecurityException e) {
    System.err.println("Printing is not allowed.");
    I hope someone knows what is the problem.
    Best regards
    Goran

    The problem is in the version of java (1.1.4) IE5.5 supports by default on WIN2K platform.
    This version doesn't support the PageAttributes and JobAttributes classes and method getPrintJob(Frame f, String name, JobAttributes ja, PageAttributes pa).
    The getPrintJob(Frame f, String name, Properties pr) method that is supported since jdk 1.1 can be used instead
    Sorry I didn�t mention os platform and java version.

  • Printing from applet

    I have a java 1.1 applet, which has been printing ok from IE, since I moved up to JDK1.4.0_01, the print dialog comes up as usual but after clicking ok, the answereing yes to the allow java to print question, the applet hangs. When I've turned on the exception reporting and looked at the console, it reports the following exception, printing work when using appletviewer. Does anyone have any ideas what's the solution is to this, the line of code it's executing at the time is
    printjob = oolkit.getPrintJobframe, "Print", oPrinterProperties);
    sun.misc.ServiceConfigurationError: javax.print.PrintServiceLookup: : java.io.FileNotFoundException: http://localhost/META-INF/services/javax.print.PrintServiceLookup
         at sun.misc.Service.fail(Service.java:129)
         at sun.misc.Service.parse(Service.java:208)
         at sun.misc.Service.access$100(Service.java:111)
         at sun.misc.Service$LazyIterator.hasNext(Service.java:257)
         at javax.print.PrintServiceLookup$1.run(PrintServiceLookup.java:326)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.print.PrintServiceLookup.getAllLookupServices(PrintServiceLookup.java:320)
         at javax.print.PrintServiceLookup.lookupDefaultPrintService(PrintServiceLookup.java:162)
         at sun.print.RasterPrinterJob.getPrintService(RasterPrinterJob.java:348)
         at sun.awt.windows.WPrinterJob.getPrintService(WPrinterJob.java:408)
         at sun.print.PrintJob2D.findNamedPrintService(PrintJob2D.java:187)
         at sun.print.PrintJob2D.copyAttributes(PrintJob2D.java:223)
         at sun.print.PrintJob2D.printDialog(PrintJob2D.java:176)
         at sun.awt.windows.WToolkit.getPrintJob(WToolkit.java:600)
         at sun.awt.windows.WToolkit.getPrintJob(WToolkit.java:586)
         at PrintingChartApplet.printChart(PrintingChartApplet.java:67)
         at PrintingChartApplet.actionPerformed(PrintingChartApplet.java:53)
         at java.awt.Button.processActionEvent(Button.java:381)
         at java.awt.Button.processEvent(Button.java:350)
         at java.awt.Component.dispatchEventImpl(Component.java:3526)
         at java.awt.Component.dispatchEvent(Component.java:3367)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)

    I also ran into this problem recently and I think I've figured out basically what's happening. It only happens when the applet is served by Tomcat and certain other web application servers. When the applet is launched by a simple HTML page from a web server, it is able to print without any exceptions being thrown.
    In one of our applications, we have a servlet that downloads an applet to the client. When that applet calls 'PrinterJob.print', the JDK 1.4 implementation of that method on the client looks up the default 'PrintService'. To do so, it indirectly uses the class loader to get some optional configuration file (I don't know the details). That configuration file isn't in the applet's JAR file, so the class loader looks for it in the same place the JAR file came from: the server. Our servlet gets the request for the configuration file but the file isn't on the server either, so it returns a 404 error.
    Here's where things go wrong. If the 404 error were sent back correctly, printing would proceed normally since the configuration file is optional. However, instead of calling 'HttpServletResponse.sendError (SC_NOT_FOUND)', the servlet calls 'HttpServletResponse.setStatus (SC_NOT_FOUND)'. I'm not sure why, but this response isn't seen by the client as a 404 error, so the body of the response is treated as the configuration file. Parsing of the body fails and the 'ServiceConfigurationError' is thrown.
    We changed our servlet so that it calls 'sendError' and that fixed the 'ServiceConfigurationError' problem.
    Nobody has mentioned servlets (or JSPs) being involved in their situations, but maybe there is a similar root cause. If the server is somehow not returning a 404 response, the 'PrintService' code on the client will try to parse that response and throw an error.

  • Printing from applet hangs

    I'm trying to create an applet that can print a graphic. I have a single button and the event seems to fire when clicked. I get the security warning asking me if I want to print. I click yes and it usually pops up again and I hit yes again and then it hangs. My end goal is to print a coupon image from the browser without the print dialog so that multiple copies cannot be printed. Yes, I've heard of photo copiers but evidently the client is fine with that. At this point I'm just trying to get something to print period from the applet. Any ideas?
         public void PrintCoupon2()
              try {
              PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
              pras.add(new Copies(1));
              PrintService pss[] = PrintServiceLookup.lookupPrintServices(DocFlavor.URL.JPEG, pras);
              if (pss.length == 0) {
                   throw new RuntimeException("No printer services available.");
              PrintService ps = pss[0];
              System.out.println("Printing to " + ps);
              DocPrintJob job = ps.createPrintJob();
                   URL url = new URL("http://www.mydomain.com/images/test.jpg");
                   Doc doc = new SimpleDoc(url, javax.print.DocFlavor.URL.JPEG, null);
              //FileInputStream fin = new FileInputStream("IMG_0711.JPG");
              //Doc doc = new SimpleDoc(fin, DocFlavor.INPUT_STREAM.JPEG, null);
              job.print(doc, pras);
         } catch (IOException ie) {
              ie.printStackTrace();
         } catch (PrintException pe) {
              pe.printStackTrace();
         }

    I also ran into this problem recently and I think I've figured out basically what's happening. It only happens when the applet is served by Tomcat and certain other web application servers. When the applet is launched by a simple HTML page from a web server, it is able to print without any exceptions being thrown.
    In one of our applications, we have a servlet that downloads an applet to the client. When that applet calls 'PrinterJob.print', the JDK 1.4 implementation of that method on the client looks up the default 'PrintService'. To do so, it indirectly uses the class loader to get some optional configuration file (I don't know the details). That configuration file isn't in the applet's JAR file, so the class loader looks for it in the same place the JAR file came from: the server. Our servlet gets the request for the configuration file but the file isn't on the server either, so it returns a 404 error.
    Here's where things go wrong. If the 404 error were sent back correctly, printing would proceed normally since the configuration file is optional. However, instead of calling 'HttpServletResponse.sendError (SC_NOT_FOUND)', the servlet calls 'HttpServletResponse.setStatus (SC_NOT_FOUND)'. I'm not sure why, but this response isn't seen by the client as a 404 error, so the body of the response is treated as the configuration file. Parsing of the body fails and the 'ServiceConfigurationError' is thrown.
    We changed our servlet so that it calls 'sendError' and that fixed the 'ServiceConfigurationError' problem.
    Nobody has mentioned servlets (or JSPs) being involved in their situations, but maybe there is a similar root cause. If the server is somehow not returning a 404 response, the 'PrintService' code on the client will try to parse that response and throw an error.

  • How to print an HTML from an Applet ?

    I have a html file which has some images (<img></img> tag ) and some static contents.This html is generated by a Servlet.Currenlty i am doing a browser print. I do not want the print dialog box to appear.
    Is it possible to print this using an applet ? Using java print ?
    I am able to print a image from an applet using java print.
    But i am not able to print a html with images and text.
    Is there any way to convert such html into a image(jpeg,bmp) using java api ?

    I tried the Java printing API in 1.4.2 but found it hopeless in terms of printing anything without using AWT.
    Also since the print service was going to be on Windows machine I used jawin (http://sf.net/projects/jawinproject/) to query the registry for the command to print a particular extension and then exec that command.

  • Print from applet, signed jar

    Hi all
    Have a signed applet that runs under IE 6, java 1.5. The applet is basically used for printing purpose.
    My problem is that the applet shows a dialog box "Applet would like to print. Do you want to proceed?"
    How can I get rid of the dialog box?
    I don't want to change the Java file.
    Thanks in advance

    An Applet runs in a sandbox which without proper authentication, will not allow any actions outside the sandbox, i.e. on the local filesystem.
    You cannot print from an unsigned applet.
    The signing process is very simple using Jarsigner and the Java Plugin.
    You can generate your own certificates too, no need to purchase one.

  • 'Dunning Letter Print from Dunning Letter Generate'

    hi,
    How can i run the "Dunning Letter Print from Dunning Letter Generate" standard program without runing the spwaned program called 'Dunning Letter Generate'.I mean i want to run the 'Dunning Letter Print from Dunning Letter Generate'(execution method: report) independently.
    I need to pass the parameters to the 'Dunning Letter Print from Dunning Letter Generate' directly instead of passing to the spwaned program ''Dunning Letter Generate".
    Thanks
    Devender

    Hi Gareth,
    New parameters to be add are:
    Tier : <xxxx>
    Service Segment: <xxxxx>
    Account Manager: <xxxx>
    Location where I am picking these 3:
    navigation:select any AR responsibility
    customer->standard(query with any customer)->customer address
    we have enabled 'site use information' dff in customer address window, from this dff we are taking these 3 parameters.
    reason to add these 3 parameters:
    we cant treat all the customers same. so we need to send some smooth(no harsh) dunning letters to some of our most trusted customers. so how can we identify gud customers in the list.
    so we have enabled site use information dff. those customers who is have values for these 3 parameters. will be treated as v good and reguler customers for us. so for them we can send other dunning letters.
    note*: this is to identify the customers like reguler customers,non requler customers.
    bez in spwaned program we have parameters like 1.customer low 2.customer high. thats it .so it is very difficult to find out the nature of customer.
    pls advice me on this..to proceed further..
    Thanks
    Devender

Maybe you are looking for

  • Different issues on Satellite T130

    Hi all - firstly, newbie alert. Just registered. First post. Be gentle.... Bought a T130 off eBay. Worked ok initially with general browsing & stuff. One day tried to open the Userguide pdf & everything started going VERY slow. Eventually it opened.

  • Can't download or update apps.

    Hi I have had an iPod for a couple of years and bought an iPhone earlier this year over the Internet (sent from the US). Until recently I could download and update apps on both devices. But now when I try to do this on my iPhone I get a message that

  • Why can't I attach a file to an email when using Firefox 6.0.1? Works fine if using Explorer

    Using Firefox 6.0.1 browser and web mail service Compose email Click Add Attachment Select file to be attached Click Open File or double click file name File does not attach I do not have this problem when I use Explorer as the browser I do not have

  • How to Select Database Path via labview

    Hello gurus...........     I am new user in labview. I want read and write in database through labivew . I have done read and write program. Now I want choose database storage path through labview . I tried differnt ways but I couldn't. First read an

  • Jittery images in menu

    Never had this problem before. And I've got no idea what else to try. I'm using a handful of still images in this DVD menu interface. Some are from a digital still camera. Some are video captures. But they're all jittery in the menu - not as I create