Best practice?-store images outside the WAR file?

I have an EAR project with several thousand images that are constantly changing. I do not want to store the images in the WAR project since it will take an extremely long time to redeploy with every image change. What is the best practice for storing images? Is it proper to put them in the WAR and re-deploy? Or is there a better solution?

Perryier wrote:
Can you expand on this? Where do they get deployed and in what format? How do I point to them on a jsp?
I am using Sun Application server 9.0, and I don't really think this has a "stand alone" web server. How will this impact it?You could install any web server you want (Apache?). The request comes in and if the request matches something like .jpg or .gif or whatever, you serve up the file. If you have a request for a jsp or what not, you forward the request to the app server (Sun App Server in your case). i.e. your web server acts as a content-aware proxy.

Similar Messages

  • J2EE, possible to serve clients jsp files that are outside the war file?

    Hi, I was wondering with a J2EE webserver if it was possible to serve clients webpages from jsp files that were outside the client.
    For example say you got your war file in the auto deploy directory on the server and also on the server you got a directory full of jsp files that could be accessed by the webserver just like normal jsp files inside the war file?
    ...I want to do this because I want to be able to add jsp files without rebuilding the war file.
    ....Or is it possible to make the webserver rebuild itself, eg to add or remove files?
    Thanks

    If you are using a S1WS6.1, please try to find a line with WEBAPP in server.xml.
    You should find a line like this.
    <WEBAPP uri="/simple" path="/opt/SUNWwbsvr/https-test/webapps/https-test/simple" enabled="true"/>
    The path parameter shows the directory where the S1WS refers to when the webapplication is executed.
    You can put a jsp into the directory and modify it accordingly.
    Please refer to the following docs. They might help.
    http://docs.sun.com/source/817-6251/pwadeply.html#wp25317
    http://docs.sun.com/source/817-6251/pwadeply.html#wp25890
    thanks,
    -Yuji

  • How To Access a jar file present outside the war file through a jnlp

    Aoa
    I m new to this forum
    I m having problem with my jnlp file
    i want to know is there any way to access a jar file through jnlp.The problem is that my jnlp file is present in the war file
    and i want to know how to acess a jar file through this jnlp.The scenerio is as below
    I m using ear file on jboss.Its hirerchy is as
    -PAN-war.war
    -launch.jnlp
    -PAN-app-client.jar
    my jnlp file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/" href="PAN/launch.jnlp">
    <information>
    <title>PanEmirates</title>
    <vendor>M Fazal Ur Rehman</vendor>
    <description>PanEmirates</description>
    <description kind="short">PanEmirates</description>
    <homepage href=""/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="PAN-app-client.jar" download="eager"/>
    <jar href="lib/javafxrt.jar" main="true" download="eager" />
    <jar href="lib/Filters.jar" download="eager"/>
    <jar href="lib/javafx-netbeans-fxuserlib.jar" download="eager"/>
    <jar href="lib/swing-layout-1.0.3.jar" download="eager"/>
    </resources>
    <application-desc main-class="net.java.javafx.FXShell">
    <argument>pan.Main</argument>
    </application-desc>
    </jnlp>
    when i run launch.jnlp file it says unable to download resource http://localhost:8080/PAN/PAN-app-client.jar
    how to access this jar file
    Any help or comment would be highly appreciated
    Regards
    M Fazal Ur Rehman

    Excellent question. I don't see any client-jar in your EAR file structure. So I am assuming you are writing a separate client application which will talk to the ejbs deployed as part of this EAR. You need to do the following:
    Write another EAR file with the following structure:
    ear:
    META-INF/application.xml
    util.jar
    client.jar
    client.jar should have a META-INF/MANIFEST.MF and that should contain Class-Path:util.jar and value for Main-Class attribute.
    Now deploy this new ear to your application server and execute it using Application Client Container that comes with your app server.
    If you don't want to write another EAR file, then bundle th client.jar in your original EAR file.
    Points to note are:
    you have to repackage util.jar again inside this ear file.
    For portability reason, you should use Class-Path manifest entry in client.jar. Refer to http://java.sun.com/j2ee/verified/packaging.html and J2EE platform spec section #8.2.
    Hope this helps,
    Sahoo

  • Static resources outside a WAR file

    Hi, we have packeged our application/components as a WAR file, but due to the nature of our application we continuously get new images (related to news articles). We want to keep these images outside the WAR file. Does anyone have any suggestions to how we can do that?Eirik
              

    Usually "./" at the beginning of a path is unnecessary, since "." means "current directory". Did you mean "../images/update_button.gif" instead?

  • How to open a document out side the .war file

    Hi all,
    I have initially stored a document outside the WEB-INF in the .war file to retrieve it from a jsp file of the same war file. But now the file has been stored at a location on the same server and outside the .war file. how can I retrieve the file path and location outside the war file from the jsp. I ve previously used the following code when retrieving from a directory "docs" of the same .war file as:
                      <td  class="FormLableLeft"><a href="#" onClick=window.open("/docs/<%=colData.get("DOCUMENT_NAME")%>")><%=colData.get("File_NAME")%></a> </td>please suggest me how to retrieve the document located outside the war.

    Create a servlet which reads the file from the local file system and writes it to the outputstream of the response after having set the response headers accordingly. Then simply call that servlet by URL along with the file ID as request parameter or pathinfo. You may find this example useful: [http://balusc.blogspot.com/2007/07/fileservlet.html].

  • How to store image in the oracle database 10.2. using File Maker 10.

    Hi.,
    I want to store image, media file in the oracle database using File Maker as a front end.
    I connect Oracle using odbc from file maker. There are table and in that table there a column "pict" of blob type. but this column is not showing in the file maker.
    2. Here I can not change the data type of any column.
    Now how to store images in the oracle table using odbc or any other tool.
    Regards,
    Shyam

    I wrote an example for my students, you can find it here. It's using PHP as the front end but all you need to do is know how and leverage the stored procedures. All code is downloadable in zip files from the blog.
    http://blog.mclaughlinsoftware.com/php-programming/oracle-lob-processing/

  • Problems while accessing images outside the web document-root folder

    Our application runs on Oracle application server on Linux. Facing problems while accessing images outside the web document-root folder. This works with changes in global-web-application.xml by including the <virtual-directory> tag. The same change does not work when done on Linux machine. It is unable to find the image. Please help in resolving this issue.
    </locale-encoding-mapping>
    </locale-encoding-mapping-list>
    </web-app>
    <virtual-directory virtual-path="/img" real-path="/home/eposuat/" />
    </orion-web-app>
    Code in the jsp:
    <img width=700 height=700 src="/img/3.tif"></img>
    <img width=700 height=700 src="/img/WB.gif"></img>

    This is one of the least satisfactory aspects of site management in Dreamweaver, and several developers, including myself, have been pressuring the Dreamweaver team for some years to improve this. Who knows? They might eventually take notice.
    The only way to do this at the moment is to create two site definitions, one nested inside the other. Set up the site definition normally based on htdocs as your site root. Then create a new site definition based on site. Dreamweaver will nag you that it can cause problems, but it won't actually stop you from doing it. The only potential problem is with site synchronization.
    The problem with using site as the only basis for your site definition is that Dreamweaver automatically puts things like the Connections, Scripts, and other folders in the site root. So, everything ends up at the wrong level of the site hierarchy. Quite frankly, the whole thing is a bit of a pain. Dynamic site development was added to Dreamweaver only in version 6 (Dreamweaver MX), and no one had really thought through the need to store files outside the site root.

  • Best practices for image compression in dps

    Hi! I have been reading up on best practices for image compression in dps, and I have read that the source assets of panoramas, image sequences, pan and zoom images, and audio skins are not resampled on upload. So you therefore need to resize them and compress them before dropping them into your article, because dps doesn't do it for you. Okay can do!
    So then Im also reading that the source assets of slideshows, scrollable frames, and buttons ARE resampled as PNG images. Does this mean that DPS will compress them for you when you build the article? So does that mean I shouldn't bother going to the trouble of resizing these images at all? I can just pop in the 15mb 300dpi files used in the print magazine and dps will compress them upon building the article - and this will have no affect on file size?
    And this is also the case with static background images?
    Thanks for your help!

    All images are automatically resampled based on the size of the folio you make. You can drop in whatever resolution image you want, it doesn't matter.
    Neil

  • Accessing images outside the application

    Hello!
    I've been developing a web app as a part of my learning of JSP and now have stumbled onto a problem I haven't been able to Google out yet. Maybe I'm missing something, but here goes...
    The app I'm developing is in Croatian and I've had a first test run on my server today, here: http://mapper.domagojpolovic.com/noviMapper/
    All the graphics you can see are included in the WAR file. The problem is... I'm planning on adding more features in future releases, but all the images and previews are in the WAR file. Which means, when I'm updating the app, I need to replace the WAR on the server with an updated version (is that correct?). For just one alteration in one file I'll have to reupload everything (?). All the images and previews.
    Is there a way to just replace the file you've updated like you can do it with PHP?
    Thanks in advance! :)
    Edited by: 915453 on Feb 18, 2012 3:34 PM

    Actually that won't work. You are sending an URL to the client on where to find the image.
    You can send any URL you like, but If the client cannot access that URL, then they cannot see the image.
    In this case file:// tells it to look on the local machine - which will work on your machine, but on noone elses.
    There are good reasons why you are not allowed to access stuff outside of the web app directory via HTTP. Put the image in an accessible place.
    Cheers,
    evnafets

  • Best practice with respect to wcf configuration files for SSIS

    So after reading a lot of posts and blogs on how to configure SSIS to read from configuration files , I am still not clear and would like any expert to provide a definitive stance. In my case the WCF service consumption is wrapped into a separate assembly.
    I am referencing the assembly in an embedded C# script within my SSIS package.
    When I make the helper class call to the webservice , I get the endpoint not found WCF exception.
    Keep in mind I am running this from VS 2012 IDE and did the following to make sure the WCF call works:
    1. Googled and found that you need to have config entries in DtsDebugHost.exe.config file. But it still did not work
    2. Had the same entries in the associated app.config file for C# script but it still did not work.
    It seems like SSIS is very fragile w.r.t consuming WCF entires in a config file. Is the best practice to just have the end point created in code and externalize the end point as a SSIS variable / xml file or is there really a way to get these config files working.
    Attached is the wcf snippet of my config file.
    <system.serviceModel>
    <bindings>
    <basicHttpBinding>
    <binding name="ITransactionProcessor">
    <security mode="TransportWithMessageCredential" />
    </binding>
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor" binding="basicHttpBinding" bindingConfiguration="ITransactionProcessor" contract="CyberSource.ITransactionProcessor" name="portXML" />
    </client>
    </system.serviceModel>
    SM

    I have the code working without use of config files. I am just disappointed that it is not working using the configuration files. That was one of the primary intents of my code re-factoring. 
     Katherine
    Xiong , If you are proposing this as an answer then does this imply that Microsoft's stance is not to use configuration files with SSIS?? Please answer.
    SM

  • MMO best practice. Download music and heavy files to users hard disk?

    MMO best practice. Download music and heavy files to users hard disk?
    I have just downloaded a Hello Kitty MMO app for research (for my kid of course).
    I am developping my English teaching app with LOADS of classical music, mp3 sentences and heavy background bgs. Would the best idea be for client to download these to their hardisk ie I would not need to stream them and therefore save a fortune on bandwidth charges from my ISP???
    Cheers

    I see what you mean ie: they have to get the file to their computer one way or another BUT
    a. If they are going to repeatedly use that file ie: a custom cursor or classical piece of music every week when they log on then it would be better for them to have it on their hardisk wouldn't it? If not, they would have to download it every time they log on. I take it that's why the hello kitty site makes you download 130 megas so you have everything on your hardisk, ie: you will be reusing all those assets MANY times in the future. The experience wil be very FAST as you have it on your local disk and needn't have to wait for streaming.

  • I didn't get log statements in console after deploying the war file IN WAS6

    I am new to web sphere 6.o server, I didn't get log statements in console after deploying the war file into the WAS

    Albenn
    Welcome to the Apple user discussion forums
    I'll hit a few of your questions - others will have to do others since I'm not up on some of the issues you ask about
    4) is there an easy way to review/delete items (in 6, i run a basic slideshow and delete on the fly -- is this still workable in 7?)?
    Yes
    5) Are there significant functionality benefits of 7 over 6 (e.g., does the noise function or shadow/highlight really offer significant benefits? The Events seems obvious, but I'm more interested in "under the hood" experience
    Yes
    Loseless editing - web galleries - events
    a) Is import any faster? As my library is growing in size, the import is getting overly slow
    It is fine for me (only you can compare to your current) - I have 20542 items using 26.3 GB in 271 events
    7) Is there a full-screen edit mode?
    yes
    8) Can you configure events so that it's not just by day?
    yes
    9) Is 6's "roll" structure as mirrored in the file system still available in the Events approach, or is the database structure that once you've converted a library, there's no going back?
    Events replace rolls (if your rolls are named - NOT the default rollxxx name - they will come across as is - to me events are rolls with much more capability and a new name - some people are VERY putoff by the change (but most love it) for reasons that I simply do not comprehend
    10) What is the effective (or advised) maximum library size? I've probably got over 60GB of images in my libraries now, with 20,000 images or so. If 7 can readily digest them (and preserve all my albums, etc.), then I'd love to combine them into one, unless that will kill performance, make the database unstable, drive backups into interminable waits, etc.
    The advertised max is 250,000 photos - I have about the same number of photos as you in about 1/3 the space - there are a few users here with libararies your size. With iPhoto Library Manager it is easy to maintain multiple libraries if you choose
    LN
    Message was edited by: LarryHN

  • Do i have to pack all files into the war file/

    Hi,
    suppose a file (say bb.html, for example) within a war has a link to a document outside the war, say c:\aa.doc for example, after deploying the war into the j2ee application server, the linked file cant be found, simply because the file(aa.doc) isn't packed with bb.html. I am wondering if there is a way that I can establish the link, even they are placed in different location.
    to exend the question, in my understanding, the web container within the j2ee application server is a Tomcat run evironment, do I need to connection the applicaiton server to one of web servers like appache web server, IIS etc to get better preform? if yes, how?
    Can anyone give some explanation please?
    Thank you very much!
    Ken

    No they do not have to be packed into the same War file.
    The application server does have to know where they are so that it can handle requests for a given "html" file.
    For example: "bb.html" was found in the war file you deployed.
    it links to "aa.doc" - where is the directory or war file that contains "aa.doc"?
    It too needs to be "deployed" within the server in order to be found.
    I hope this helps.

  • Error in deploying the war file on to the weblogic server(6.1)

    Hi,
    I created the war file and tried to deploy it on the weblogic server 6.1 it is unable to deploy and is give these errors i am unable to find out the problem.Can any one help me out in finding why this is so.
    Help will be appreciated
    java.lang.NullPointerException
         at weblogic.management.internal.MBeanProxy.getAttribute(MBeanProxy.java:253)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:187)
         at $Proxy65.isDeployed(Unknown Source)
         at weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:744)
         at weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManager.java:206)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy5.update(Unknown Source)
         at weblogic.management.console.webapp._domain.__upload_app._jspService(__upload_app.java:149)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:241)
         at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
         at weblogic.management.console.actions.ForwardAction.perform(ForwardAction.java:35)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Thanks,
    Reji

    Hi jmendelak,
    In the warfile i have jsp,servlets,java classes.
    In my working directory i have jsp and html files and in web-inf folder i have a folder by name classes in which i have the servlets and java classes.
    I made the war file and when i tried to deploy i was getting this error.
    I had previously deployed this war file on weblogic6.1 it was working fine.
    I have upgraded my operating sytem to Windows2000 professional from WinNT 4.0.I reinstalled the weblogic again and had set up the environment variables.
    After going through the error could you find out the reason?Is it because some seeting is missing?
    Raji

  • Multiple images of the same file on one page

    How do I create multiple images of the same file on one page? For example, I've got an image that I could fit 6 of on one page, and would like to print it that way instead of printing it on 6 individual pieces of paper.

    Are you attempting to do this in Adobe Workspaces? Or are you looking for software that will do it?
    If the former, you could insert the image into a Buzzword document six times. Not exactly elegant, but it might do the trick.

Maybe you are looking for

  • How do I open a PhotoShop CS6 download with a .7z file extenstion

    Downloading, Installing, Setting Up downloaded Photoshop CS6 from adobe and now it's asking me how I want to open the file and gives me various options such as the store, paint, windows photo viewer etc?

  • EBS R12 RAC Clusterware Installation.

    Hi hussein/helios The Oracle support has installed a RAC on our EBS Prod server but it was a POC(proof of concept) only. So the name was TEST RAC instance. Now, we want to install the final config setup named PROD following the docs he made on the TE

  • Account statement printing - single spool requests

    Dear SAP experts, We would like to use print program RFKORD10 for correspondence type SAP06 (account statements for customers) to print account statements for a range of customers, so in mass processing. I see that the standard behaviour of the progr

  • What is the best option for storing my iphoto library on the cloud?

    I was curious as to what people are doing (other than backing up to external HD) for backing up the iphoto library?  Anyone using any cloud solution out there for storage?  What are some of the best options?  I have around 30,000 photos in my iphoto

  • Creative Zen - how to order playlis

    I just got the new creative zen but I can't figure out how to order the playlists. When I create a new one, it orders it alphabetically. In media explorer, if I drag/drop it to a new place, it doesn't fall into the new position, it adds all the songs