File Reading in Web Project, file path help.

Hi,
I have a web project with the folloing directory structure.
Thesis
> build
> dist
> nbproject
> src
> test
> web
Using netbeans and GlassFish V2 webserver I'm trying to call a function in a Java file (src folder) from a JSP file (web folder).
In my java source code I have the following line:
BufferedReader in = new BufferedReader(new FileReader("data.txt"));
which means the file should be found at the root of the project (Thesis). However after many hours of frustration, I finally found out that when my project gets deployed to GlassFish server, my program is trying to look for the data.txt file in "C:\Program Files\glassfish-v2ur2\domains\domain1\config\"
I got the path from with the following command in my java code
File file = new File("highscore.txt");
System.out.println(file.getCanonicalPath());
Is there anyway of changing the path it is looking for? I've tried looking throught all the settings in GlassFish and cannot find anything that is set as "C:\Program Files\glassfish-v2ur2\domains\domain1\config\"
Thanks

Don't cross-post - it's rude:
http://forum.java.sun.com/thread.jsp?thread=519223&forum=31&message=2479278
http://forum.java.sun.com/thread.jsp?thread=519222&forum=33&message=2479275
%

Similar Messages

  • JSP compiler reading the web.xml file?

    Hi,
              I am trying to use the weblogic JSP compiler (weblogic.jspc) to
              pre-compile some JSP that use custom tags. Does the compiler
              read the web.xml file if there is one? In particular the taglib
              elements in that file so that the compiler understands the
              <%@ taglib ... %> directive.
              In the JSP I try to compile I use this statement to declare a taglib:
              <%@ taglib uri="xyz/xyz-taglib" prefix="xyz" %>
              and in my web.xml I have:
              <taglib>
              <taglib-uri>xyz/xyz-taglib</taglib-uri>
              <taglib-location>/WEB-INF/tlds/xyz.tld</taglib-location>
              </taglib>
              When I try to compile the JSP I get the following error:
              Could not parse embedded JSP code: weblogic.utils.ParsingException: nested
              IOException: java.io.IOException: cannot resolve 'xyz/xyz-taglib' into a
              valid tag library.
              Any ideas how I can resolve this?
              In advance thank you for any help.
              Florian
              

    open it in a text editor and modify it.
    %

  • How to read file in netbeans web project with relative path.

    Hi friends,
    I have created a web project in Netbeans with following stucture.
    Exercise1
    src --> database --> ConnectionManager.java
    cofig --> databaseproperties.xml
    I want to read config\databaseproperties.xml file in src\database\ConnectionManager.java file.
    I have tried to create a file input stream with path = "config" File.separator "databaseproperties.xml".
    I am getting error of File Not Found..
    Anybody has any idea? In Netbeans what is the default context path?
    Edited by: Jaykishan on Jun 29, 2010 11:54 AM

    place the *.jrxml files in your war (e.g. WEB-INF\classes\report.jrxml) and then in your servlet:
    JasperReport report = JasperCompileManager.compileReport("report.jrxml");

  • How can I use my log4j config file of my web project in ias?

    I used log4j in my web project. So I put a config file "log4j.properties" in my project WEB-INF/classes/.
    It works well in tomcat. But when I deploy it to ias parent by orabpel project, It didn't work know!
    I can only see my log in "$ORACLE_HOME/opmn/logs", and some message I nedd is losed, such as the class name, line,datetime, Thread and so on.
    I think the config file of my project is't work, maybe log4j use some config file of ias but me.thx
    So where is the log4j config file of ias, can i modify it ?
    Or how can I let my project use my config file not ias? Any one can help me, thx!

    If you are wondering if/how to control the log messages coming from bpel, here is the corresponding log4j config file that it uses:
    $ORACLE_HOME/bpel/domains/<DOMAIN_NAME>/config/log4j-config.xml

  • How to declare variable in solution file for use in project files.

    Hi Folks,
    Apologies if this is not the right place to ask, but I would like to declare a variable in my solution file that can used by all of the projects (prof files) in that solution.
    More specifically in the project files, references are stored using relative paths which cause issues if they don't exist. I would like to replace the relative paths with a variable set in the solution file that can easily be changed when the solution is
    built in a different location.
    So I would like to replace "../../../SomeProject"  with "$(SomeLocation)/SomeProject"  but set the $(SomeLocation) in the solution file.
    Regards
    Andy

    Hello Andy,
    Here is a common sln file:
    Microsoft Visual Studio Solution File, Format Version 12.00
    # Visual Studio 2013
    VisualStudioVersion = 12.0.30723.0
    MinimumVisualStudioVersion = 10.0.40219.1
    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wpf_EntityFramework", "wpf_EntityFramework\wpf_EntityFramework.csproj", "{A282940A-5F76-4FF8-9568-8B7D14133259}"
    EndProject
    Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
    Debug|Any CPU = Debug|Any CPU
    Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
    {A282940A-5F76-4FF8-9568-8B7D14133259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    {A282940A-5F76-4FF8-9568-8B7D14133259}.Debug|Any CPU.Build.0 = Debug|Any CPU
    {A282940A-5F76-4FF8-9568-8B7D14133259}.Release|Any CPU.ActiveCfg = Release|Any CPU
    {A282940A-5F76-4FF8-9568-8B7D14133259}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
    HideSolutionNode = FALSE
    EndGlobalSection
    EndGlobal
    And the Global Interface in the solution file is actually used for Visual Stuido add-ins. To know details, please read the following MSDN article:
    1. Persisting Information in Projects and Solutions
    Here you can find "If the Globals object is associated with the
    Solution2 object, then the value persists in the .sln file. These values are persisted when the solution file is saved."
    2.
    Solution2 Interface
    It's about the solution interface.
    As you can see although they may save something to your solution file, it is not intended for you to use it in your project.
    What's your projec type and can you alter to use some common ways?
    For example:
    1. If it is in project level, set your value public so that all classes can access the value.
    2. Or you can choose to create a xml/text file or any file that you can read by code, and then read the value out from that file.
    It will be much better than thinking about set value in the solution file.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can't drag files from desktop to project files window

    Im using the latest premiere pro version, 7.2, and while I can drag files from my desktop to the project window in premiere 6, for some reason its no longer possible in premiere 7.2
    whenver I try to drag audio or video files from my desktop or any folder to the project files window at the bottom left I get a forbidden sign or circle with a diagonal so the only way to import files is through the import menu, which is less straightforward and slowlier
    Ill be happy to provide more data if required
    thanks
    PS: obviously Ive already created a sequence so the problem is not that

    The latest version is 7.2.2 (33)
    Upgrade to that and see if it helps.

  • Can't import any audio file types into my project files in AECS5

    I'm trying to add sound effects to a titles animation for the first time. When I tried to import a .wav file i got this error:
    after effects error. Can't import file (filename.wav)  unsupported filetype or extension
    So I converted the file to .mp3. Still didn't work. I converted the file to .aiff, wma and none worked.
    Whats the problem? Better to just animate in AE and input sound effects in Premiere?
    please help!
    Z

    balizumba wrote:
    I'm running Adobe CS5 on an ASUS i-5. 4gb ram. 500gb internal memory. 1gb
    dedicated geForce Nvidia 310M graphics card.
    However, you did NOT answer Todd's very crucial question:
    Are you running AE 10 without having done the free update to AE 10.0.1, which corrects a wealth of AE weirdness?  Hmmmmmm? 
    That's the first thing to tend to if you haven't done it yet.
    You have other issues going on as well.
    Issue #1 is that you only have 4GB RAM, and for AE 10, that's absolutely NOTHING.  You need to get more memory, you need to get it right away, and you have to turn off multiprocessing and leave it off until you get more memory.  Think about bringing your machine up to 12 GB minimum to use multiprocessing.  You should tend to that next.
    Issue #2 -- you have your media files on the same drive as your OS and applications.  This is very bad indeed.  You need to get an additional hard drive for your project files and media files.  A 1 TB internal hard drive costs what.... about $100 US?  That's the third thing to do.
    Once you do all that, you ought to stand a fighting chance at getting your audio work done in AE.  And you should use either AIFF or WAV files.  Do NOT use any kind of compressed audio.  AE has NEVER worked well with compressed audio.
    Can't afford to do all that hardware upgrading?  Got a video editing application?  Import your AE animation -- VIDEO ONLY, no audio -- and any audio files you need, including sound effects.  Do the work in the video editor.  Not only will it be faster, but easier.

  • File Read and Write using File Adapter in Bpel

    In Bpel Process i am using File Adapter ( Schema is Opaque) for read and write the file contents. i am able do successful deployment and read, write function in first time deployment, after that again i tired to run the application, its not going to write the content of file, its only writing the file with out data's or content in that file.
    Please help me...
    Saravanan

    Hi Eric
    In my domain.log file having the following details. In this file im unable to find out what the exact problem. Please look at this and help me.
    <2008-01-22 18:25:42,024> <INFO> <default.collaxa.cube.compiler> validating "C:\product\10.1.3.1\OracleAS_1\bpel\domains\default\tmp\.bpel_BPELProcess2_1.1_298e83988d77b6640c33dfeec11ed31b.tmp\BPELProcess2.bpel" ...
    <2008-01-22 18:25:49,850> <INFO> <default.collaxa.cube.engine.deployment> <CubeProcessFactory::generateProcessClass>
    Process "BPELProcess2" (revision "1.1") successfully compiled.
    <2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Loading JCAActivationAgent for {portType=Read_ptt}
    <2008-01-22 18:25:49,914> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Locating Adapter Framework instance: OraBPEL
    <2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::load - Done loading JCAActivationAgent for processId='bpel://localhost/default/BPELProcess2~1.1/
    <2008-01-22 18:25:49,930> <INFO> <default.collaxa.cube.engine.deployment> Process "BPELProcess2" (revision "1.1") successfully loaded.
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::uninit Shutting down the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.0/', activation properties={portType=Read_ptt}
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - performing endpointDeactivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Endpoint De-activation called in adapter for endpoint : D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::init - Initializing the JCA activation agent, processId='bpel://localhost/default/BPELProcess2~1.1/
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> JCAActivationAgent::initiateInboundJcaEndpoint - Creating and initializing inbound JCA endpoint for:
    process='bpel://localhost/default/BPELProcess2~1.1/'
    domain='default'
    WSDL location='rd.wsdl'
    portType='Read_ptt'
    operation='Read'
    activation properties={portType=Read_ptt}
    <2008-01-22 18:26:02,698> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - endpointActivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <File Adapter::Inbound> Endpoint Activation called in File Adapter for endpoint: D:\MAXIMUS_Project_Softwares\jdevstudiobase10132\jdev\mywork\MyLabs\BPELProcess2\in
    <2008-01-22 18:26:02,730> <INFO> <default.collaxa.cube.activation> <AdapterFramework::Inbound> Adapter Framework instance: OraBPEL - successfully completed endpointActivation for portType=Read_ptt, operation=Read
    <2008-01-22 18:26:02,890> <WARN> <default.collaxa.cube.activation> <File Adapter::Inbound> PollWork::run exiting, Worker thread will die
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Managed Connection Created
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> Connection Created
    <2008-01-22 18:26:04,171> <INFO> <default.collaxa.cube.ws> <File Adapter::Outbound> FileInteraction Created

  • Why is FCP Studio saving my Autosave Vault files as FC Express project files?

    I have had FCPro Studio for some time now and haven't used my FC Express software for a long time, but somehow in the Autosave Vault folder, my project is being saved as a Final Cut Express Project File.  And if I try to open one of them it only produces a Error message.  How did this happen?  Is there someplace that remembers how I used to save FCE files and defaults to that or what?  I can't find anyplace in the Preferences or Settings that tell it how to save things.  Help if you can.  Thanks

    Thanks for the heads up Tom on Andy's idea.  I like what Andy recommended, as I see that it will probably do the job to right the problem, however, before I do it... I do have projects that I haven't finished in FCE and don't want them messed up if ALL files will now open as FCP.  What do I do to keep things separate OR would it be better to just upgrade those projects to FCP and finish them there.  It is definitely a better program. Will the FCE projects suffer any ill effects by now being FCP projects?  OR should I just finish them in FCE and how do I keep them as such if I do the Cmd I change for the other files that need to be changed?
    Thanks, Andy and Tom,
    Jon
    PS.  I changed ONE of the files that was from my FCP project and was being saved as a FCE project file and I DIDN"T change all, just the one.  This seems to be one way to keep all the other FCE project files as they should be.  I could just change one by one, only the Autosave Vault files in my FCP project that I need, and so preserve the projects that are FCE projects from changing.  First-is this a good work flow and Second-How do I get the Autosave Vault to, from now on - save my FCP project files AS FCP project files? 
    Thanks

  • CF data file missing on FCP project files

    Every time I open a saved project file on Final Cut Pro, it says CF data file missing on my FCP project files. Files seem to be in constant frames folder but all black and not highlighting. suggestions?
    I was saving things on a MyBook studio external HD. I think earlier as I was working or saving on the external HD it disconnected.
    But shouldn't it have all my files still?
    I still see all my project files and capture scratches.
    Any help or suggestions please?
    Final Cut Pro 7.0.3
    Mac OSx 10.7.4
    processor 2.4 GHZ Intel Core i7
    Memory 4GB 1333 Mhz DDR3

    Hi Michael,
    When I opened the FCP project. It says " CF data file missing CF+ filename here"
    So I looked in my Render Files> Constant Frames folder and the files are in there. I tried to open the movie files and play them. When played, they all play back a black screen/nothing in the file? And some have a blue screen that says" unrendered".
    So I try to search for the file to connect it back to the project, but when I go to th folder and try to select it. It isn't highlighted, so I can't select it. So they aren't missing.
    So I have to press cancel. It seems like I'm not able to edit or work on the FCP project until I have those files connected.
    Thanks for your reply,
    Ingrid

  • File size in .cp project files

    Hi,
    I noticed that the file size of my .cp project does not
    decrease even after the removal of slides. When I cut a 29 slide
    project to ony 4 slides, the file size of the project remained the
    same (identical).
    How can I reduce the size of my .cp project files?
    Could using a .cptl template that was created in a prior
    version of Captivate cause problems with the project file size?
    Thanks,
    Luke

    Hi Luke
    I've seen reports here in these forums where some claim
    clicking File > Save As... once or twice will result in a file
    size reduction. Personally, I've never had it work for me. But it
    may be worth trying to see.
    The only sure fire way I'm aware of to clear elements and
    reduce the size is to open a second instance of Captivate. Create a
    fresh blank project using the same dimensions as the larger one.
    Then copy slides from the existing project to the new. But this
    probably breaks any branching you may have.
    Cheers... Rick

  • Render control file not valid for" project.aep -- Please Help!

    I'm using AE CC
    I've read all the discussions I could find on this topic to fix this problem.
    All my computers are mapped correctly. The file that I'm sending at this point is very basic.  Once jpg sequence (as a test) name shadowMatte - no spaces, underscores, very basic.
    -The file is set for multimachine rendering in render queue
    -I collected files with 'Collect Source Files: None' , Enable  'Watch Folder' render' checked
    I'm not new to using multi machine rendering, this time around I just can't seem to get it to work...
    all render slaves at least 8 gigs of ram.
    Any help on this matter would be GREATly appreciated.
    - Max

    > "Hello - is there any one left at Adobe  to help with this?  "
    This is a user-to-user forum, where people help out in their free time. If you want a guaranteed response from Adobe personnel, contact Adobe Technical Support:
    http://www.adobe.com/support/contact

  • I am connected to my remote server and "put files" but the web page files do not update, whats going on?

    I really can't figure this out:
    So I use a different computer at school for web design, I bought Dreamweaver to work on it at home, I get the files fine from the server that I uploaded at school but then I make changes at home computer and connect and "put" them and I check online and the web page doesn't change one bit.
    I don't have the exact file extensions from the computer at school but when I connect and get I have a similar folder(s) set up and then it downloads them into Dreamweaver file manager box and makes the folders there I downloaded. The site shows up fine in Dreamweaver after I "get" so great I thinking.
    But... not so fast, I change the page in Dreamweaver, preview n a browser and look right on so I "put", connect to server and upload. Then I check online an its still the same I uploaded the CSS and HTML and dependent files by dragging over and also using the up arrow "put" as well but nothing changes on the web page online.
    What is happening here I am so confused?
    Thanks a bunch, I mean I can still preview as I go but I really curious why my "put" files don't change my web page like at all!

    Have you tried refreshing the browser, or deleting the browser cache?

  • Resource role information from shared resource pool file to a master project file

    Hi,
    I am using Microsoft Project Professional 2013. We have multiple project managers running their own projects. We are building out a PMO and are bringing all these plans into one master 'portfolio' plan.  So
    we have one master plan file, subproject 1, subproject 2... and then we have setup a shared resource file where all resources are utilising the same shared pool.
    This works well and in the master file we can do resource usage checks. We have also  added extra columns such as resource group which gets shown in the master file and we can filter which group (in our
    case infrastructure, projects, applications etc) are consuming most resources.  
    The bit I am stuck on is management also wanted to report on the resource role ie which person is a project manager, business analyst etc. I have created a custom field in the shared resource plan as 'resource role' and populated as per their job role but for
    some reason the info added in the shared resource file doesn't get conveyed to the master file as say the resource group does.
    Any ideas ?
    Thanks in advance

    Thanks Dales for helping out.  Thats how I originally did it. Went into organizer. At first I had copied the 'Resource Role' custom field to the global template and then in the master file added the same column but nothing showing. Then tried same again
    but this time copying directly to the master file but still no joy.
    I am seeing 'Resource group' appear as it should. I make a change to a someones resource group in the share pool file and I see the change in the master file but not happening with the custom field resource role.
    Terry

  • Generate WAR files from WEB projects

    Can I generate war files with my web projects?, i have some portal and proccess
    projects, and i need to generate wars. If i can generate ear files it´s great.
    Does someone knows to do it?

    Build => Build Ear.
    You can unzip that to find the war issuppose.
    Maybe right clicking on your web project and doing "build ..." might
    generate a war in your project directory too.
    Thank you for any and all help,
    Geoffrey
    "Leonardo Contreras" <[email protected]> schreef in bericht
    news:3fe89850$[email protected]..
    >
    Can I generate war files with my web projects?, i have some portal andproccess
    projects, and i need to generate wars. If i can generate ear files it´sgreat.
    Does someone knows to do it?

Maybe you are looking for

  • Issue with a work order

    Hi Team, I am having an issue with the work order having multiple line items for the same component. Out of all line items it is showing error for two line items mentioning, No status object available for CMP 81411471 0160 0110 Double clicked on it m

  • Cancelling a A/R invoice

    Hello Everybody, I am trying to cancel A/R invoice. like if i want to cancel sales order i can do it simply use right clik and selecting cancel. but this option is not available for A/R invoice. if i want to create this option using sdk how should i

  • Time machine error messages

    I have an external 1 tb backup drive (Seagate) which I've set up for TIME MACHINE.  Although it appears to be working (lights up, able to access back dates), I keep getting a messate "Time maching couldn't complete the backup to "Untitled" (my extere

  • Ipod external speakers

    does anyone know how i can get my speakers in my ipod 3rd generation to work? all my friends can get it but when i take out the headphones i hear nothing!!! PLZ HELP!!!

  • WiFi quit working on Mac Air

    The WiFi on my Macbook Air suddenly quit working. I have tried everything to get it to read the signal including deleting the settings and starting over. My two iMacs and my iPad all read the WiFi fine. Can anyone help?