Problem with client side printing, please help its urgent

hi ,
am using struts and jasper reports on my project, now i was having problem that whenever i try to print the report , the printer dialogue box was appearing on server machine, i want it on client end, how to solve this problem, please any one know help me, it was urgent,
my code was like this
JasperCompileManager.compileReportToFile("c:/report/test.jrxml","c:/report/test.jasper");
JasperPrint jasperPrint = JasperFillManager.fillReport("c:/report/test.jasper"),parameters,con);
List l=jasperPrint.getPages();                         
if(l.size() != 0){
  jasperPrint.setOrientation(JasperReport.ORIENTATION_PORTRAIT);
  jasperPrint.setPageHeight(877);
  jasperPrint.setPageWidth(963);
  JasperPrintManager.printPages(jasperPrint,0,l.size()-1,true);
}thanks in advance,

Double post.

Similar Messages

  • Problem with Accessing Deployed Servlets Please help, very urgent.

    Inspite of going through lots of Docs. I am not able to access the JSP which is deployed using JDeveloper 3.2 in the browser? What should be the URL and where should I place the JSP and the related files in the Apache Server (Specific directory)?
    Please help, this is very Urgent.
    Could I get some sites where I can get detailed description of how to deploy and access Servlets and JSPS using JDeveloper 3.2 for OAS 9i?
    Thanks in advance,
    Regards,
    Kavita.
    null

    Hi Kativa,
    In answer to your first question: In most apache installs, you want to place all your JSPs under the Apache/htdocs directory. This htdocs directory becomes the root directory of your HTTP request, so, for example, to access the file
    Apache/htdocs/mydir/myJSP.jsp
    you'd point your browser to
    server:port/mydir/myJSP.jsp]http://server:port/mydir/myJSP.jsp
    As to your second question: Do you mean Oracle 9iAS? If so, look at this HOWTO: http://technet.oracle.com:89/ubb/Forum2/HTML/006398.html
    JDeveloper 3.2 does not support deployment to OAS (the predecessor to iAS), but there was no OAS 9i.
    null

  • Problem with client side printing

    hi ,
    am using struts and jasper reports on my project, now i was having problem that whenever i try to print the report , the printer dialogue box was appearing on server machine, i want it on client end, how to solve this problem, please any one know help me, it was urgent,
    my code was like this
    JasperCompileManager.compileReportToFile("c:/report/test.jrxml","c:/report/test.jasper");
    JasperPrint jasperPrint = JasperFillManager.fillReport("c:/report/test.jasper"),parameters,con);
    List l=jasperPrint.getPages();                         
    if(l.size() != 0){
      jasperPrint.setOrientation(JasperReport.ORIENTATION_PORTRAIT);
      jasperPrint.setPageHeight(877);
      jasperPrint.setPageWidth(963);
      JasperPrintManager.printPages(jasperPrint,0,l.size()-1,true);
    }thanks in advance,

    Throw away the code that generates a JasperPrint object and tries to print it. (All of the code, in other words, except maybe the first line.) As you found, that tries to print on the machine where the code is running. Replace it by Jasper code that produces PDF or HTML, and send that as the response. Let the person sitting at the browser deal with printing it if they want.

  • Having problem with client side Authentication.

    Hi,
    I am haveing a problem enabling client side authentication with SSL on
    weblogic 5.1.
    I have set up the .properties files as explained, however it appears
    my client is not sending a certificate back to the server. The same
    client however works perfectly (using the same keystore file) with a
    sample ClassFileSErver webserver from the jsse distribution. (the
    client is a very slightly modified version of
    SSLSocketClientWithClientAuth sample that comes with Jsse)
    Below I've included a section of the debug dump from the interactions.
    The only other difference I can see is the cipher suites offered by
    the servers.
    Weblogic offers type 0 or 9, and agrees on type 9
    (SSL_RSA_WITH_DES_CBC_SHA), whereas ClassFileServer offer type 0 or 5
    and settles on type 5 (SSL_RSA_WITH_RC4_128_SHA).
    I am using the same keystore for both examples. Both servers request
    an RSA client cert.... I'm out of ideas.
    Any help would be greatfully received.
    Cheers,
    Keith
    Debug dump information
    =====================================
    1/Weblogic server.
    *** CertificateRequest
    Cert Types: RSA,
    Cert Authorities:
    <CN=K H, OU=itsmobile, O=itsmobile, L=Dublin, ST=Dublin, C=ie>
    <[email protected], CN=Demo Certificate Authority,
    OU=Security, O=BEA WebLogic, L=San Francisco, ST=California, C=US>
    <CN=Thawte Test CA Root, OU=TEST TEST TEST, O=Thawte Certification,
    ST=FOR TESTING PURPOSES ONLY, C=ZA>
    [read] MD5 and SHA1 hashes: len = 427
    0000: 0D 00 01 A7 01 01 01 A3 00 67 30 65 31 0B 30 09
    .........g0e1.0.
    0010: 06 03 55 04 06 13 02 69 65 31 0F 30 0D 06 03 55
    ..U....ie1.0...U
    0020: 04 08 13 06 44 75 62 6C 69 6E 31 0F 30 0D 06 03
    ....Dublin1.0...
    0030: 55 04 07 13 06 44 75 62 6C 69 6E 31 12 30 10 06
    U....Dublin1.0..
    0040: 03 55 04 0A 13 09 69 74 73 6D 6F 62 69 6C 65 31
    .U....itsmobile1
    0050: 12 30 10 06 03 55 04 0B 13 09 69 74 73 6D 6F 62
    .0...U....itsmob
    0060: 69 6C 65 31 0C 30 0A 06 03 55 04 03 13 03 4B 20
    ile1.0...U....K
    0070: 48 00 AC 30 81 A9 31 0B 30 09 06 03 55 04 06 13
    H..0..1.0...U...
    0080: 02 55 53 31 13 30 11 06 03 55 04 08 13 0A 43 61
    .US1.0...U....Ca
    0090: 6C 69 66 6F 72 6E 69 61 31 16 30 14 06 03 55 04
    lifornia1.0...U.
    00A0: 07 13 0D 53 61 6E 20 46 72 61 6E 63 69 73 63 6F ...San
    Francisco
    00B0: 31 15 30 13 06 03 55 04 0A 13 0C 42 45 41 20 57
    1.0...U....BEA W
    00C0: 65 62 4C 6F 67 69 63 31 11 30 0F 06 03 55 04 0B
    ebLogic1.0...U..
    00D0: 13 08 53 65 63 75 72 69 74 79 31 23 30 21 06 03
    ..Security1#0!..
    00E0: 55 04 03 13 1A 44 65 6D 6F 20 43 65 72 74 69 66 U....Demo
    Certif
    00F0: 69 63 61 74 65 20 41 75 74 68 6F 72 69 74 79 31 icate
    Authority1
    0100: 1E 30 1C 06 09 2A 86 48 86 F7 0D 01 09 01 16 0F
    .0...*.H........
    0110: 73 75 70 70 6F 72 74 40 62 65 61 2E 63 6F 6D 00
    [email protected].
    0120: 8A 30 81 87 31 0B 30 09 06 03 55 04 06 13 02 5A
    .0..1.0...U....Z
    0130: 41 31 22 30 20 06 03 55 04 08 13 19 46 4F 52 20 A1"0
    ..U....FOR
    0140: 54 45 53 54 49 4E 47 20 50 55 52 50 4F 53 45 53 TESTING
    PURPOSES
    0150: 20 4F 4E 4C 59 31 1D 30 1B 06 03 55 04 0A 13 14
    ONLY1.0...U....
    0160: 54 68 61 77 74 65 20 43 65 72 74 69 66 69 63 61 Thawte
    Certifica
    0170: 74 69 6F 6E 31 17 30 15 06 03 55 04 0B 13 0E 54
    tion1.0...U....T
    0180: 45 53 54 20 54 45 53 54 20 54 45 53 54 31 1C 30 EST TEST
    TEST1.0
    0190: 1A 06 03 55 04 03 13 13 54 68 61 77 74 65 20 54
    ...U....Thawte T
    01A0: 65 73 74 20 43 41 20 52 6F 6F 74 est CA Root
    main, READ: SSL v3.0 Handshake, length = 4
    *** ServerHelloDone
    [read] MD5 and SHA1 hashes: len = 4
    0000: 0E 00 00 00 ....
    main, SEND SSL v3.0 ALERT: warning, description = no_certificate
    main, WRITE: SSL v3.0 Alert, length = 2
    And below is a sample when I used the ClassFileServer.
    This time the client (same src) returned a certificate.
    2/ClassFileSErver (from Sun Jsse distribution)
    *** CertificateRequest
    Cert Types: DSS, RSA,
    Cert Authorities:
    <CN=K H, OU=itsmobile, O=itsmobile, L=Dublin, ST=Dublin, C=ie>
    [read] MD5 and SHA1 hashes: len = 114
    0000: 0D 00 00 6E 02 02 01 00 69 00 67 30 65 31 0B 30
    ...n....i.g0e1.0
    0010: 09 06 03 55 04 06 13 02 69 65 31 0F 30 0D 06 03
    ...U....ie1.0...
    0020: 55 04 08 13 06 44 75 62 6C 69 6E 31 0F 30 0D 06
    U....Dublin1.0..
    0030: 03 55 04 07 13 06 44 75 62 6C 69 6E 31 12 30 10
    .U....Dublin1.0.
    0040: 06 03 55 04 0A 13 09 69 74 73 6D 6F 62 69 6C 65
    ..U....itsmobile
    0050: 31 12 30 10 06 03 55 04 0B 13 09 69 74 73 6D 6F
    1.0...U....itsmo
    0060: 62 69 6C 65 31 0C 30 0A 06 03 55 04 03 13 03 4B
    bile1.0...U....K
    0070: 20 48 H
    *** ServerHelloDone
    [read] MD5 and SHA1 hashes: len = 4
    0000: 0E 00 00 00 ....
    matching client alias : rsakey
    *** Certificate chain

    Matt,
    Did you read this article:
    https://wiki.sdn.sap.com/wiki/display/BSP/Using%20Proxies
    This explains how to properly setup the HTTPURLLOC table.
    In your case you should have entries that look something like this:
    40 HTTP   * <internal host name> <https port>
    50 HTTPS * <external host name> <https port>
    In addition you need to run the report to determine if the proxy configuration is setup properly.  The URL should be run with the
    https://<externalhostname>/sap/bc/bsp/sap/system_test/test_proxy.htm
    Take care,
    Stephen

  • Firefox is having problems with "Southwest Airlines website" Please help soon

    Whenever I go on Southwest Airline website, it does not work. I am having this problem since last month. Please help on this as soon as you can.

    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Other things that need your attention:
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    * Shockwave Flash 10.0 r22
    * Java Plug-in 1.6.0_07 for Netscape Navigator (DLL Helper)
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://kb.mozillazine.org/Flash
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version.
    *http://kb.mozillazine.org/Java
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)

  • Sql  Query . Please help its urgent.

    Suppose in table EMP there are 2 columns (Roll_no and Name)
    Roll NO Name
    00001 A
    00002 B
    00010 X
    My requirement is to trunc preceding Zero's. For ex : for Roll no: 00001 the output should be 1 and for 00002 --> 2 .
    Please help its very urgent.

    try this
          select
                  to_number(roll_no) roll_no,
                  name
          from
                  emp;
         Regards
    Singh

  • Problem with touch screen. Please help!!!

    Ok I bought an iPad about a month ago now. At first it worked perfectly, runs apps smoothly, etc. But then something happened to the touch screen, it just randomly like pressed itself, it went into apps on its own and zoom in and out while on safari just randomly. For about 3 weeks this issue disappeared, but now it happens again but more constantly and for more time please help. I think this video will explain my issue more clearly. http://www.youtube.com/watch?v=e1qyvHV43yg Please I just don't want this issue anymore. Any help will be appreciated.

    OK...so it seems that many iPad owners have the same issue with the screen "self registering touches". You'll see multiple posts on the forums from "self touching" to "self registering" to "freaking out".
    Well, I also have this annoying problem.
    Trust me when I say that cleaning the screen, resets, charging, deleting apps, static, and so on haven't anything to do with causing or resolving this issue.
    Here is a little tip to show you what is actually going on. Download a free app that shows you "screen touches". Harbor Master is one that I've heard of that led me to this...but I prefer to use that pocket pond app...only because I can just sit back and watch without having to move boats around.
    ...When you notice the problem, open up the app. I've noticed on mine that it only self registers touches along the side. Exact location is (when holding iPad in landscape position, home button on left) along the top of the screen...from top middle to the top right corner.
    I have called Apple...the tech was polite and tried to help. ...But the only suggestions were to reset (as i've already done) then if that didn't work I was to do a reload while sync'd. He stated that if none of that worked then to take it to the store...
    Since I am in Florida for the month and the nearest Apple store is 6hrs away...I will wait until I go back home HI and visit a store that is close by.

  • Problems with the Proxy Programme--Please help

    Hi All,
    I have written a simple proxy server in the form of a servlet. I changed the proxy config of my browser to connect to this servlet hosted on the default context(http://localhost:8080) of the Tomcat 5.0.25 . Well , this servlet internally connects to the proxy of the corporate LAN . The logic that I have applied is as follows. The servlet gets the request from the client (ie the browser in this case) , extracts the headers and contents from the request, sets them to a new request that it forms and finally send this new request to the proxy. When the proxy responds, the servlet collects the response headers and contents adn writes them in its response. To sum up , this servlet transparently carries the requests and responses between the client(browser) and the corporate LAN proxy. Now the problem is this. Let's say , now I am accessing http://www.google.com.The browser sends a request to my servlet with the following headers as they are extracted by my servlet.
    ProxyServer:::>posting request
    ProxyServer:::>headerValue::> headerName = accept : headerValue=*/*
    ProxyServer:::>headerValue::> headerName = referer : headerValue=http://www.google.com/
    ProxyServer:::>headerValue::> headerName = accept-language : headerValue=en-us
    ProxyServer:::>headerValue::> headerName = proxy-connection : headerValue=Keep-Alive
    ProxyServer:::>headerValue::> headerName = user-agent : headerValue=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UB1.4_IE6.0_SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
    ProxyServer:::>headerValue::> headerName = host : headerValue=www.google.com
    ProxyServer:::>headerValue::> headerName = cookie : headerValue=PREF=ID=1be27c0a74f198ca:TM=1082058853:LM=1082058853:S=bu6ORrygzm8AUkm8
    ProxyServer:::>postRequest
    I set these headers into a new connection opened to the proxy and post a fresh request to the proxy,which, in turn responds with the following headers.
    ProxyServer:::>posted request successfully
    ProxyServer:::>writing response
    ProxyServer:::>writeResponse-->headerName = Proxy-Connection : headerValue = [close]
    ProxyServer:::>writeResponse-->headerName = Content-Length : headerValue = [257]
    ProxyServer:::>writeResponse-->headerName = Date : headerValue = [Tue, 13 Jul 2004 14:01:40 GMT]
    ProxyServer:::>writeResponse-->headerName = Content-Type : headerValue = [text/html]
    ProxyServer:::>writeResponse-->headerName = Server : headerValue = [NetCache appliance (NetApp/5.5R2)]
    ProxyServer:::>writeResponse-->headerName = Proxy-Authenticate : headerValue = [Basic realm="Charlotte - napxyclt2"]
    ProxyServer:::>writeResponse-->headerName = null : headerValue = [HTTP/1.1 407 Proxy Authentication Required]
    ProxyServer:::>writeResponse exiting
    ProxyServer:::>wrote response successfully
    I write these headers back to the client. According to what I was thinking, the client ie the browser would open a new dialog box asking for username/password owing to the presence of the "Proxy-Authenticate " header. But it does not happen that way. Rather the browser stops responsding and displays a blank page. Does anyone know why it happens this way? I am pasting the server prog below for everybody's reference.
    package server.proxy;
    //import all servlet related classes
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    import server.resources.*;
    //My Proxy server --->Currently it is very simplea and relies on
    //other proxy servers of an already connected network.
    public class ProxyServer extends HttpServlet
    //stores the resource bundle
    private ServerResBundle resBundle = null;
    //checks for the mode of operation
    private boolean proxySet = false;
    private String proxy = null;
    //storing the original System out/err etc
    private PrintStream sysOutOrig = null;
    private PrintStream sysErrOrig = null;
    private InputStream sysInOrig = null;
    //initialise certain features that are required later
    public void init() throws ServletException
    try
    //initialise the resource bundle
    this.initResBundle();
    System.out.println("ProxyServer:::>res bundle init");
    //set the mode of operation
    this.setMode();
    System.out.println("ProxyServer:::>mode set");
    //set the system out and err --System.setOut etc
    this.setSystemOutErr();
    System.out.println("ProxyServer:::>in/out/err set");
    }//End try
    catch(Exception e)
    System.out.println("Exception in init..."+(e.getMessage()));
    throw new ServletException(e);
    }//Edn
    catch(Throwable e)
    System.out.println("Irrecoverable Error...");
    throw new ServletException(e);
    }//End
    }//End init
    //method to init the resource bundle;
    private void initResBundle()
    this.resBundle = ServerResBundle.getBundle();
    }//End
    //method to set the mode of the server--proxy or direct
    private void setMode()
    //read the target proxy property from the bundle and
    //if it is set,take that URL
    String temp = (String)(this.resBundle.getResource(ResKeys.PROXY_SERVER));
    if ( (temp != null) && (temp.length() > 0) )
    this.proxySet = true;
    this.proxy = temp;
    temp = null;
    }//End
    }//End
    //method to set the system out and err etc
    private void setSystemOutErr() throws Exception
    //keep a copy of the original system out and error
    this.sysOutOrig = System.out;
    this.sysErrOrig = System.err;
    try
    //read the options adn if they are set, take the values directly
    String newOutStr = (String)(this.resBundle.getResource(ResKeys.SYSTEM_OUT));
    String newErrStr = (String)(this.resBundle.getResource(ResKeys.SYSTEM_ERR));
    if ((newOutStr != null) && (newOutStr.length() > 0))
    System.setOut(new PrintStream(new FileOutputStream(new File(newOutStr),true),true));
    }//End if
    if ((newErrStr != null) && (newErrStr.length() > 0))
    System.setErr(new PrintStream(new FileOutputStream(new File(newErrStr),true),true));
    }//End if
    }//End
    catch(Exception e)
    //restore the stuff
    System.setOut(this.sysOutOrig);
    System.setErr(this.sysErrOrig);
    }//End
    }//End
    //this is where the proxy functionalities will be embedded
    public void service(HttpServletRequest req,HttpServletResponse resp)
    throws ServletException,java.io.IOException
    //conenction URL
    URL target = null;
    //conenction to the remote object
    URLConnection targetConn = null;
    //stores the OOS and the OIS
    ObjectOutputStream oos = null;
    ObjectInputStream ois = null;
    try
    //check for the mode of operation
    if (proxySet)
    URLConnection objects go through two phases: first they are created, then they are connected.
    After being created, and before being connected, various options can be specified
    (e.g., doInput and UseCaches). After connecting, it is an error to try to set them.
    Operations that depend on being connected, like getContentLength, will implicitly perform the connection,
    if necessary.
    //for the URL to the proxy
    target=new URL(this.proxy);
    //conenct to the proxy
    targetConn = target.openConnection();
    //set the details of the connectuon
    targetConn.setDoInput(true);
    targetConn.setDoOutput(true);
    targetConn.setUseCaches(false);
    // If true, this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog. If false, then no user interaction is allowed
    targetConn.setAllowUserInteraction(true);
    //connect to the remote object
    // targetConn.connect();//call this only when all the request properties are set
    System.out.println("ProxyServer:::>posting request");
    //post the received request to the URL
    this.postRequest(targetConn,req);
    System.out.println("ProxyServer:::>posted request successfully");
    System.out.println("ProxyServer:::>writing response");
    //receive the response
    //write the received response to the client
    this.writeResponse(targetConn,resp);
    System.out.println("ProxyServer:::>wrote response successfully");
    }//End if
    else
    //currently this functionality is not supported
    throw new ServletException(
    (String)(this.resBundle.getResource(ResKeys.ERR_FUNC_NOTSUPPORTED)));
    }//End
    }//End try
    catch(Exception e)
    if(e instanceof ServletException)
    throw (ServletException)e;
    }//End
    if (e instanceof IOException)
    throw (IOException)e;
    }//End
    //wrap it up in ServletException
    throw new ServletException(e);
    }//End
    }//End
    //method to write the response back to the client
    private void writeResponse(URLConnection targetConn,HttpServletResponse resp)
    throws ServletException
    //get all the header fields from the response connection and set them to the
    //response of the servlet
    Map headerFields = null;
    Iterator headerFieldEntries = null;
    Map.Entry header = null;
    //stores the input stream to the conn
    BufferedReader brConn = null;
    //stores the writer to the response
    PrintWriter prResp = null;
    //checks if the proxy authentication needed or not
    boolean proxyAuthReqd = false;
    try
    //juste ensuring that the proxy authentication is reset
    proxyAuthReqd = false;
    if( (targetConn != null) && (resp != null) )
    //Returns an unmodifiable Map of the header fields.
    //The Map keys are Strings that represent the response-header field names.
    //Each Map value is an unmodifiable List of Strings that represents the corresponding
    //field values
    headerFields = targetConn.getHeaderFields();
    //Returns a set view of the mappings contained in this map
    Set temp = headerFields.entrySet();
    //Returns an iterator over the elements in this set
    headerFieldEntries = temp.iterator();
    if (headerFieldEntries != null)
    while (headerFieldEntries.hasNext())
    Object tempHeader = headerFieldEntries.next();
    if (tempHeader instanceof Map.Entry)
    header = (Map.Entry)tempHeader;
    Object headerName = header.getKey();
    Object headerValue=header.getValue();
    System.out.println("ProxyServer:::>writeResponse-->headerName = "+headerName+" : headerValue = "+headerValue);
    //do not select the key-value pair if both the key adn the value are null
    if ( ( headerName == null) && (headerValue == null) )
    continue;
    }//Enmd
    if (headerValue != null)
    List headerValList = null;
    if (headerValue instanceof List)
    headerValList = (List)headerValue;
    }//End
    if(headerValList != null)
    for (int i=0;i<headerValList.size();i++)
    Object headerValueStr = headerValList.get(i);
    if (headerValueStr instanceof String)
    //note that the header-key can not be null for addHeader
    //I have made this temporary provision to make the programme work.
    resp.addHeader(( (headerName==null)? ("null_header"+i) :(String)headerName),
    (String)headerValueStr);
    //check if the proxy authentication required or not
    if (((String)headerValueStr).
    indexOf(resp.SC_PROXY_AUTHENTICATION_REQUIRED+"") != -1)
    System.out.println("ProxyServer:::>writeResponse-->proxy auth needed");
    //proxy authentication is needed
    proxyAuthReqd = true;
    }//End
    }//Ednd of
    else if (headerValueStr == null)
    resp.addHeader(( (headerName==null)? null :(String)headerName),
    null);
    }//End
    }//End for
    }//End if
    }//End if
    }//End
    }//End while
    }//End if
    //get the writer to the client
    prResp = resp.getWriter();
    System.out.println("ProxyServer:::>writeResponse-->proxyAuthReqd="+proxyAuthReqd);
    //juste test a simple header
    System.out.println("Proxy-Authenticate = "+(resp.containsHeader("Proxy-Authenticate")));
    //if the proxy asks you for authentication,pass on the same to the client
    //from whom you have received the request.When this flag is true,the connection
    //is closed by the remotehost adn hence any attempt to open in input steram
    //results in an error ie IOException
    if (!proxyAuthReqd)
    //now get the content adn write it to the response too
    brConn = new BufferedReader(new InputStreamReader(
    targetConn.getInputStream()));
    String tempStr = null;
    while ((tempStr = brConn.readLine())!=null)
    prResp.println(tempStr);
    }//End while
    //close the connections
    brConn.close();
    }//End if
    else
    prResp.println("Proxy Authentication needed...");
    }//End
    //close the streams
    prResp.flush();
    prResp.close();
    }//End if
    System.out.println("ProxyServer:::>writeResponse exiting\n");
    }//End try
    catch(Exception e)
    throw new ServletException(e);
    }//End
    }//End
    //method to post request to the internet
    private void postRequest(URLConnection targetConn,HttpServletRequest req)
    throws ServletException
    //extract the header parameters and the body content from the incoming request
    //and set them to the new connection
    Enumeration reqHeaders = null;
    //reads the incoming request's content
    BufferedReader brReqRd = null;
    PrintWriter prResWt = null;
    //stores temp header names and values
    String headerName = null;
    String headerValue = null;
    try
    if( (targetConn != null) && (req != null) )
    reqHeaders = req.getHeaderNames();
    //extract a header adn set it to the new connection
    while (reqHeaders.hasMoreElements())
    headerName = (String)(reqHeaders.nextElement());
    headerValue = req.getHeader(headerName);
    targetConn.setRequestProperty(headerName,headerValue);
    System.out.println("ProxyServer:::>headerValue::> headerName = "+headerName+" : headerValue="+headerValue);
    }//End
    System.out.println("ProxyServer:::>postRequest\n");
    //establis the actual connection
    //calling this method bfore the above loop results in IllegalStateException
    targetConn.connect();
    //NOTE : try reading from and writing into OIS and OOS respectively
    //now read the contents and write them to the connection
    // brReqRd = req.getReader(); //this hangs for some reason
    brReqRd = new BufferedReader(new InputStreamReader(req.getInputStream()));
    System.out.println("Got the reader..brReqRd = "+brReqRd);
    if (brReqRd != null)
    String temp = null;
    //establish the printwriter
    // prResWt = new PrintWriter(targetConn.getOutputStream(),true);
    prResWt = new PrintWriter(targetConn.getOutputStream());
    System.out.println("trying to read in a loop from brReqRd.. ready="+(brReqRd.ready()));
    while( (brReqRd.ready()) && ((temp=brReqRd.readLine()) != null) )
    System.out.println("In while::>temp = "+temp);
    prResWt.println(temp);
    }//Emd while
    //close the streams adn go back
    brReqRd.close();
    prResWt.flush();
    prResWt.close();
    }//End
    }//End outer if
    System.out.println("ProxyServer:::>postRequest exiting\n");
    }//End try
    catch(Exception e)
    throw new ServletException(e);
    }//End
    }//End
    }//End

    Hi serlank ,
    Thanks for your reply. Well , I initially I thought of not pasting the code,as it was too long. But I could not help it,as I thought I must show in code what I exactly meant. That's why I followed a description of my problem with the code. You could probably have copied the code and pasted it in one of your favourite editors to take a look at it. Did you,by any chance, try to read it on the browser? And as regards reposting the same message, I can say that I did it as I felt the subject was not quite appropriate in the first posting and I was not sure as to how I could delete/alter the posting. I am not asking for a code-fix,but some suggestions from some one who might ever have come across such a thing.Anyway, lemme know if you have any idea on it. Thanks...

  • HP Laserjet 1020 problem with double-side printing

    Hi, everyone!
    I have a problem with my printer HP laserjet 1020. From the community I know that there is no driver for 1020, but there is for 1022 (http://support.apple.com/kb/DL907). I installed it and everything was fine until I tried to print 2-sided page... It appears 2-sided option disappeared and I don't know how to fix this...
    Can anyone help, please?
    Thank you for looking.

    AMW122,
    The part in the photograph appears to be part of the fuser assembly.  If it is part of the fuser assembly, I would recommend you replace the fuser.  An internet search on "LaserJet 3300 fuser" found several links.  
    From what I can see, it appears that the fuser sleeve is damaged which will continue to worsen.
    If it is not the fuser, can you post another photograph further away so that we can see the location on the printer where it is located, etc...
    Kaz
    Kazman
    I am an HP Employee
    Say Thanks by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as Accepted Solution

  • Problem with adobe acrobat/reader - please help!

    Hello,
    My acrobat reader was fine and I was able to open the pdf files sent to me, then suddenly it just wouldn't open anything at all.  It went into open mode and just stayed there, and wouldn't let me close it.  Then I got a message saying "there is a problem with adobe acrobat/reader.  Please exit and try again".  I've done this lots of times and it still isn't working.
    I would be very grateful for any help or suggestions.  I have windows 7, and as I said its all been fine up until now.
    Thanks.
    mspryce.

    This is the Acrobat forum, not the Reader forum. You should check the reader forum. In the meantime, if you are not running AR9.3 or so, you should update. Prior versions before 9 are not designed for Win7 and that might be your issue -- you gave no indication of version.

  • Problem with interputting  accessframe  example please help!!!

    A use code bellow to access every frame in the movie :
    import java.awt.*;
    import javax.media.*;
    import javax.media.control.TrackControl;
    import javax.media.Format;
    import javax.media.format.*;
    import java.io.*;
    import javax.imageio.*;
    import javax.imageio.stream.*;
    import java.awt.Color.*;
    import java.awt.image.*;
    import java.util.*;
    import java.awt.image.*;
    import javax.media.util.*;
    import javax.swing.JFrame;
    public class Film2ramki implements ControllerListener {
    Processor p;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    public boolean alreadyPrnt = false;
    public void zakoncz(){
         p.stop();
         p.close();
         p.deallocate();
    public boolean open(MediaLocator ml) {
    try {
    p = Manager.createProcessor(ml);
    } catch (Exception e) {
    System.err.println("Failed to create a processor from the given url: " + e);
    return false;
    p.addControllerListener(this);
    // Put the Processor into configured state.
    p.configure();
    if (!waitForState(p.Configured)) {
    System.err.println("Failed to configure the processor.");
    return false;
    // So I can use it as a player.
    p.setContentDescriptor(null);
    // Obtain the track controls.
    TrackControl tc[] = p.getTrackControls();
    if (tc == null) {
    System.err.println("Failed to obtain track controls from the processor.");
    return false;
    // Search for the track control for the video track.
    TrackControl videoTrack = null;
    for (int i = 0; i < tc.length; i++) {
    if (tc.getFormat() instanceof VideoFormat) {
    videoTrack = tc[i];
    break;
    if (videoTrack == null) {
    System.err.println("The input media does not contain a video track.");
    return false;
    System.err.println("Video format: " + videoTrack.getFormat());
    // Instantiate and set the frame access codec to the data flow path.
    try {
    Codec codec[] = { new PreAccessCodec(),
    new PostAccessCodec()};
    videoTrack.setCodecChain(codec);
    } catch (UnsupportedPlugInException e) {
    System.err.println("The process does not support effects.");
    // Realize the processor.
    p.prefetch();
    if (!waitForState(p.Prefetched)) {
    System.err.println("Failed to realize the processor.");
    return false;
    p.start();
    return true;
    boolean waitForState(int state) {
    synchronized (waitSync) {
    try {
    while (p.getState() != state && stateTransitionOK)
    waitSync.wait();
    } catch (Exception e) {}
    return stateTransitionOK;
    public void controllerUpdate(ControllerEvent evt) {
    if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
    stateTransitionOK = true;
    waitSync.notifyAll();
    } else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
    stateTransitionOK = false;
    waitSync.notifyAll();
    } else if (evt instanceof EndOfMediaEvent) {
         p.stop();
         p.close();
         System.exit(0);
    Film2ramki(){}
    public void startnow (String plik) {
         //this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    String url = "file:"+plik;
    if (url.indexOf(":") < 0) {
    prUsage();
    System.exit(0);
    MediaLocator ml;
    if ((ml = new MediaLocator(url)) == null) {
    System.err.println("Cannot build media locator from: " + url);
    System.exit(0);
    if (!open(ml))
    System.exit(0);
    static void prUsage() {
    System.err.println("Usage: java Film2ramki <url>");
    * Inner class.
    * A pass-through codec to access to individual frames.
    public class PreAccessCodec implements Codec {
    * Callback to access individual video frames.
    void accessFrame(Buffer frame) {
    // For demo, we'll just print out the frame #, time &
    // data length.
    long t = (long)(frame.getTimeStamp()/10000000f);
    System.err.println("Pre: frame #: " + frame.getSequenceNumber() +
    ", time: " + ((float)t)/100f +
    ", len: " + frame.getLength());
    * The code for a pass through codec.
    // We'll advertize as supporting all video formats.
    protected Format supportedIns[] = new Format [] {
    new VideoFormat(null)
    // We'll advertize as supporting all video formats.
    protected Format supportedOuts[] = new Format [] {
    new VideoFormat(null)
    Format input = null, output = null;
    public String getName() {
    return "Pre-Access Codec";
    // No op.
    public void open() {
    // No op.
    public void close() {
    // No op.
    public void reset() {
    public Format [] getSupportedInputFormats() {
    return supportedIns;
    public Format [] getSupportedOutputFormats(Format in) {
    if (in == null)
    return supportedOuts;
    else {
    // If an input format is given, we use that input format
    // as the output since we are not modifying the bit stream
    // at all.
    Format outs[] = new Format[1];
    outs[0] = in;
    return outs;
    public Format setInputFormat(Format format) {
    input = format;
    return input;
    public Format setOutputFormat(Format format) {
    output = format;
    return output;
    public int process(Buffer in, Buffer out) {
    // This is the "Callback" to access individual frames.
    accessFrame(in);
    // Swap the data between the input & output.
    Object data = in.getData();
    in.setData(out.getData());
    out.setData(data);
    // Copy the input attributes to the output
    out.setFlags(Buffer.FLAG_NO_SYNC);
    out.setFormat(in.getFormat());
    out.setLength(in.getLength());
    out.setOffset(in.getOffset());
    return BUFFER_PROCESSED_OK;
    public Object[] getControls() {
    return new Object[0];
    public Object getControl(String type) {
    return null;
    public class PostAccessCodec extends PreAccessCodec {
    // We'll advertize as supporting all video formats.
    public PostAccessCodec() {
    supportedIns = new Format [] {
    new RGBFormat()
    * Callback to access individual video frames.
    void accessFrame(Buffer frame) {
    // For demo, we'll just print out the frame #, time &
    // data length.
    if(!alreadyPrnt)
    BufferToImage stopBuffer = new BufferToImage((VideoFormat)frame.getFormat());
    System.out.println(stopBuffer.toString());
    System.out.println("CreatedBuffer");
    System.out.println("Created stopImage");
    Image stopImage = stopBuffer.createImage(frame);
    System.out.println("stopImage is full");
    if(stopImage == null)
    System.out.println("stopImage is null");
    try
    BufferedImage outImage = new BufferedImage (320, 240,BufferedImage.TYPE_INT_RGB);
    Graphics og = outImage.getGraphics();
    og.drawImage(stopImage,0,0,320,240,null);
    //prepareImage(outImage,rheight,rheight, null);
    Iterator writers = ImageIO.getImageWritersByFormatName("jpg");
    ImageWriter writer = (ImageWriter)writers.next();
    //Once an ImageWriter has been obtained, its destination must be set to an ImageOutputStream:
    File f = new File("frames\\"+frame.getSequenceNumber() + ".jpg");
    ImageOutputStream ios = ImageIO.createImageOutputStream(f);
    writer.setOutput(ios);
    //Finally, the image may be written to the output stream:
    //BufferedImage bi;
    //writer.write(imagebi);
    writer.write(outImage);
    ios.close();
    catch(IOException e)
    System.out.println("Error :" + e);
    //alreadyPrnt = true;
    long t = (long)(frame.getTimeStamp()/10000000f);
    System.err.println("Post: frame #: " + frame.getSequenceNumber() +
    ", time: " + ((float)t)/100f +
    ", len: " + frame.getLength());
    if(frame.getLength()==0){p.stop();p.close();p.deallocate();}
    public String getName() {
    return "Post-Access Codec";
    this code capture every frame from movie but it never ends running and i can't invoke any metod after grabing frames becouse its still running. How Can I stop this to enter the next metod.
    Please help me
    thx

    Answering sam04 question Yes this make that every frame is captured
    Back to my problem :
    I invoke caputre frames class from other class like this:
    Film2ramki f2r=new Film2ramki();
    f2r.startnow(pathtomov);
    System.out.println("End of capture");...........................
    So when capturing frames ends it should print "End of caputre" but I get something like this :
    JPEG, 320x240, FrameRate=13.0, Length=18198
    Video format: JPEG, 320x240, FrameRate=13.0, Length=18198
    Pre: frame #: 1, time: 0.0, len: 16282
    Post: frame #: 1, time: 0.0, len: 230400
    End of capture
    Pre: frame #: 2, time: 0.07, len: 16471
    Post: frame #: 2, time: 0.07, len: 230400
    Pre: frame #: 3, time: 0.15, len: 16620
    Post: frame #: 3, time: 0.15, len: 230400
    Pre: frame #: 4, time: 0.23, len: 16541
    Post: frame #: 4, time: 0.23, len: 230400
    Pre: frame #: 5, time: 0.3, len: 16749
    Pre: frame #: 18, time: 1.3, len: 15708
    Post: frame #: 18, time: 1.3, len: 230400
    Pre: frame #: 18, time: 1.3, len: 0
    Post: frame #: 18, time: 1.3, len: 0this is strange becouse it captures 1 frame end print "End of capture" and then its capures other frames. Why ?????

  • Problem with simple drawing program - please help!

    Hi,
    I've only just started using Java and would appreciate some help with a drawing tool application I'm currently trying to write.
    The problem is that when the user clicks on a button at the bottom of the frame, they are then supposed to be able to produce a square or circle by simply clicking on the canvas.
    Unfortunately, this is not currently happening.
    Please help!
    The code for both classes is as follows:
    1. DrawToolFrame Class:
    import java.awt.*;
    import java.awt.event.*;
    public class DrawToolFrame extends Frame
    implements WindowListener
    DrawToolCanvas myCanvas;
    public DrawToolFrame()
    setTitle("Draw Tool Frame");
    addWindowListener(this);
    Button square, circle;
    Panel myPanel = new Panel();
    square = new Button("square"); square.setActionCommand("square");
    circle = new Button("circle"); circle.setActionCommand("circle");
    myPanel.add(square); myPanel.add(circle);
    add("South", myPanel);
    DrawToolCanvas myCanvas = new DrawToolCanvas();
    add("Center", myCanvas);
    square.addMouseListener(myCanvas);
    circle.addMouseListener(myCanvas);
    public void windowClosing(WindowEvent event) { System.exit(0); }
    public void windowOpened(WindowEvent event) {}
    public void windowIconified(WindowEvent event) {}
    public void windowDeiconified(WindowEvent event) {}
    public void windowClosed(WindowEvent event) {}
    public void windowActivated(WindowEvent event) {}
    public void windowDeactivated(WindowEvent event) {}
    2. DrawToolCanvas Class:
    import java.awt.*;
    import java.awt.event.*;
    public class DrawToolCanvas
    extends Canvas
    implements MouseListener, ActionListener {
    String drawType="square";
    Point lastClickPoint=null;
    public void drawComponent(Graphics g) {
    if (lastClickPoint==null) {
    g.drawString("Click canvas first",20,20);
    } else {
    if (drawType.equals("square")) {
    square(g);
    else if (drawType.equals("circle")) {
    circle(g);
    public void actionPerformed(ActionEvent event) {
    if (event.getActionCommand().equals("square"))
    drawType="square";
    else if (event.getActionCommand().equals("circle"))
    drawType="circle";
    repaint();
    public void mouseReleased(MouseEvent e) {
    lastClickPoint=e.getPoint();
    public void square(Graphics g) {
    g.setColor(Color.red);
    g.fillRect(lastClickPoint.x, lastClickPoint.y, 40, 40);
    g.setColor(Color.black);
    public void circle(Graphics g) {
    g.setColor(Color.blue);
    g.fillOval(lastClickPoint.x, lastClickPoint.y, 40, 40);
    g.setColor(Color.black);
    public void mouseEntered(MouseEvent e) {}
    public void mouseExited(MouseEvent e) {}
    public void mousePressed(MouseEvent e) {}
    public void mouseClicked(MouseEvent e) {}
    Any help would be appreciated!

    Some of the problems:
    1) nothing calls drawComponent(Graphics g)
    2) Paint(Graphics g) has not been overriden
    3) myCanvas is declared twice: once as an instance variable to DrawToolFrame, and once local its constructor. Harmless but distracting.

  • Problem With Swf File. Please Help!!!!

    Hi! I recently got adobe flash cs4 and i tried to create swf wallpaper (flash lite 1.1), so everything looked good, untill i opened the file. The problem is its constantly blinking, like its refreshing with every second or frame or something. Then i transfered it to my phone and theres no change. I had the same problem with CS3...I attached the sample, if someone cares to see...Please can somebody help me??? Thank you!

    I think (at a first look) that you should put a stop() command at each frame of your movie.
    Playhead is running through your movie from one frame to another and back to beginning if you don't stop it with stop() command.
    What I mean is:
    in frame one of your movie put ActionScript: stop();
    in frame two of your movie put ActionScript: stop();
    etc.
    If navigation through your movie is linear, like some animations then don't put this AS in frames, but it seems to me that this will solve your problem.
    For more (if this isn't helping) upload your movie along with ActionScript.

  • I can't connect OS X Yosemite 10.10.2 version with Canon LBP2900 Printer, Please help how to connect...

    Hi.... Apple Support Communities...
    I used Apple MacBook Air 2014 (13 inch) series with OS X Yosemite 10.10.2 version...
    And I have a printer of Canon LBP2900...
    My problem is that, I can't connect my Canon LBP2900 printer with my new OS X Yosemite 10.10.2 version.
    My previous OS X Mavericks is working well with my Canon LBP2900 printer...
    But when I upgrade it to OS X Yosemite 10.10.2 version, my printer is not working...
    Anybody please help me how can i connect OS X Yosemite 10.10.2 version with my Canon LBP2900 printer....
    Thanking you.... Your suggestion in this regards is highly appriciate...

    Your first step would be to upgrade to Snow Leopard (10.6). To do that, you would need to purchase the Snow Leopard DVD. Following that you could determine how much further you could upgrade.
    http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard

  • IOS 8.0.2 update causing problems with wifi connectivity..please help

    latest update having problems ...please help..!!!!!!!!!!

    Just a quick snapshot of my chain of events.  I’m currently on my fourth iPhone 6 Plus 64GB here in London, UK. Every time I have spoken to AppleCare and told them that I have gone through all the Wi-Fi troubleshooting methods possible they have asked me to get a brand new retail replacement as I’m within my 14 day return period.  I’ve been experiencing the following issues:
    Wi-Fi disconnects and switches to 4G (Restart required for temp fix)
    Wi-Fi is still active but there is no traffic or activity– often when in sleep mode for long periods of time.  (Toggle Wi-Fi on/off for temp fix)
    Wi-Fi disconnects and cannot find any networks (restart required for temp fix)
    This has been occurring on both iOS 8 and 8.0.2
    The issues are the same on both my 2.4Ghz and 5Ghz networks
    This is affecting my ip6+ and 5s (5s used to work perfect on ios7 on same networks) – My MBP-R and all other devices run perfectly on my network.
    I spoke to AppleCare again yesterday and asked for their advice as its now my fourth iPhone in just under a month. This time they said that apple were fully aware of the Wi-Fi problem and that new repair tickets were not being raised for their engineers as they are already working hard to get this resolved. They also said they could see all the issues raised on the apple discussions boards which they usually don’t admit too! I asked what to do next and the advisor apologised and said this is clearly a software glitch and will be resolved in the next update. I asked for a timescale but unfortunately none was given.
    As stated above I have tried all the troubleshooting methods discussed on forums and on tech websites but the only thing that gives me a stable connection without any disconnects (especially on my 6 plus) is turning cellular/mobile data off when I know I’m going to be on Wi-Fi for a sustained period of time (e.g. at home or work). I appreciate this is annoying but it’s the best temp fix until an update comes out.
    Hope it helps everyone who is having issues with their devices that have cellular functionality.
    Any comments welcome

Maybe you are looking for