Setting path for "Content-disposition" filename

I'm trying to figure out how to set the filename in the following:
String path = "/usr/local/jakarta-tomcat-4.1.29/webapps/myapp/my_images.zip";
response.setContentType("application/octet-stream");
response.setHeader("Content-disposition","attachment; filename=" +path);The file that I'd like the user to download is called my_images.zip. It resides here: /usr/local/jakarta-tomcat-4.1.29/webapps/myapp/my_images.zip
However, when I run the servlet, it pops up a dialog box with this as the filename: usrlocal_jakarta-tomcat-4.1.29_webapps_myapp_my_images.zip
It's replaced the slashes with underscores. What's going on? The zip file resides in the root folder of my app. The servlet is in a subfolder called "fpauto".

Ah, ok. Right, so when you set that heading what you are saying to the client is: "The response from this web request is actually a file with the following name..."
For example you could set it to be README.TXT and then use
response.getWriter().println("Hello World.");as the only other line of your servlet. That would send a text "file" called README.TXT to the client containing the text "Hello World" only. Setting that response header doesn't tell the servlet to do anything other than inform the client what filename to use.
It would be nice if there was a method called "transmit file" or somesuch, but there isn't. The simplest reason why is that if you just want to send a file you can usually provide it directly from the web (or app) server by putting it into the content. For example create a file my_files.zip in the root of your war and it will typically be made available as a file anyway.
The assumption is that servlets are for generating content not just sending content that already exists.
However, if you have a good reason for wanting to do this, you can create a loop that reads in the file and sends its contents to the response's output stream. I usually use the commons-io IOUtil [copy |http://commons.apache.org/io/api-1.4/org/apache/commons/io/IOUtils.html#copy(java.io.InputStream,%20java.io.OutputStream)] functions to do this.
So why do you want to use a servlet to send "static" content?

Similar Messages

  • Set path for emacs

    Hi
    The emacs located in /opt/sfw/bin
    But how to set path for that so i can use emacs or other software in any other directory.
    I put
    set path=(/opt/sfw/bin $ path)
    in my home dir /export/home/joanna/.cshrc
    but it did not work.
    Which file should i modify and the format i put in ~/.cshrc is correct or not?
    Thanks
    Joanna

    The PATH variable is PATH and not path (The case of the shrinking Alphabets...?)
    And I think in the csh, it should be setenv and not set.
    BTW, csh is not really a good shell to be working on - use ksh instead.
    man csh
    man ksh

  • ParseException Content-Disposition filename spaces

    Hello All,
    I have an email generated from Thunderbird 1.5.0.9 (Windows/20061207) which contains an attachment whose filename has spaces.
    JavaMail (1.4) throws a javax.mail.internet.ParseException on the MimeBodyPart.getDisposition() call:
    javax.mail.internet.ParseException: Expected ';', got "-"
    javax.mail.internet.ParameterList.<init>(ParameterList.java:179)
    javax.mail.internet.ContentDisposition.<init>(ContentDisposition.java:87)
    javax.mail.internet.MimeBodyPart.getDisposition(MimeBodyPart.java:1039)
    javax.mail.internet.MimeBodyPart.getDisposition(MimeBodyPart.java:299) The offending attachment part has a part header which looks like this:
    Content-Disposition: inline;
         filename*0=Test - Test.pdf
    Clearly the parser is failing due to the spaces in the filename. Bugzilla for Thunderbird (Bug 221028 - https://bugzilla.mozilla.org/show_bug.cgi?id=221028) discusses this issue, however the status of the bug is VERIFIED WONTFIX.
    According to the Mozilla discussion, their implementation is conformant to the RFC:
    ...Just two days ago I was talking about this issue in #mozillazine with Christian
    Biesinger and Boris Zbarsky, and they said that this is the proper behaviour
    according to the RFC...
    Whether it IS conformant to all relevant RFCs I don't know, but it seems it won't be changed any time soon.
    This issue also exists for the Content-Type header in the same email which has the same format:
    Content-Type: application/pdf;
         name*0=Test - Test.pdfAnyone know if there is a way I can "safely" parse these headers? Is this a JavaMail bug?
    Thanks

    Absolutely, and please don't take my posting as a complaint - well over 99.9% of our emails are consumed flawlessly. I'm expressing more of (my opinion only) a high-level philosophical argument about of why I think good software (JavaMail) should try to by-default interact with not-so-good software. I'm not basing this not on "technical correctness", but rather the following unfortunate scenario:
    One particular example would be certain products made by a company with the initals "MS". These products almost always hide brokenness (they act as highly liberal consumers). Outlook, Internet Explorer, are the 2 primary examples. So a user (and unfortunately most users have never read or care about an RFC) opens the email with Outlook, or the web page with Explorer, etc. It "works". Now, we programmers certainly know better, but remember that we aren't buying or choosing products or services, we're offering them. User then opens with Java-based product (stack trace). User buys or chooses MS-based product, MS-based product retains market stranglehold, commercial email providers test their products with Outlook, and in the end, brokenness is propagated anyway. It's kind of like reverse-Darwinism for software (survival of the most-broken).
    Some customers complain that JavaMail doesn't strictly enforce every requirement of the standards
    As an SMTP producer, I might see that, but personally I can never recall seeing a single problem with outgoing email from JavaMail. As a client consumer, I'm not sure why they would take that philosophy, unless maybe they are using JavaMail to test RFC-compliance.
    there are forms of brokenness that go beyond what can be handled at the JavaMail API level.
    Of course, but I have yet to see a message that the "MS" client could not read. So perhaps they are working around some of these at a higher level (in the GUI, maybe?)
    But for developers who don't think about this problem...
    Most developers most likely aren't using JavaMail to read in over 25,000 emails a day. So admittedly, I'm in a unique situation.
    Having made that decision it's relatively straightforward to configure JavaMail appropriately. Not really, one change required updating the jar file, others require obscure uses of the API. And a developer/administrator is only going to make those changes after seeing the problem.
    to avoid propagating brokenness as you suggest.
    Brokenness will get propagated anyway (see reverse-Darwinism, or the Theory of De-evolution above).
    I'm looking forward to trying out 1.4.1, and thanks again for all the assistance, a very thorough FAQ, and overall a great API. I think the opensourcing was a good idea, JavaMail really is by far the best API that I have seen for this type of high-volume work.

  • Path for Content Management System (CMS)?

    Hi All!
    Has anyone configured Authoring environment for learning Solution. Can anyone please provide me the step-by-step details.
    Also can anyone please explain the process of setting up the path for CMS (Content Management System) Address in KM for ECC6.
    Ours is a EP7.0,ECC6.0 (NW2004s) new implementation.
    Thanks
    regards
    Madhu

    Hi,
    "CMS" would in the first place only be a generic term that you can call any product that manages content.
    At SAP I am aware of the following similar terms:
    <b>KM -</b> Java-based CMS, integration framework for 3rd party CMS's and more of SAP NetWeaver, runs in the Portal
    <b>CM -</b> The architectural part of KM that deals with basic content management services. With additional services and TREX this combines to KM.
    <b>DMS -</b> "Document management system", R/3-based system for management of engineering documents, bases on "KPro" in Web AS ABAP, part of mySAP PLM, integrates into KM via repository manager
    <b>KW -</b> KPro-based system for managing SAP-related documentation and training
    <b>Content Server - </b>Object storage location for KPro-managed documents (see DMS)
    <b>KPro -</b> "Knowledge Provider", deep level very generic set of ABAP methods to manage document attachment objects in an R/3 environment
    Hope that clarifies...
    Regards, Karsten

  • Set $PATH for current session in Terminal

    Hello,
    I want to modify the environment variable $PATH for the current terminal session. To modify it in $HOME/.profile (etc) is no option.
    So I created a shell script called envsetup.sh which contains
    ATLAS_HOME=/Applications/Development/atl-plugin-sdk
    PATH=$ATLAS_HOME/bin:$PATH
    export ATLAS_HOME PATH
    When I execute the script, $PATH will only modified while running the script but does not alter it for the current session. But then I copy and paste it into the terminal, $PATH gets modified for the current session. What's wrong with it? On my Linux box, it works ...

    Linux box, it works ...
    This CANNOT work on your Linux box.
    When you run a shell script (Mac OS X, Linux, HP-UX, Solaris, Tru64 UNIX, AIX, etc...), the shell script is runs in a child process. Any environment variables set or changed in that child process get destroyed when that child process ends, which happens as soon as the script ends. The parent process (your shell) will never see those child process environment variables. This has been true since the earliest versions of UNIX that I am aware of, and that goes back to at least '79.
    Alternative approaches. You could create a shell function in your .profile
    envsetup()
    export ATLAS_HOME="/Applications/Development/atl-plugin-sdk"
    export PATH="$ATLAS_HOME/bin:$PATH"
    The next time you login, your .profile will run and you will have a new command "envsetup". When you invoke the command envsetup it will run within the context of your current shell, so those environment variables will be set and visible.
    You could also create an alias that sources your envsetup.sh
    alias envsetup 'source /path/to/envsetup.sh'
    This would give you an easy to call command that would source into the current shell the export commands, as well as provide you with a script that can be sourced into other scripts that happen to need those specific exports.
    Message was edited by: BobHarris

  • Setting path for third party class files

    I am using some third party classfiles in my JSPs for JDBC. When I use these files, in normal Java Programs everything is working fine ( I am setting the path by using the CLASSPATH environment variable).
    I did not understandt how to set classpath for these files (com.informix.jdbc.*) for use in iplanet 6.0.
    I have tried to keep this "com" folder in /usr/java/j2sdk1.4.3_01/lib folder, but, it is not still working. I tried to change the start-jvm file, but, I am still having problems.
    Can someone help me !!!
    --Murthy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I changed the jvm12.conf file, but, it did not work. I changed the JDK Runtime Classpath in the Global Settings tab of the Administration Server and restarted both the webserver and the administration server and it worked.
    Thanks for your response.
    --Murthy.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Set path for package InCopy

    I noticed that on a Mac, when an InCopy Package file is opened, it 'unpacks' in the /user/documents folder (On a PC in 'Documents user'?).
    Is this path 'hardcoded' or is there a way to set the path to a desired folder?

    Gee I was hoping *you* would know, Bob! ;-)
    There's no user interface for it, so I'm guessing it's hard wired.
    FWIW on Windows the default location for unpacked assignments is "InCopy Assignments" at the top level of the user's My Documents folder.
    More control over default file paths for saving/unpacking is a great feature request for CS4.
    AM

  • Does the Target Audiences setting work for Content Search Web Part Snippets?

    I am attempting to create a page layout in SharePoint 2013 that contains a Content Search Web Part snippet. 
    I only want the CS Web Part to appear for certain users in a defined SP Group. 
    I set the Target Audience property during the generation of the snippet. 
    Unfortunately, the target audience property does not affect the appearance of the web part. 
    It appears all the time, even when the current user is not a member of the named SP group.
    Here is my snippet, the group I am targeting in called "US Region":
    <!--CS: Start Content Search Snippet--><!--SPM:<%@Register Tagprefix="spsswc" 
    Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>--><!--SPM:<%@Register Tagprefix="a2e8ead9d" 
    Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>--><!--MS:<spsswc:ContentBySearchWebPart runat="server"
    AlwaysRenderOnServer="False" ResultType="" DataProviderJSON="{&quot;QueryGroupName&quot;:&quot;Default&quot;,&quot;QueryPropertiesTemplateUrl&quot;:&quot;sitesearch://webroot&quot;,&quot;IgnoreQueryPropertiesTemplateUrl&quot;:false,&quot;SourceID&quot;:&quot;8413cd39-2156-4e00-b54d-11efd9abdb89&quot;,&quot;SourceName&quot;:&quot;Local
    SharePoint Results&quot;,&quot;SourceLevel&quot;:&quot;Ssa&quot;,&quot;CollapseSpecification&quot;:&quot;&quot;,&quot;QueryTemplate&quot;:&quot;(contentclass:sts_listitem OR IsDocument:True) SPSiteUrl:http://spvm2/sites/ProductCatalog
    ListId:1380cfe0-d69d-4d7a-b616-c70469a46e9c owstaxIdProductGroup:{URLToken.1} owstaxIdWorldRegion:US&quot;,&quot;FallbackSort&quot;:[],&quot;FallbackSortJson&quot;:&quot;[]&quot;,&quot;RankRules&quot;:[],&quot;RankRulesJson&quot;:&quot;[]&quot;,&quot;AsynchronousResultRetrieval&quot;:false,&quot;SendContentBeforeQuery&quot;:true,&quot;BatchClientQuery&quot;:true,&quot;FallbackLanguage&quot;:-1,&quot;FallbackRankingModelID&quot;:&quot;&quot;,&quot;EnableStemming&quot;:true,&quot;EnablePhonetic&quot;:false,&quot;EnableNicknames&quot;:false,&quot;EnableInterleaving&quot;:false,&quot;EnableQueryRules&quot;:true,&quot;EnableOrderingHitHighlightedProperty&quot;:false,&quot;HitHighlightedMultivaluePropertyLimit&quot;:-1,&quot;IgnoreContextualScope&quot;:true,&quot;ScopeResultsToCurrentSite&quot;:false,&quot;TrimDuplicates&quot;:false,&quot;Properties&quot;:{&quot;TryCache&quot;:true,&quot;Scope&quot;:&quot;{Site.URL}&quot;,&quot;ListId&quot;:&quot;00000000-0000-0000-0000-000000000000&quot;,&quot;UpdateLinksForCatalogItems&quot;:true,&quot;EnableStacking&quot;:true},&quot;PropertiesJson&quot;:&quot;{\&quot;TryCache\&quot;:true,\&quot;Scope\&quot;:\&quot;{Site.URL}\&quot;,\&quot;ListId\&quot;:\&quot;00000000-0000-0000-0000-000000000000\&quot;,\&quot;UpdateLinksForCatalogItems\&quot;:true,\&quot;EnableStacking\&quot;:true}&quot;,&quot;ClientType&quot;:&quot;ContentSearchRegular&quot;,&quot;UpdateAjaxNavigate&quot;:true,&quot;SummaryLength&quot;:180,&quot;DesiredSnippetLength&quot;:90,&quot;PersonalizedQuery&quot;:false,&quot;FallbackRefinementFilters&quot;:null,&quot;IgnoreStaleServerQuery&quot;:false,&quot;RenderTemplateId&quot;:&quot;DefaultDataProvider&quot;,&quot;AlternateErrorMessage&quot;:null,&quot;Title&quot;:&quot;&quot;}"
    BypassResultTypes="True" ItemTemplateId="~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/Item_MediumPicture.js" GroupTemplateId="~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/Group_Content.js"
    ResultsPerPage="3" SelectedPropertiesJson="[&quot;PublishingImage&quot;,&quot;PictureURL&quot;,&quot;PictureThumbnailURL&quot;,&quot;Path&quot;,&quot;Title&quot;,&quot;Description&quot;,&quot;SecondaryFileExtension&quot;,&quot;ContentTypeId&quot;]"
    HitHighlightedPropertiesJson="[&quot;Title&quot;,&quot;Path&quot;,&quot;Author&quot;,&quot;SectionNames&quot;,&quot;SiteDescription&quot;]" AvailableSortsJson="null" ShowBestBets="False"
    ShowPersonalFavorites="False" ShowDefinitions="False" ShowDidYouMean="False" PreloadedItemTemplateIdsJson="null" ShowAlertMe="False" QueryGroupName="Default" RenderTemplateId="~sitecollection/_catalogs/masterpage/Display
    Templates/Content Web Parts/Control_ListWithPaging.js" StatesJson="{}" ServerIncludeScriptsJson="null" Title="United States" FrameType="TitleBarOnly" SuppressWebPartChrome="False" Description="&lt;%$Resources:Microsoft.Office.Server.Search,CBS_Description;%&gt;"
    IsIncluded="True" ZoneID="ImportedPartZone" PartOrder="0" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True"
    AllowHide="True" IsVisible="True" DetailLink="" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="&lt;%$Resources:core,ImportErrorMessage;%&gt;"
    ImportErrorMessage="&lt;%$Resources:core,ImportErrorMessage;%&gt;" PartImageLarge="" IsIncludedFilter=";;;;US Region" AuthorizationFilter=";;;;US Region" ExportControlledProperties="True" ConnectionID="00000000-0000-0000-0000-000000000000"
    ID="g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75" ChromeType="TitleOnly" ExportMode="All" Preview="&lt;div ms-webpart-chrome-vertical ms-webpart-chrome-fullWidth &quot;&gt; 
    &lt;div id=&quot;WebPartwpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ChromeTitle&quot;&gt;  
    &lt;span title=&quot;United States - $Resources:Microsoft.Office.Server.Search,CBS_Description;&quot; id=&quot;WebPartTitlewpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75&quot; States&lt;/span&gt;&lt;span id=&quot;WebPartCaptionwpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75&quot;&gt;&lt;/span&gt;&lt;/nobr&gt;&lt;/div&gt;&lt;/span&gt; 
    &lt;/div&gt;&lt;div WebPartID=&quot;00000000-0000-0000-0000-000000000000&quot; HasPers=&quot;true&quot; id=&quot;WebPartwpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75&quot; width=&quot;100%&quot; noindex ms-wpContentDivSpace
    &quot; allowDelete=&quot;false&quot; style=&quot;&quot; &gt;&lt;div id=&quot;WebPartContent&quot;&gt;  
    &lt;div componentid=&quot;wpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_csr&quot; id=&quot;wpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_csr&quot;&gt;&lt;/div&gt;&lt;noscript&gt;&lt;div id=&quot;wpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_noscript&quot;&gt;It
    looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.&lt;/div&gt;&lt;/noscript&gt;&lt;div id=&quot;wpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75&quot;&gt; 
    &lt;div ms-webpart-chrome-fullWidth &quot;&gt;  
    &lt;div id=&quot;WebPart_ChromeTitle&quot;&gt;   
    &lt;span title=&quot;&quot; id=&quot;WebPartTitle&quot; style=&quot;text-align:justify;&quot; id=&quot;WebPartCaption&quot;&gt;&lt;/span&gt;&lt;/nobr&gt;&lt;/h2&gt;&lt;/span&gt;  
    &lt;/div&gt;&lt;div WebPartID=&quot;00000000-0000-0000-0000-000000000000&quot; HasPers=&quot;true&quot; id=&quot;WebPart&quot; width=&quot;100%&quot; ms-WPBorder noindex ms-wpContentDivSpace &quot; OnlyForMePart=&quot;true&quot;
    allowDelete=&quot;false&quot; style=&quot;&quot; &gt;&lt;div componentid=&quot;wpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ctl00_csr&quot; id=&quot;wpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ctl00_csr&quot;&gt;&lt;/div&gt;&lt;noscript&gt;&lt;div
    id=&quot;wpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ctl00_noscript&quot;&gt;It looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.&lt;/div&gt;&lt;/noscript&gt;&lt;div id=&quot;wpz43_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ctl00&quot;&gt;   
    &lt;/div&gt;&lt;div>  &lt;/div&gt; &lt;/div&gt; 
    &lt;/div&gt;&lt;div &lt;/div&gt;" __MarkupType="vsattributemarkup" __WebPartId="{2d49bab8-c61e-44b3-91c2-c1c44a4cea75}" WebPart="true" Height="" Width="">--><!--ME:</spsswc:ContentBySearchWebPart>--><!--PS:
    Start of READ-ONLY PREVIEW (do not modify)-->
    <div ms-webpart-chrome-fullWidth ">
    <div id="WebPartWPQ1_ChromeTitle">
    <span title="United States - $Resources:Microsoft.Office.Server.Search,CBS_Description;" id="WebPartTitleWPQ1"><h2 style="text-align: justify;"><nobr><span>United States</span><span id="WebPartCaptionWPQ1"></span></nobr></h2></span>
    </div><div noindex ms-wpContentDivSpace " id="WebPartWPQ1" allowdelete="false" onlyformepart="true" width="100%" haspers="true" webpartid="00000000-0000-0000-0000-000000000000"><div
    id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_csr" componentid="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_csr"></div><noscript>&lt;div
    id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_noscript"&gt;It looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.&lt;/div&gt;</noscript><div
    id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75">
    <div>
    <div id="WebPartWPQ2_ChromeTitle">
    <span title="" id="WebPartTitleWPQ2"><h2 style="text-align: justify;"><nobr><span></span><span id="WebPartCaptionWPQ2"></span></nobr></h2></span>
    </div><div ms-WPBorder noindex ms-wpContentDivSpace " id="WebPartWPQ2" allowdelete="false" onlyformepart="true" width="100%" haspers="true" webpartid="00000000-0000-0000-0000-000000000000"><div
    id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ctl00_csr" componentid="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ctl00_csr"></div><noscript>&lt;div
    id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ctl00_noscript"&gt;It looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.&lt;/div&gt;</noscript><div
    id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_2d49bab8_c61e_44b3_91c2_c1c44a4cea75_ctl00">
    </div><div></div></div>
    </div>
    </div><div></div></div>
    </div><!--PE: End of READ-ONLY PREVIEW--><!--CE: End Content Search Snippet-->       

    I am having the same issue.  Did you ever resolve it?

  • Setting paths for JSPs and Servlets

    I have some java servlets and JSPs lying under a directory structure. I want to deploy them on OC4J. Is there any other way of doing this other than copying my directory structure to the /default-web-app directry etc.. etc..? I mean is it possible to configure OC4J to use any directory as the root directory for a deployed web application or an application. TomCat server can be configured like this but I am unble to configure OC4J. Is there anybody who knows how to do this?

    Yes.
    In server.xml (under the config dir of the oc4j installation) there is an application tag for each web application installed. One parameter for the tag is path, which can be set to anywhere on the filesystem.
    Jonny
    null

  • Issue Setting Paths For Sickbeard

    Hi again everyone.
    Man I am having no end of trouble with my system at the moment. At first I had issues with SABnzbd but finally got it sorted but the thing that I am having a lot of trouble with at the moment is sickbeard. I only installed sickbeard this week from AUR.
    I already have a heap of tv shows that I want to add but I am unable to set the path to them or even add a new show and set the path to there.
    I want to set the path to /home/media/video/TVShows which is on my LVM but I can't get it set. I have even set the permissions at one point to 777 to try and get it to write there but it just won't.
    [media@media ~]$ ls -l / | grep home
    drwxr-xr-x 5 root root 4096 Sep 21 2010 home
    [media@media ~]$ ls -l /home | grep media
    drwxrwx--- 39 media users 4096 Nov 5 16:42 media
    [media@media ~]$ ls -l /home/media | grep video
    drwxrw-rw- 8 media users 103 Nov 5 02:22 video
    [media@media ~]$ ls -l /home/media/video | grep TVShows
    drwxrwxr-x 26 sickbeard users 4096 Nov 2 23:02 TVShows
    [media@media ~]$
    I'm just not sure how to solve this one and am hoping someone can help me get it solved.
    Last edited by morphjk (2011-11-05 10:05:14)

    Yes.
    In server.xml (under the config dir of the oc4j installation) there is an application tag for each web application installed. One parameter for the tag is path, which can be set to anywhere on the filesystem.
    Jonny
    null

  • How to set paths for  bc4j Project in release 2

    Hi
    I have a workspace with 2 projects 1 bc4j and the other contains my jsps etc
    They were created in JDev9i RC
    I have recreated my connections in release 2
    I have opened the projects in Release 2 I am trying to run the bc4j Project to test if all is working in release 2 and I got a whole host of errors like:
    -jsp files must reside in the server root directory or a subdirectory beneath it
    -cannot access directory javax\servlet\jsp : verify that directory is reachable from classpath and \or sourcepath
    -cannot access class oracle.jsp.runtime.HttpJsp : file oracle\jsp\runtime\Http.Class not found
    It seems like there is something I need to specify in the classpath /path
    but I am not sure what
    Any one know?
    thanks

    Hi
    Thanks for your response
    The bc4j project compiles and runs fine now
    but I am still getting a runtime error
    when I run the jsp project
    the error is
    JBO-33001: Cannot find the configuration file /IntranetPackage2/common/bc4j.xcfg in the classpath
    I have tried including that path in the java source path but still no effect
    It appears there is a little snag at each step of the way

  • How to set config for content protection using Adobe Access for an HLS VOD stream?

    Hi,
    I am trying to do content protection for HLS VOD stream using AdobeAccess in AMS 5.0.1,
    I have followed the steps mentioned in the below documentation.
    http://help.adobe.com/en_US/adobemediaserver/devguide/WS52621785137562 06-4b6aabd1378392bb59-7fe8.html
    Here is my configuration snippet from httpd.conf :
    <Location /hls-vod>
        HLSHttpStreamingEnabled true
        HLSMediaFileDuration 8000
        HttpStreamingContentPath "/mnt/webroot/vod"
        HLSFmsDirPath ".."
        HLSJITConfAllowed true
        HLSEncryptionScope server
        HLSProtectionScheme AdobeAccessV3
        HLSDrmContentID httpd_conf
        HLSDrmCommonKeyFile  "../creds/common-key.bin"
        HLSDrmLicenseServerURL  "http://<licenseserver>/flashaccessserver/sampletenant"
        HLSDrmTransportCertFile  "../creds/cert-trial.der"
        HLSDrmLicenseServerCertFile  "../creds/cert-trial.der"
        HLSDrmPackagerCredentialFile  "../creds/cert-trial.pfx"
        HLSDrmPackagerCredentialPassword <plain text password>
        HLSDrmPolicyFile  "../creds/ad-policy.pol"
        HLSDrmKeyServerURL  "http://faxs.adobe.com"
        Options -Indexes FollowSymLinks
    </Location>
    When i hit the video url from desktop chrome browser,apache error log says:
    [warn]  Error fetching encryption params:/mnt/webroot/vod/sample_video.mp4
    [error] mod_hlshttp [403]: Encryption error while processing /mnt/webroot/vod/sample_video.mp4, Ref: [6:Key uri missing]
    And when i tried the video url on ipad device using the AccessPlayer Sample given by Adobe, the error log came as:
    DRM error Major[3363] minor[0]NSerror:[(null)]
    Any idea where i am going wrong?
    Is the configuration i am going at httpd.conf accurate?
    Any help is greatly appreciated !!
    Thanks in advance,
    Maria

    Hi Rodrigo,
    Though both Azure Blob and Azure applications support custom domain, one domain could have only one DNS record (in this case is CNAME record) at one time. For Steve's case, he has 3 domains, blog.smarx.com, files.blog.smarx.com and cdn.blog.smarx.com.
    > I would like to find a way to storage my html page that I need to edit under the same domain.
    For this case, a workaround will be adding a http handler in your Azure application to serve file requests. That means we do not use the actual blob url to access blob content but send the request to a http handler then the http handler gets the content
    from blob storage and returns it.
    Please check
    Accessing blobs in private container without Shared Access Secret key for a code sample.
    Thanks.
    Wengchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact
    [email protected]
    Microsoft One Code Framework

  • How to set Path for a properties file

    Hi,
    I am using a SQL.properties file to load all my SQL statements to my EJB JDBC prepared Statement. I have placed the SQL.properties file in com.company.sql package. I have another SQL class in the same package which is loading the SQL.properties file to cache for future use. I am using the path as "SQL.properties" (the file name straight ) in the SQL class to access the properties file.
    I am using Sun App Server 7. To get access to this file I need to copy the SQL.properties file to the config directory of the app server instance. Otherwise it is not able to locate the file. I don't want to put the properties file in the config directory of the app server instance. Please help me, what path I have to give to access the file from the package itself, rather from the config directory of server instance.
    I think , some one who is doing localization can help me out here. They have to put the localized properties file to access the text out of it. Please help me. Thanks in advance.
    Thanks
    Amit

    I am using the propeties file to get the SQL statements. I have all the SQL query statement in the properties file. I am creating a preparedstatement after getting the statement from the properties file with the id like we do in ResourceBundle. If I keep the properties file in the config directory of the Sun App Server instance , then it is working fine. But If I don't keep it there, then it is giving me a file not found exception.
    My SQL class which is accessing the properties file are in same package (com.company.sql). But still it is not able to find the file. As suggested by you, I tried it by giving the path as com.company.sql.SQL. Still it did not found the file. The file is there inside the WEB-INF/classess/com/company/sql/.
    Thanks
    Amit

  • Set path for native dll in NT

    Hi Javapeople,
    I have a signed applet which downloads a dll to the client machine for JNI access. I was wondering if there is a way to specify that the dll goes to some folder other than 'C:\WINNT\system32' and still have it accessible from my Java code?
    Thanking you in advance.

    so long as the dll is in a directory in your PATH, it will be found.

  • Set path for InCopy packages

    I noticed that on a Mac, when an InCopy Package file is opened, it 'unpacks' in the /user/documents folder (On a PC in 'Documents user'?).
    Is this path 'hardcoded' or is there a way to set the path to a desired folder?
    (cross posted at InCopy forum)

    Answered in the IC forum.
    Bob

Maybe you are looking for

  • Desc command

    Hi all I did Set Linesize 1000. Then I desc table. I t is showing me only name column of desc command. Then I did formatting of name column column name format a20 even then it does not show me the rest of two columns(null and datatype) why???

  • Why my iPhone 5s's wifi have problem with wifi on iOS 8.0.2?

    MMy iPhone 5s and also my iPhone 6 plus and iPad 3, all have the latest update(8.0.2) but all of me have problem with wifi and gilt hung all the time! Wifi most of the time is not working and we have to use laptop or using phone data, obviously I don

  • Creating a shiny star effect

    Hi, Hope you're well. The following is a link to a tutorial creating a diamond effect on a word. http://www.youtube.com/watch?v=EgHCiuehTwU&feature=related At 4:35 into it, the author begins creating the shiny parts of the diamonds by drawing a path,

  • Row count in Pivotal View (10 rows per page)

    Hi I tried following options to restrict row count in Pivotal view of a report, however the out put is inconsistent in pivotal view. 1. CEILING((RCOUNT(1))/10.0) 2. TRUNCATE((RCOUNT(1)-1)/10, 0) +1 3. Even Case statement also Appreciate the help exte

  • Purchase orders created by buyer only can be viewed

    Dear All, Can it possible that Purchase orders created by buyer only can be viewed by him not the ones created by other created under same operating unit. Regards