File URL on page

Hi,
How to set file path / url on a web page to be loadable / viewable?
for example, I have a file on the server:
c:\files\foo.jpg
and I want it to be loadable from the web page, but the application
runs from:
c:\Jakarta\tomcat\webapps\myapp\
On the web page I have:
<a href="<%=(String)files.get(i)%> target="attachmentPopup" title="Click to open"><%=(String)filenames.get(i)%></a>
but the URL then points to current user`s local filesystem, not to my server...
Thanks in advance!
Regards,
Eki

hmm, is it possible to open a filestream and output it to response object somehow?!
for example, the user clicks the file link on the web page, it forwards the user to a file.jsp page that has code to open that file, get the outputstream for it and output it to user...somehow ??
any advice?

Similar Messages

  • When exporting files to web pages Aperture keeping losing files, so for instance, if I choose to export 600 images to a new web page, it might do 524 images but not the full 600. I've tried resetting Aperture, it's the latest version etc etc. Help please!

    If anyone can help me with this I would be seriously grateful.
    When exporting mutliple files to web pages Aperture keeping losing files, so for instance, if I choose to export 600 images to a new web page, it might make 524 pages but not the full 600. I've tried resetting Aperture and its persmission and am using the latest version of 3.
    I have 3600 images which I need to upload as sublfolders, each with their own URL and at the moment Aperture is dropping of anything from 1 to 90 images.
    This is critical as people need to see each and every on of these images online. So if a file has 600 photos in it, Aperture should make a URL with 600 full image pages. And this is what it's not doing. On small files, say 30 or so it seems to work well, it's when it gets to more than that the problem starts.
    I've used Aperture in the past under previous versions and not had this problem.
    Any help would be great.
    Thanks.
    Bob.

    Hi Jack,
    Thanks for responding (as it seems as though no one else has been able to provide any insight as of yet)! Not sure if you saw my recent post, but the version of Aperture on the 2008 MacBook has been upgraded to 3.1.2 (not sure how; I bought it in 2009, but only have OS X 10.5.8... which apparently can't house 3.1.2 of Aperture, but hey, like many other anomalies i'm encountering, I'm no longer surprised!). I am unable to upgrade it any further, as it warns me that my OS X does not fit the requirements. I exported the projects as libraries; however, like I posted before, apparently these are from too old of a version for the new Aperture (3.3.1) to handle and import.
    It's getting to the point where I'd almost pay to upgrade the OS X on my previous MacBook (10.5.8) to something newer in order to THEN update Aperture to a newer version; however, my previous MacBook simply cannot handle this (the specs are awful -- hence my decision to save up and upgrade to the newest MBP with Retina).
    I've spent hours upon hours transferring files, libraries as projects, previews, versions, even masters (though, apparently some of them aren't accessible?) with no luck. I've rebuilt the library and reprocessed everything. And this is all after having to return one MBP already since Aperture 3.3.1 is glitch-y as it is, and froze everything for having a "managed library". So, now that I know that I have to deal with a referenced library in Aperture... I just need to actually transfer my previous library to my new one (hopefully WITH adjustments since these are years worth of photos and work).
    Again, any help is appreciated. I've lost enough sleep, time, and vision health over this at this point.
    Also, I know Migration Assistant is an option, I was told that it wouldn't work properly anyway because of the different operating systems, and the potential for problems.

  • Unable to read a resources file from my page

    Hi,
    I am trying to read a file from the project resources and I can't have access to the physical file. I have the following code in my page:
    javax.faces.context.ExternalContext ec = this.getExternalContext();
    URL url = ec.getResource("/resources/displayPassengers.xsl");
    InputSource inputSourceXSL = new InputSource(url.toExternalForm());
    InputStream inpStreamXSL = null;
    if (inputSourceXSL.getByteStream() != null) {
    log("Loading xml file: " + url.toExternalForm());
    inpStreamXSL = inputSourceXSL.getByteStream();
    } else {
    log("Unable to extract URL from Page context: WEB-INF/displayPassengers.xsl");
    The url is not null.
    The inputSourceXSL is not null and inputSourceXSL.getByteStream() is always null.
    Please let me know how to access the file.
    Rgrds.

    this should work
    InputSource inputSourceXSL = new InputSource(url.openStream());

  • Problem with file:/// URLs in Safari 2

    I am seeing some confusing behaviour with file:/// URLs: a very simple HTML file with that type of link works as expected (opens the nominated folder) when loading it as a local file from my disk, but when I put it on our web server and retrieve it from there, nothing happens when I click on the file:/// link.
    This is happening under Safari 2.0 on OS X 10.4.2 (cross-tested on a brand-new iMac), but by comparison does not happen under Safari 1.2.4 under OS X 10.3.8 on an old eMac.
    The HTML source as viewed in the browser when loading it each way is identical:
    Go here: link
    Has anyone else seen -- and hopefully resolved -- this?
    Thanks,
    Robert

    I tried clicking on the link and nothing whatsoever happened. So I tried a control click and selected "Open Link in new window" and a new window opened, followed by the Utilities folder opening. I made a test.html file with the link in it, put it on my startup drive and it worked as expected, and ditto for putting it on a second internal drive. I then put it on my iDisk and navigated to it thru its web site address of
    http://homepage.mac.com/francines/testlinks.html
    and discovered that the two other "local" operation links (to launch ScriptEditor) both worked, but the open folder link no longer did, except by using control click and choosing either "Open link in new window" or new tab. A new Safari window or tab opens, then the Utilities folder opens.
    I then tried the page in Firefox, and it didn't work AT ALL, not even with new window or tab. I then tried Mozilla and Netscape. Same deal. The ancient Internet Explorer opened the Utilities folder inside a new browser window rather than the Finder. This might be a clue as to why the link doesn't work as expected, but unfortunately I don't know what it means.
    Francine

  • How can i render a dynamic html file in jsp page

    Hi everybody,
    i am trying to render a dynamic html file in jsp page with the result of querying a database.
    The response of the query is a xml document. And i have a stylesheet to transfer it to html.
    How can i render the html in a jsp file?

    I am using below code for HTML files
    private var appFile:String="index.html";
    if (StageWebView.isSupported)
                        currentState = "normal";
                        webView.stage = stage;
                        webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                        var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                        webView.loadURL(fPath);
                        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                    else {
                        currentState = "unsupported";
                        lblSupport.text = "StageWebView feature not supported";
    above code is working fine for me.

  • How to disable security block on intranet file:///// urls?

    I have the latest version of firefox esr and im trying to remove the security blocks which stop it from opening file:///// urls on our intranet website.
    Can anyone tell me how I can disable the feature and get it to open the urls with the relevant program (a folder share windows explorer, and any other document to use the windows default program list).

    Hello,
    Please check if the links below help you in configuring opening of file:// URIs. Please do note that FF does support file:// URIs out of the box, provided the format is set properly
    *[http://superuser.com/a/103030 Open file:// URIs in Firefox]
    *[http://kb.mozillazine.org/Firefox_%3a_Issues_%3a_Links_to_Local_Pages_Don%27t_Work Firefox local pages]
    Hope this helps.

  • Browser links return "Could not load file/URL specified:"

    The JWS application manager works great, but the links in my browser return an error saying "Could not load file/URL specified:" followed by the path to my temporary internet files. Why does JWS, through my browser, always look to my temporary internet files? I go to the demo page at http://java.sun.com/products/javawebstart/demos.html and any link there returns the same error. The JWS app manager will download and run the demo's just fine, which makes me think there is something wrong with my browser. I am running the following:
    JWS 1.2
    JRE 1.4.1
    IE 5.50
    Any help at all would be greatly appreciated.

    often your browser cache may get corrupted for certain sites/pages... your best bet is to clear your cache and try again... you could also change the settings for how long to keep your cache before re-loading as fresh... :-) it's a shame that this happens, but other than what i have suggested, i don't know any other work-arounds...

  • .swf file in html page with WebLogic Server in Netscape

    I am not able to embed .swf (flash) files in html page when accessed thru' Weblogic server in Netscape Ver. 5 and below but supported in Netscape6.0 and IE. When run as html page without WebLogic server, it is working well. Please suggest a solution for this problem to my mail id.

    I've had a quick trawl round the web, but can't find an answer to this specific problem - will let you know if i discovr anything.
    Lots of people seem to have problems because the relative url address has to be in relation to the html page, not the loading swf. All my files are in the same folder, so it;s not that. Also, the problem occurs whether running from my hard drive or web server.

  • Page URL and Page Name in Enterprise Wiki

    Hello,
    I have a problem with the page URL and page name in our Enterprise Wiki. Parent and subsite locales are Turkish. My problem is, when I add a page in Enterprise Wiki and give it an English URL, the page Header is written in English and when I give a Turkish
    URL, the page header is written in Turkish. What I want to have (and I think the right way) is to have the URL in English and the page header in Turkish.
    To clarify my question, I will create a page with a Turkish name and URL. I will name it "Türkçe Tanıtım" (which stands for Turkish Demonstration), using Turkish characters. Then the URL becomes:
    http://mysite.com/Pages/T%C3%BCrk%C3%A7e%20Tan%C4%B1t%C4%B1m.aspx
    And the page header is "Türkçe Tanıtım", which is normal, as expected:
    If I change the page URL to look correctly, using English characters only, it looks like "TurkceTanitim." The URL becomes "tidy" (http://mysite.com/Pages/TurkceTanitim.aspx) but the page header also becomes "TurkceTanitim",
    which is not correct in Turkish:
    What I would like to have, and what I think it should, is to have a URL completely in English (http://mysite.com/Pages/TurkceTanitim.aspx) but have the page header in Turkish (Türkçe Tanıtım). I am sure this could be done in SharePoint, I/we are missing
    something but I don't know what.
    Can you give me a hand on this?
    Thanks in advance,
    Tolga

    Hi Tolga,
    I understand you would like to change Wiki page title but not page name in url.
    The title of the Wiki pages is always linked to the actual file name of that certain page. To get the use out of title property we have to manipulate the page template for the Wiki pages.
    Please refer to the article below and edit "/_catalogs/masterpage/EnterpriseWiki.aspx" in SharePoint Designer:
    http://social.technet.microsoft.com/wiki/contents/articles/17557.sharepoint-2013-change-page-title-in-wiki-sites.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Can links from InDesign or InCopy Articles use non-file: URLs?

    I am trying to determine if InDesign CS6 or newer provides any way for links to be to URLs that are not file: URLs. For example, I am using a CMS that provides HTTP access to images. I would like to do something like:
            <Link
              Self="uf3"
              AssetURL="$ID/"
              AssetID="$ID/"
              LinkResourceURI="htp://myrepository.com/resource/binary/myimage.jpg"
           />
    My experiments suggest that this will not work but I'm hoping I've overlooked something.
    Another wrinkle is authentication: for access to the CMS the URLs need to be authenticated, which means InDesign would need to get then authentication information on at least first resolution.
    Is there a way to do this out of the box? If not, what would be required in terms of plugin implementation or library deployment to enable it? Back in CS3 days we were able to use some unsupported libraries to get URL resolution working but it would be nice if it worked out of the box.
    Thanks,
    Eliot

    As far as I know there is nothing new in CS5 (or CS4 for that matter) regarding which styles are retained when exporting frames to InCopy. If you're exporting an individual story (text frame) from ID to IC, the only styles in that ICML file will be the ones used by the text in the story. If there's no text in the story -- you're exporting an empty frame -- then the ICML file won't have any styles.
    It's been this way as long as I can remember.
    What you need to do in InDesign is keep some fake text in the text frame to which you've applied the styles you want the InCopy users to use. Export that, then in InCopy, open it up, delete the text, and the styles will remain. Now you can save it as an actual InCopy template file (ICTD? something like that) from the Save As menu, and when IC users open it, it'll create an untitled, empty copy of the starter InCopy document with all the styles.
    In a non-Woodwing workflow, InCopy users open the actual INDD file and so have access to all the styles, even if the story frame they want to work on in that layout is initially empty. Or, they can import (Load) all the styles from an InDesign doc into their standalone InCopy file from the InCopy Paragraph Style panel menu (Load All Styles).Not sure if you can do the latter w/Woodwing.
    I was pretty sure that Woodwing had a different way of creating InCopy templates, something like InCopy article templates? Not sure.
    AM

  • Display data from CSV file in iWeb page

    Hi,
    I like to display data from a CSV file in iWeb page if a date value from CSV file matches todays value from the system. Here is an example.
    CSV data values
    01/20/2011,Sunny,87
    01/21/2011,Cloudy,100
    01/22/2011,Rainy,60
    If today's date value is 01/21/2011 the page should display 01/21/2011 Cloudy 100 in a tabular format.
    Appreciate your help in providing HTML code for this issue.
    Thanks

    I suspect there is a soft return in the excel database somewhere that can't be seen. Take the csv/txt file into notepad and look for a line that starts oddly compared to the others.
    I haven't had luck removing soft returns from excel files so I do this a rather odd way. I take the excel file into InDesign as a table, and then use find/change to replace any soft returns with nothing, then convert the text to table and then export the text out again by going export, and selecting text from the dropdown menu.
    For my money, I always save tab delimited text files from excel so that if a field does contain commas, it doesn't "trick" indesign into thinking a new field is beginning or not... instead the field delimiters are tabs and they are unlikely to have been used in the excel database.
    If you do choose to use this indesign import method of mine to clean up the database, i also noticed two things in your screengrab: first was that some fields have spaces at the start of the text... easy enough to fix with a GREP that looks for ^\s (start of a sentence followed by a space) and replace with nothing. The second thing is the T&C field that all entries (at least in the screengrab) all start the same – if all entries in the database start the same, couldn't that line be in the indesign file? Its only a small detail I know.

  • Reading file from a folder : File dir = new File(URL+aFile_to_add);

    Hi,
    Trying to read files from a dir on my site using a JSP and bean. I've tried nearly every option for the filepath I can think of and it doesn't seem to be finding the file...
    Here's the bit:
    String URL = "images\\wedding_photos\\";
    File dir = new File(URL+aFile_to_add);
    String[] files = dir.list();
    It's working locally, but I obviously had to change the path from c://... to the above.
    The full code is listed below in the addWedding Method
    The method removes the .jpg from the file name and then writes the new file name to a database
    Thanks for any insight.
    Regards
    Jim
    public String addWedding(String aFile_to_add)
    String feedback = "unset in scrubWedding";
    try
    String URL = "images\\wedding_photos\\";
    Class.forName("org.gjt.mm.mysql.Driver");
    java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:mysql://localhost/rhwedd2_shop?user=**********&password=*******");
    java.sql.Statement statement = connection.createStatement();
    File dir = new File(URL+aFile_to_add);
    String[] files = dir.list();
    if (files == null)
    feedback = "Sorry, couldn't find the file "+aFile_to_add+"...no files have been added.";
    else
    for (int i=0; i<files.length; i++)
    // Get filename of file or directory
    String filename = files;
    String no_extension;
    //convert string array element into a char array
    char [] charsfilename = filename.toCharArray();
    int newlength = charsfilename.length -4;
    no_extension = String.valueOf(charsfilename,0,newlength);
    filesAdded = filesAdded+", "+no_extension;
    // Show the new file names in stack trace without extension
    //System.out.println("String no_extension " + no_extension );
    statement.executeUpdate("INSERT INTO items VALUES ('"+no_extension+"',5,'"+aFile_to_add+"')");
    // write to table with item_id and weddingid
    feedback = "The following files have been added..."+filesAdded;
    if (statement != null )
    statement.close();
    if ( connection != null )
    connection.close();
    catch(Exception e)
    feedback = "Into the catch";
    e.printStackTrace(System.err) ;
    return feedback;
    }//end addWedding

    String URL = "images\\wedding_photos\\";
    File dir = new File(URL+aFile_to_add); ok, ok, I'll answer...
    1) What gives you the impression that the relative directory "images\\..." exists (or, in other words, what makes you think your current directory is the parent of "images"?

  • How come pages won't open PDF files made by Pages?

    How come pages won't open PDF files made by Pages?
    I have files I made with Pages and exported as PDF but I can't open them with pages to edit?
    Also, where are the recent files created by pages located? Can't find those to open either..

    Hi Tom,
    I was delighted when I signed up for Pages. Clunky yes, but it worked. I've been a graphic designer on a Mac for 25 plus years and have logged too many horror stories of "upgrade" wars which cost me massive lost time, data and money forcibly extracted just so I could finish a project.
    When I first used Pages in April of 2012? or there about, I was able to open Word documents exported to .pdf format, emailed to me, which I then dragged into Pages. I could make the changes I needed to make, export as a .pdf, return it back to my client which they could then edit on whatever it was they were using. I'm not a neophyte with this. I've had Original Photoshop as a stand alone, Quark (which locked users out 6 months after I purchased it.) Quark again, Freehand, Pagemaker, Illustrator, Photoshop again, Creative Suite for several upgrades, Acrobat Pro. 2 years ago I lost 6 years of Quicken data and had to and "upgrade" start over. This last go around I  had to "upgrade" my Apple ID - yes I had 2 on purpose, lost my Pandora One and my ability to get into the Tulsa County Library website.
    At this point, I'm retired and feel like what I've paid for in the past should WORK today. I have a 100+ page cookbook in Quark which I was able to export as a .pdf, that I've lost the tags too, Easier to start over. I have artwork that is hundreds of megs in Photoshop. Not the least bit interested in anybody's "cloud".
    Thanks for letting me vent. I'm determined to keep my equipment and software up to date so I can enjoy the skills I've acquired, but I completely cringe at Apple's antics. I truly hate it when I have to respond to some new "tip" or product offer. BooHiss. Happy Turkey Day. Pages is a "turkey" program.
    Best regards, mbd

  • Syncing files constantly issue & page not found when trying to access a file on web

    Can anyone assist with syncing issue. Syncing runs all day and new files are not syncing. I can see the files in web browser (not in desktop APP) however when I try to access the files I get page not found.
    I went into archive (after reading all the forums I coudl find) and I think there are a couple of damaged files as when I tried to delete them I received an encountered 'error' and could not permanently delete.
    I need assistance to get my syncing fixed, and page not found fixed.
    Help!
    Thanks@

    There can be a number of causes for not being able to access file form web browser.  One, you might be writing to wrong directory.  Two, you might not have sufficient privileges to either write to directory or overwrite files already in that directory.  From your description, it's the latter of the two, so you need to get a hold of creative cloud support and get file/folder permissions fixed.  Good luck.

  • Could not load file/URL (file not found) error for JNLP file

    I am completely baffled in trying to figure out why I am getting the following error for some JNLP files but not others:
    Error: could not load file/URL specified: C:\Users\tom\AppData\Local\Temp\javaws2
    java.io.FileNotFoundException: C:\Users\tom\AppData\Local\Temp\javaws2 (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)I have Googled around this forum and elsewhere, and have seen reports that this error is IE-specific, and seems to have something to do with no-cache headers being sent, or with the client browser's cache being full or turned off (which is not my case). I saw the information in the JavaWS FAQ, which recommended turning off security constraints for the JNLP's URI. I tried that, and it didn't help. One of the very baffling things is that I have created several variations of the JNLP file, with varying combinations of jars and property resources, and some combinations always work while other combinations never work. Here's an example:
    <jnlp spec="1.0+" codebase="$$codebase">
       <information>
          <title>demo app</title>
          <description>illustrates weird bug</description>
       </information>
       <resources>
          <j2se version="1.5+"/>
          <jar href="randomFile.jar"/>
          <property name="xxx" value="xxxx"/>
          <property name="swing.metalTheme" value="steel"/>
       </resources>
    </jnlp>The above file always fails with the error shown at the top of this message. However, if I remove either of the two properties, it works fine. And I have created other variations with lots of properties, some of which work. All of these variations are in the same directory in the war file, served by the exact same servlet (a slightly modified version of the jnlp.sample.servlet.JnlpDownloadServlet provided with JDK 1.6.0_3). Assuming that a no-cache header is the problem, what on earth could be causing some JNLP files to always be served with a no-cache header, while others are never served with a no-cache header?
    On a related note, any recommended debugging techniques for seeing what headers are being transmitted? I tried adding a simple check for a "debug=true" parameter in the servlet that causes it to set the content type to "text/plain" instead of JNLP, and that allows me to see (rather than execute) the JNLP XML that's being returned, but it doesn't show me the HTTP headers that are being sent back. If any caching headers are being set, I think it must be being set by the servlet container itself, as it's nothing being set in the servlet code that I can see. So I don't see any way on the server side Java code to output or log the actual HTTP response (or is there?). Any tips in that regard much appreciated.
    Edited by: TomC125468 on Aug 19, 2009 1:35 PM

    Hi Luca-Sanna,
    Thanks for the response. Re browsers, yes, it fails in IE but it succeeds in Firefox. The info on the JavaWS FAQ and other places all seem to indicate that it's an IE issue concerning handling of the cache-control headers.
    I should check in my webserver forum (Sun WebServer 7) to see about logging options. Sniffing on the client side is not possible, as my app is required to use HTTPS exclusively, and unfortunately that also precludes a telnet GET request.

Maybe you are looking for

  • Losing 'authorization' to play my music on my iPod

    completely weird...I updated my playlists today (and iTunes software) and was nailed with this message: "some of the songs in the iTunes music library, including the song "Voices Carry", were not copied to the iPod "Tim's iPod" because you are not au

  • Syncing photos with Aperture 2.0

    After upgrading to Aperture 2.0, I no longer have the option to select which projects I want to sync my photos from. It is now all photos or none (with Aperture 1.5, you could select one or more projects). Has anyone else experienced this problem? Is

  • Problem passing values to cfc component

    I have a cfc component with methods to insert, retrieve and update a record in a table. There are several forms associated with the component, each which handles a subset of the fields in the table. The update method is called with arguments that ide

  • Configuring service with party to service without party

    Hi, I have a scenario where the sender is an external system and reciver system is in our landscape. I have created a party and service for the sender system and a service without party for my receiver system. Is it possible to configure a scenario,

  • ADOBE FLASH PLAYER UNINSTALL ISSUE- FEB 2015

    POSTED FEB 2 2015 hello fellow mac users -  I have an adobe flash player question... I am sure everyone is aware of the adobe flash player vulnerability that came out late January 2015.   Initially when I saw that, I promptly removed flash player on