To keep an image in the Server

Good morning.
I am using Debian + tomcat + j2sdk1.4.2_10 + jfreechar-1.0.1 ...
I have a doubt on how adding a functionality. I have a page in jsp that loads an Applet, this Applet loads a Servlet which generates a graph with JFreeChart. This works correctly, but in the Servlet I have:
  response.setContentType("image/jpeg");
  OutputStream myOutStream = response.getOutputStream();
  JFreeChart myChart  = crearChart();
  int ancho = getParamEntero(request,"ancho",400);
  int alto = getParamEntero(request,"alto",300);
  ChartUtilities.writeChartAsJPEG(myOutStream,myChart,ancho,alto);
  ChartUtilities.saveChartAsJPEG(new File("/usr/local/tomcat/webapps/Usuarios/graph1.jpg"), myChart, ancho, alto);
  myOutStream.close();
Servlet separately works correctly (it keeps the image in the Server, in the indicated directory). And the Applet also works correctamente( It loads the Servlet and shows the Servlet), but what it does not work to me it is
ChartUtilities.saveChartAsJPEG(new File("/usr/local/tomcat/webapps/Usuarios/graph1.jpg"), myChart, ancho, alto);The image in the Server does not keep (when I do this with the Applet).
Somebody can say to me why does not keep the image?
Thanks.

Good morning.
I am using Debian + tomcat + j2sdk1.4.2_10 + jfreechar-1.0.1 ...
I have a doubt on how adding a functionality. I have a page in jsp that loads an Applet, this Applet loads a Servlet which generates a graph with JFreeChart. This works correctly, but in the Servlet I have:
  response.setContentType("image/jpeg");
  OutputStream myOutStream = response.getOutputStream();
  JFreeChart myChart  = crearChart();
  int ancho = getParamEntero(request,"ancho",400);
  int alto = getParamEntero(request,"alto",300);
  ChartUtilities.writeChartAsJPEG(myOutStream,myChart,ancho,alto);
  ChartUtilities.saveChartAsJPEG(new File("/usr/local/tomcat/webapps/Usuarios/graph1.jpg"), myChart, ancho, alto);
  myOutStream.close();
Servlet separately works correctly (it keeps the image in the Server, in the indicated directory). And the Applet also works correctamente( It loads the Servlet and shows the Servlet), but what it does not work to me it is
ChartUtilities.saveChartAsJPEG(new File("/usr/local/tomcat/webapps/Usuarios/graph1.jpg"), myChart, ancho, alto);The image in the Server does not keep (when I do this with the Applet).
Somebody can say to me why does not keep the image?
Thanks.

Similar Messages

  • How to upload a file which may contain text as well as image to the server using windows phone 8 application ?

    How to upload a file which may contain text as well as image  to the server using windows phone 8 application ?

    You're going to need to give way more detail about the situation before we can help.

  • Java Component to show the thumbnail of images in the server

    I would like to know what java component should i use to showt he thumbnail of images in the server. I am using netbean 5.5 and i cannot see if there are any suitable java swing component for this purpose. Please advice.
    n.b. I am writing a java applet application.
    Thank you.

    Please take time to understand the consequences of my response in http://forum.java.sun.com/thread.jspa?threadID=5173925&tstart=0 before going any further.

  • I can't use remote object in Flex to save an image to the server.

    I have a situation where I can't use remote object in Flex to save an image to the server.
    Could someone help me with an alterntaive?
    private function doSave():void {
                    var bd:BitmapData = new BitmapData(canvas.width,canvas.height);
                    var pe:PNGEncoder = new PNGEncoder;
                    bd.draw(canvas);
                    var ba:ByteArray = pe.encode(bd);
                    myService.doUpload(ba,sIP);
        <cffunction name="doUpload" displayname="Save Signature" hint="Saves a PNG Signature" access="remote" output="false" returntype="any">
            <cfargument name="sigbytes" required="true" type="binary">
            <cfargument name="ip_suffix" required="true" type="string">
            <cfset myUUID =  RandomString('ABCDEFGHIJKLMNOPQRSTUVWXYZ',15)>
            <cfset name = expandPath("converted_pngs/signature_#arguments.ip_suffix#_#myUUID#.png")>
            <cffile action="write" file="#name#" output="#arguments.sigbytes#" />
        <cfset SigFileName = "#arguments.ip_suffix#_#myUUID#">
            <cfreturn SigFileName />
        </cffunction>

    Try assigning binary arg to <cfimage/> then save.

  • HT201407 i restore my iphone and now it doesnt want to activate. it keeps on telling me the server cant be reach

    i restore my iphone and now it doesnt want to activate. it keeps on telling me the server cant be reach

    With everyone and their iDogs trying to update at the same time, things are gonna be a bit bumpy off the bat trying to update and/or activate.
    All anyone can really recommend is to keep trying or wait until a bit later, after the hubub has died down.
    Also might try this: http://support.apple.com/kb/ts3424

  • How to keep your email on the server after deleting from the phone?

    how to keep your email on the server after deleting from the phone?

    If this is a POP mail account:
    Settings > Mail.... > Your account > Advanced > Delete from server > Never.
    However, this will risk re-downloading as new mail
    IMAC  accounts mirror what's on the phone in the server, so deleting from the inbox on the phone will either send it to the trans folder on the server or leave it in the inbox but marked as deleted (depending on the server)
    Settings > Mail.... > your account > Advanced > Deleted Mailbox > On My iPhone Trash

  • HT1414 Since updating to iso6.0 I have had problems with my email exchange account syncing correctly - I keeps loosing connection with the server.

    Since updating to iso6.0 I have had problems with my email exchange account syncing correctly - I keeps loosing connection with the server.

    Are you losing the connection to iTunes on the iPad or the computer? You are saying that iTunes is updated. Of course iTunes is updated when you update the iOS software. That's a no brainer.
    If you mean that iTunes is updated on the computer, that has absolutely nothing whatsoever to do with downloading and updating apps on the iPad itself so changing the date on the iPad, signing in and out of the stores on the iPad .... Doing any of that on the iPad would have nothing to do with iTunes on your computer.
    If .... you have not been able to connect to the iTunes or app stores at all on the iPad - try this ...
    Settings>Privacy>Location Services>System Services (swipe to the bottom of the page to find this)>Location Based iAds>Off.
    If the downloads are stalled or "waiting" - try these suggestions.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    Make sure that you do not have a stalled download in iTunes - a song or podcast .... if you have a download in there that did not finish, complete that one first. Only one thing can download at a time on the iPad so that could be what is causing the problem.
    If you can't connect at all - you can also try rebooting your router. Unplug it from power for about 30 seconds and then plug it in again.

  • Keep getting connections to the server failed any ideals anyone

    Keep getting connections to the server failed when checking for my email using hotmail ideals anyone thanks

    You may think you are connected to the internet, but maybe not. Click on Safari and see if it connects.
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Is it possible to downsize a large image on the server side (before serving it to the user)?

    One of the banes of my existence is resizing the same image several times because of the various contexts it appears in. For example, the main image in an article will appear bigger than it will on the index page, where many article teasers are placed. Then there's the image that goes in the Facebook "share" og. Then there's... you get the idea.
    Same image, different contexts, lots of Photoshop resizing, lots of files to keep track of... but I save on bandwidth.
    On the flip side, I can target the same (large) image and simply downsize via traditional HTML (width/height) on the browser end, but that will mean downloading a file that is 50-75% larger than what is actually needed. If the front page teaser displays a 1280px image at 500px, that's a huge (and potentially costly) waste of bandwidth.
    HOWEVER...
    If I could do the same thing on the SERVER side... in other words, tell the server to take only the pixels it needs from the (large) image and serve only THOSE to the end user... then the same image could be used in each and every context, and only the necessary bandwidth is used.
    Is this do-able? If so, what is the process formally called, and where would I begin to learn how to do it?
    Thanks!

    That's amazing. I didn't think it was possible without saving files on the server first.
    This will suit my needs just fine, but allow me to push my luck even further with the following "hail mary" question : would it be possible for the server to serve the PNG with a width of 100% of the container? In other words, the behavior would mimic width=100% but the server would still only serve as many bytes as are needed to fill that space.
    Not only would I not have to create separate files for every resize (we fixed that problem with your suggestion) but I wouldn't even have to customize every link to a specific size.
    I'm not expecting an affirmative on this one, but it was worth asking. =)

  • SharePoint Foundation 2013 Prerequisite installer keeps installing and restarting the server

    Hi,
    I'm trying to install SharePoint foundation 2013 on Windows Server 2008 R2 Standard SP1.
    I already install SQL Server 2012 SP1 and TFS 2013 on the server.
    I don't have internet connection on the server so i install the next prerequisites manually:
    SQL Server 2008 R2 SP1 Native Client 
    Microsoft WCF Data Services 5.0 
    Microsoft Information Protection and Control Client (MSIPC) 
    Microsoft Sync Framework Runtime v1.0 SP1 (x64) 
    Windows Identity Extensions 
    Windows Identity Foundation (KB974405) 
    Windows Management Framework 3.0   
    Then I ran the prerequisitiesInstaller.exe from command line - 
    prerequisiteInstaller.exe /appfabric:[Full AppFabric Installer path] /KB2671763:[AppFabric update path]
    the prerequisiteInstaller start to run - after some steps it request for server restart, after the server upload the installer start again and after some steps it request for server restart.
    This loop is never ending.
    I tried to do some action to fix this issue:
     http://spreza.blogspot.co.il/2013/05/sharepoint-2013-prerequisite-keeps.html
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/bccdb9f1-dd91-4db1-bd19-6bfa658727f5/sharepoint-server-2010-setup-keep-asking-for-reboot?forum=sharepointadminprevious
    There is any reason or solution for this scenario?

    Have you checked the log to see at what point and what update is requiring the re-boot?  I suspect one of your manually installed pre-requisites may be an older version and when it restarts it starts the regular automated installer, which is causing
    the loop.  Check the log for more specific errors.  The installer creates the log in the following location %TEMP%\prerequisiteinstaller.<date>.<time>.log
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Is there a problem with iPhone update server, I can't seem to update my IOS on my wife's 3GS iPhone, keep getting message that the server is not reachable, yet I am connected to internet and had no problem syncing the phone or downloading iTunes software

    What's up with the iPhone update server. I have repeatedly tried in recent days to update the IOS software on my wife's 3GS iPhone but keep getting message that the iPhone update server cannot be contacted. The phone syncs normally and I am sure I am connected to the internet properly. Also I have successfully updated ITunes software during this same time frame.  What gives??

    Try this support document http://support.apple.com/kb/TS3694 and look at this section.
    Unable to contact the iOS software update server gs.apple.com
    Error 1004, 1013, 1638, 3194: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors: 
    Install the latest version of iTunes.
    Check security software. Ensure that communication to gs.apple.com is allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to a default hosts file. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.

  • I can't open Hotmail - it keeps saying connection to the server was reset. This started about 4 days ago before I upgraded to version4.

    I have been having trouble with hotmail for about 4-5 days.
    I enter my username and password but it doesn't sign me in.It keeps telling me the connection to the server was reset.
    I saw there was an upgrade to version 4 and so I installed it, hoping it would help but the problem is still there.
    I am also having trouble with some other sites including: deviantart.com and bookdepository.co.uk
    These sites all work OK on my work computer which uses IE.
    I have cleared all cookies and cache and checked for malware, but nothing has fixed this problem.

    Try to reload those web page(s) and bypass the cache.
    * Press and hold Shift and left-click the Reload button.
    * Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    * Press "Cmd + Shift + R" (MAC)

  • Keep rotate image on the top left of my panel.

    Hi,
    Does anyone know how to rotate an image but keep the image to the left upper corner of the panel? I am using affineTransform to perform rotation.
    Thanks.

    What's the problem exactly, does the image move from it's location? Does it not redraw properly? Please be more specific.
    Cheers.

  • Keeping an image on the screen while scrolling

    Hello,
    Needing some advice...
    Is it possible to keep an image at a static location on the screen when the page is scrolled down?
    For instance, if I have a .swf with properties of 1700 px height and I am displaying an image (jpg) in a loader whose y position is 40px from the top of the screen when viewed in a browser.
    is it possible to "float" that image so that it stays 40px from the top of the browser window when the user scrolls down to see the rest of the page?
    I'm trying to set up a gallery and have a grid of thumbs displayed, each of which open a full-sized copy of the image on the thumb.
    The thumbnails go beyond the bottom of the screen and when I scroll down to see more thumbs, if a large image is displayed at the time, it scrolls off the top of the screen.
    I'm hoping to keep that large image displayed in the center vertically even as the page is scrolled down.
    Any suggestions on how to approach this will be greatly appreciated.
    Thank you.

    as3:
    import flash.events.Event;
    addEventListener(Event.ENTER_FRAME,f1);
    ExternalInterface.addCallback("pixel", pixel);
    function f1(evt:Event)
    ExternalInterface.call("fonk1");
    function pixel(yyy:int)
    mc.y=yyy+150; // mc is your floating image
    html:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
      <title>Untitled-2</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    </head>
    <body>
        <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="1500">
          <param name="movie" value="Untitled-2.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <param name="swfversion" value="6.0.65.0" />
          <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="Untitled-2.swf" width="550" height="1500">
            <!--<![endif]-->
            <param name="quality" value="high" />
            <param name="wmode" value="opaque" />
            <param name="swfversion" value="6.0.65.0" />
            <param name="expressinstall" value="Scripts/expressInstall.swf" />
            <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
            <div>
              <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
              <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
            </div>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object>
        <script type="text/javascript">
    function fonk1()
      document["FlashID"].pixel(window.pageYOffset); //for IE:document.body.scrollTop
    swfobject.registerObject("FlashID");
        </script>
    </body>
    </html>

  • TS3899 I cannot send email from my ipad the message keeps saying rejected by the server but there is nothing wrong with my email account with talk talk as I am able to send email from my iPhone and laptop any ideas?

    My email won't send from my iPad.  It says the server rejects it almost immediately I press the send email button, although there is nothing wrong with my email account when sending from my laptop or iphone. I have cancelled the account and re-entered it but it hasn't made a difference? Anybody help?

    Hi Allan,
    Thank you for your help . The account used to work perfectly until recently, after receiving support from the provider, I deleted the account now I am trying to set the account again. 
    After putting in the first details (name, email, description) Cannot send mail the password or username for "mail.bigpond.com" is incorrect. I would expect this because the information I put in is not for Bigpond. So I press ok & I change the outgoing server (this is the one that is incorrectly labelled bigpond) to aapt, then I press save.
    Then it says "verifying" but comes up with Cannot connect using SSL do you want to try setting up the account without SSL. I press yes.
    Then I get the message "the POP server "mail.aapt.net.au" is not responding. Check your network connection & that you entered the correct information in the incoming mail server. (I ahve already checked this with aapt & it is correct.

Maybe you are looking for

  • My CSS Styles Panel in Dreamweaver won't show list of styles.

    Hello Everyone, I'm having a heck of a time getting my CSS Styles Panel to show the styles from my attached style sheet. Yesterday it worked as usual and today it doesn't. I feel like I've tried all of my options. Usually I work in 'All' instead of '

  • Problems installing 8.1.7 Enterprise Developer

    Hi, we got a new machine (Pentium IV, Win2k, SP2) and I can't install this Oracle version. The setup program doesn't even start. On the previous machine (Pentium III, Win2k, SP1) there was no problem. So I installed the new machine without SP2 but th

  • [SOLVED] How can I install libstdc++-libc6.2-2.so.3 for Eternal SPU?

    I know I need to add a repository using yum-config-manager --add-repo but I don't know what repository? I tried searching google for the debian repositories but I could not find an appropriate url. Can I even use yum in arch? Last edited by SteveDeFa

  • Multi Media Files

    I recently got a new computer and downloaded the update for my Palmone Tungsten E2. I was able to HotSync and everthing tranfered, however, when I try to open my media files on Palm Desktop, they won't open. It just sits there spinning and saying tha

  • Max channel input with Firewire

    I have been working with GarageBand for some time and will be soon be upgrading to Logic and a new iMac. I need to know how many inputs can I run through a firewire. I would like to daisy chain two PreSonus FP10's and my current Alesis MultiMix8 toge