What is Weblogic current directory?

I have multiple clusters and servers created on a Weblogic instance.
What is the current directory, e.g. if I read/write a file from servlet without specify the directory? ldealy, the directory is neutral to clusters/servers.
Thanks

Hi,
Please place your Properties file *(Or Whatever file you want to read...)* inside the *<DOMAIN_ROOT>* Directory for Example Location: "user_projects/domains/mydomain" directory
After Placing any Property file inside the "domain root" directory can be read without restarting the Server...
below is a simple example for the same.......
*"a.properties"*
city=NewYour
country=America
*"index.jsp"*
<%@ page import="java.util.*" %>
<html>
<head>
<title>Hi It's Wroking</title>
</head>
<body bgcolor="maroon" text="white">
<center>
<%
InputStream is=new FileInputStream("./a.properties"); // No need to specify the File Path now
Properties prop=new Properties();
prop.load(is);
out.println("City: "+prop.getProperty("city"));
out.println("Country: "+prop.getProperty("country"));
%>
</center>
</body>
</html>
Like this you need not to redeploy your Application...If you want to make any changes in the property file ...Just eidt it...and the Properties files changes will be dynamically picked up by the application,
Thanks
Jay SenSharma
http://weblogic-wonders.com (Wonders Are Here)

Similar Messages

  • What is the current directory when running Tomcat

    Hi,
    In one of my classes I try to open a file for reading. I did this with:
    FileReader fr = new FileReader("files/httpd.conf");
    When I try to run the project, it can't find the file. I tried every possible place in my webapps directory and when I insert some code to take a look at his current path, i get an index which really isn't in webapps.
    Can somebody please tell me where to put my files when i try to open them using files/httpd.conf
    Much thanks,
    Hugo Hendriks

    I'm still getting a servlet error because he can't find the file. My directory structure is like:
    webapps/act/ = all my html and jsp files
    webapps/act/files = all my data files
    webapps/act/WEB-INF/classes/apacheconfigurator = all my class files
    my call in the class looks like this:
    //Declareren van de input file
    FileReader fr = new FileReader("../webapps/act/files/httpd.conf");
    BufferedReader br = new BufferedReader(fr);
    //Declareren van de temp output file
    FileWriter fw = new FileWriter("../webapps/act/files/httpd.temp");
    PrintWriter pw = new PrintWriter(fw);

  • What versions of Weblogic currently have Subject Alternative Name support?

    I would like to visit a comment I saw in an old forum thread from 2010
    Certificate hostname verification error with 10.3
    that "WebLogic currently does not support the Subject Alternative Name field." Can someone please let me know what versions of Weblogic currently have Subject Alternative Name support? We are currently on 10.3. Is there anything near that version that has support, or a patch available for it?
    Regards,
    John

    The KM number is the article number on the support site. Logon to Oracle support and paste the number into the knowledge search and you will get your answer. The article is called "How to Develop Custom Hostname Verifier for Subject Alternative Name (SAN) Certificates" and applies to WLS 10.3.3 and later.

  • How to get the path of current directory?

    I have the Java servlet to produce text file, and it produces to C:\hello.txt,
    but I want to output in the current directory as the Java File:
    i.e. C:\jakarta-tomcat-4.1.30\webapps\ExtendedGUI\WEB-INF\classes
    try
         PrintWriter out = new PrintWriter(new FileWriter("hello.txt"));
         out.println("HELLO");
         out.close();
    catch(IOException e)
    any ideas?? Thanks!!

    The current directory is defined as the directory that you started your servlet container from. In your case, it was c:\. If you want it to fall into the same directory as your class files, I would start by finding out what TOMCAT_HOME or whatever container you're using is and adding to the directory until you get to your class directory. Make sense?
    The easiest way is to read the output directory from a properties file as a resource or a hardcoded path.
    HTH

  • How to create a file in current directory

    hi,
    I want to create a file in a current directory, But when i written following
    code then it cannot create file, How i will create file in current directory?
    Is there anyone who can help me?what will be the solution of this problem?
    Please give me solution
    String dir=application.getRealPath("/");
         int count;
         String filename="sample.txt";
         out.println(dir+filename);
         FileOutputStream fout=new FileOutputStream(filename);
         PrintStream p;
         p=new PrintStream(fout);
         p.print("1");
         p.close();with regards
    Bina

    hi,
    my problem is that my path is ok...but when i open file in this directory then
    it cannot open a file, is there anyone who can do it? When a user save data in server from remote
    area then what will be path of my code? how i will solve it? please give me
    solution.
    with regards
    bina

  • Acrobat Pro "save as" function in the file menu does not show the current directory of the file

    I have installed CC but Acrobat Pro gives me headaches.
    The "save as" function in the file menu does not show the current directory of the file but something I have worked on in the past.
    It forces me to navigates through my hard disk for this very straightforward thing in normal conditions. I precise: Acrobat is the only software reacting like that.
    I use Windows7 professional 64bits.

    I use what seems to be the latest version available on the Cloud:
    To illustrate my point, I open a directory with explorer and double-click on the only PDF in there:
    So here it is, open:
    When I do a "Save as", it takes me to a totally different place on the disk!
    Very annoying...
    Thanks for your time!
    JJ

  • How to get absolute path of current directory?

    Hi, everyone!
    I want to get the absolute path of current directory.
    Are there some APIs that I can use?
    Thanks in advance,
    George

    Hi, dheeraj_tak buddie!
    What do you mean in your reply?
    "in File class u have all this methods for getting absolute path "regards,
    George

  • Specifying current directory in Receiver File Adapter

    Hi Experts,
    I have been configuring a receiver file adapter to place a file onto an FTP server. As per the information provided, as soon as I login to the FTP server, I have to place the file in current logged in directory. In this case, how can I mention this in file adapter as to use the current directory path to place the file? What should I enter in 'Target Directory' in File Access Parameters?
    Thanks,
    Dhawal

    Hi Praveen,
    Since file directory parameter is mandatory, my question is what should I enter in this parameter so that the file adapter will know that the file should be placed in the root directory itself?
    Regards,
    Dhawal

  • How to create a file in server's current directory

    hi,
    I have a project, but when i will run my program on internet Explorer then
    it will create a folder in server's current directory, but i will not specify
    drive & folder, it will create a folder in server's current directory, after that
    i will read file from that, what will be the solution of this ? Is there
    anyone who can give me solution? PLease help me
    With regards
    Nahar

    ServletContext context = session.getServletContext();
    String realContextPath = context.getRealPath(request.getContextPath());this will give you access to the servlets current directory
    from there you can create a file
    I dont know how much this will help

  • Saving file object to current Directory.

    Ok I did a file transfer thing, after I receive the file object, how do I save it to the current directory?
    Thanks.

    This saves an empty file.It's up to you to put data in it. I have no idea where your data is coming from.
    I wanna save the file and the contents to the current
    directory.What contents?
    Any ideas?Look at the OutputStream and Reader interfaces in the API.

  • [SOLVED] Open new Screen windows in current directory?

    GNOME Terminal has been my preferred terminal application for quite some time; lately, however, I have been using xterm and screen.
    In gnome-terminal (and probably in other tabbed terminal apps), opening a new tab (by default) presents the user with a shell (BASH, in my case) opened to the old tab's PWD. If possible, I'd like to have Screen re-create this functionality....
    I've found this page on the subject, but my experimentation with Screen windows (which has shown me that new windows are not started as subshells of the window from which they are created) suggests that the described method will not work.
    Does anyone know of a way to make Screen emulate this bit of gnome-terminal behavior?
    Thanks!
    Edit:
    I just found this information. It seems that issuing the screen command itself (from within Screen) will open a new window in the current directory. As I almost always use the C-a c keybinding to open new windows, I hadn't realized that this works.
    I'm going to attempt to create a keybinding to do what I want. I'll post an update with the results.
    Last edited by ssjlegendx (2008-08-03 01:38:29)

    After looking further into the issue, it seems that the aforementioned keybinding might not be possible. (Explicitly binding C-a c to screen does not alter the normal functioning of that key combination.) Thinking about the situation, it makes sense that Screen cannot know the PWD without getting information from inside the shell (i.e., without being invoked from within the shell).
    To overcome this issue, I added the following to my ~/.bashrc:
    if [ $TERM == "screen" ]; then
    alias s='screen'
    fi
    Though this leaves the behavior of C-a c unaltered, using the alias s seems to be a simple way to achieve the functionality I wanted. (It might even prove useful to have the "option" of creating a window in the original directory via C-a c.)
    Edit:
    I have since modified the above as follows:
    if [[ $TERM =~ screen(.linux)? ]]; then
    alias s='screen'
    fi
    This causes the alias to be set even when running screen from a regular tty (where $TERM is screen.linux).
    Last edited by ssjlegendx (2009-04-22 17:41:28)

  • Save for Web & Devices to Current Directory

    Hey everybody,
    I have hundreds of images in a series of folders that I need to Save for Web with a automated batch.  The problem is, that Save for Web exports the images to a new directory, and not the image's current directory.  With hundreds of images in a bunch of subfolders, this isn't very time effective.
    Is there a way (either in Photopshop or with another program), to run the automated batch so that the finalized image is saved in its original folder?
    Thanks!
    MrDashen

    Using Image Processor doesn't help.  The "web-ready" images are still saved to a seperate location and copies of the original images are saved under a new /jpeg folder.
    Imagine I currently have this structure before batching:
    Folder 1
    Image 1
    Image 2
    Image 3
    Folder 2
    Image 4
    Image 5
    Image 6
    Using Image Processor gives me this:
    Folder 1
    JPEG Folder
    Image 1
    Image 2
    Image 3
    Image 1
    Image 2
    Image 3
    Folder 2
    JPEG Folder
    Image 4
    Image 5
    Image 6
    Image 4
    Image 5
    Image 6
    Export Location Folder
    Image 1 Web
    Image 2 Web
    Image 3 Web
    Image 4 Web
    Image 5 Web
    Image 6 Web
    What I want is the end result to be:
    Folder 1
    Image 1 Web
    Image 2 Web
    Image 3 Web
    Folder 2
    Image 4 Web
    Image 5 Web
    Image 6 Web
    Does that make sense?

  • ClassNotFound in current directory

    I'm trying to figure out how to build an XML Schema object so I downloaded three separate examples today from the Internet in *.jar and *.zip files. I extracted the *.java files and started compiling them in the order specified in the README docu. As soon as I try to create a class that extends or instantiates one of the intial classes created, I get a ClassNotFound error.
    The package names at the top are all the same. The sub-directories that they loaded to have the same exact name as the package name. I checked my ClassPath environment variable and the very first entry is a period followed by a semi-colon and then the other directory paths. This should tell Java to look in the current directory first. What gives??

    OK, I tried compiling from the first directory back but it still didn't work. For example: The package name is saxparse and all the *.java source files loaded into directory saxparse. I then successfully compiled ClassOne.class into saxparse. Then I tried to compile ClassTwo which extends ClassOne and received the ClassNotFound error. So now I tried running the javac command from the directory on top of the saxparse directory and still got the ClassNotFound error.

  • How to get the Current Directory

    Hi,
    I need to tell the system to read a file in my current directory. How do I tell the system what the current Directory Path is
    Thankx in advance...

    It depends on the current working directory from which you start your JVM.
    From DOS or UNIX shell this is the directory where you have come by "cd".
    On Windows you can do the same from Explorer or other file managers: the directory where you are when starting JVM.exe.
    If you define shortcuts - e.g. on the desktop -, you specify it there as the "working directory".
    You can retrieve this directory by
    System.getProperty( "user.dir" )
    Now with File classes:
    Each file name without path will be interpreted as being in this directory.
    Absolute paths are clear.
    But you can't mix this:
    If you specify "test/debug.ini" or "test\\debug.ini" from debug directory: false!
    If you specify "../debug.ini" or "..\\debug.ini" from debug/test directory: false!
    Do it this way:
    Start from debug directory.
    So you can access file debug/test/debug.ini as
    System.getProperty( "user.dir" ) + "/test/debug.ini"
    Works?

  • Can we force InDesign to look for links in current directory.

    An InDesign document has links to images/InCopy stories located at some location,say, "Dir_1". The copy of all the linked items are present in current directory of InDesign document.
    When we open this document in InDesign CS3 , the document is linked with the items under "Dir_1".
    If the linked items under "Dir_1" are deleted(while opening the document) InDesign CS3 looks for the linked items in current directory and links them to the document,automatically.
    Is there any option/API provided by InDesign CS3 UI/InDesign SDK to force InDesign to look for linked items in the current directory, irrespective of whether the original links are present or missing.

    Ha! I've been playing with this all morning long. In the long term, I think we might need a plugin developer, to be honest. In the short term: you could affix a set of Latin-script characters to each word to force the sort order:
    ΩUʿUnuq
    ΩHḪirbet
    ΩLLondon
    So: generate an index, grab your place names, peel off the omega, resort the index, then GREP for two caps in succession and peel off the first. I dunno if this would work, I'm not 100% clear on how you are working.
    Or, alternately, another way to force a secondary sort order: Go to "Sort Options" in the Index flyout, add a sort order you know you won't be using (Greek?), then learn correct alphabetical sort order in Greek, then prefix all of your placenames with Greek letters, in the way you wanted the final sort to run. What I've been doing is styling my Hebrew glyphs (for indices in Farsi and Kurdish) with a separate character style so they're easier to find and remove.

Maybe you are looking for

  • Can't restore from Time Machine using recovery partition

    I came up with the idéa to put in an extra disk (SSD) into my mid 2009 13" Macbook Pro running Mountain Lion and create my own fusion drive. In order to make sure not to lose all of my data I made sure to back up all my files using Time Machine so th

  • How to write this code ?

    I need to write 3 classes that each one can get to the other with the same instance of the class , so how do i write this code ? thanks a lot

  • Iphoto Deleted but not trashed

    My Iphoto library was trashed but the trash was not deleted. I dragged it to the desktop then dragged it to the dock but it isn't working properly. I have the pictures in my library but whenever I scroll thru the pictures or even click on the iphoto

  • Does 2.2 admin with with panther (ARD 1.2) clients?

    I have a group of Panther (10.3.5) machines that I currently admin from my Panther desktop. All of these are running ARD 1.2 (I don't believe 1.2 had seperate admin and client components...true?). I've added a Tiger machine and need to admin it also

  • Automatically adding objects to Trasport Request

    Hi All, I want to add few objects (DDIC domains, to be specific) to an exisiting transport request. I want to add this through a program. Please let us know how I can do the same. Please let me know what FM's or Report programs available to do this.