Access mirror site using java, download files and other information?

Hi, I have 2 nodes/servers on the system both running webservers and having the same interface, but at a time user will access one node at a time from their browser, but this interface will be able to allow the user to get information from the both the nodes. the information that the user can get is DB stored as well as files on the disk of either node.
i can manage the DB, cuz there is nothing to it, but how do I get files from the other node?
currently any files/web documents are all stored in a application directory of the web root and protected by htaccess i believe, so when a user logs on to node one he can access all plain text/binary files along with web content since the web server authorizes the user to access anything in that dir. but at the same time from the same session I want to be able to access files in a mirror site using the same username and password and not having him to enter it again. the username/pass combo is replicated on both the servers, it this possible?
currently i use the http password protection provided by apache to access one node, but can i use the same session on another machine with the same credentials?
If this is not possible how can i do this programatically using java? can i do can "ls" on the directory i want on another server and display the list to the user and then when he clicks on that file name i fetch it from the backup/mirror server and have him save it using http or ftp?
It would be great if we can get a solution to this.
Thank you very much in advance.
Ankur

If you install the web server on different machines, It is possible to share the informations between them.

Similar Messages

  • Access https site using Java, is it possible?

    I am new on https programming, please give me some advice on this issue.
    I have to access an https site, say: https://someoneelsesite/
    That site needs a client certificate. I got one certificate which I can now use it to acess the site using IE Web Browser.
    Now my question is: is it possible for me writing a Java program to access that site? ( I need to download a file each day on that site)
    I read some articles from this forum. Information I got looks like I need https site's public server certificate which I do not have. All I have is a client certificate given by that site to me.
    Some one please advise.
    Thanks a lot.

    Thank you very much for your reply.
    I searched this site before. The post I got says I need a public certificate of web serve which I do not have. (Maybe I understand it wrong!)
    Could you post some piece of your code which connect a https site with only client certificate?

  • Trying to write data to a text file using java.io.File

    I am trying to create a text file and write data to it by using java.io.File and . I am using JDeveloper 10.1.3.2.0. When I try run the program I get a java.lang.NullPointerException error. Here is the snippet of code that I believe is calling the class that's causing the problem:
    String fpath = "/test.html";
    FileOutputStream out = new FileOutputStream(fpath);
    PrintStream pout = new PrintStream(out);
    Do I need to add additional locations for source files or am I doing something wrong? Any suggestions would be appreciated.
    Thank you.

    Hi dhartle,
    May be that can help:
    * Class assuming handling logs and connections to the Oracle database
    * @author Fabre tristan
    * @version 1.0 03/12/07
    public class Log {
        private String fileName;
         * Constructor for the log
        public Log(String name) {
            fileName = name;
         * Write a new line into a log from the line passed as parameter and the system date
         * @param   line    The line to write into the log
        public void lineWriter(String line) {
            try {
                FileWriter f = new FileWriter(fileName, true);
                BufferedWriter bf = new BufferedWriter(f);
                Calendar c = Calendar.getInstance();
                Date now = c.getTime();
                String dateLog =
                    DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM,
                                                   Locale.FRANCE).format(now);
                bf.write("[" + dateLog + "] :" + line);
                bf.newLine();
                bf.close();
            } catch (IOException e) {
                System.out.println(e.getMessage());
         * Write a new line into a log from the line passed as parameter,
         * an header and the system date
         * @param   header  The header to write into the log
         * @param   info    The line to write into the log
        public void lineWriter(String header, String info) {
            lineWriter(header + " > " + info);
         * Write a new long number as line into a log from the line 
         * passed as parameter, an header and the system date
         * @param   header  The header to write into the log
         * @param   info    The line to write into the log
        public void lineWriter(String header, Long info) {
            lineWriter(header + " > " + info);
         * Enable to create folders needed to correspond with the path proposed
         * @param   location    The path into which writing the log
         * @param   name        The name for the new log
         * @return  Log         Return a new log corresponding to the proposed location
        public static Log myLogCreation(String location, String name) {
            boolean exists = (new File(location)).exists();
            if (!exists) {
                (new File(location)).mkdirs();
            Log myLog = new Log(location + name);
            return myLog;
         * Enable to create the connection to the DB
         * @return  Connection  Return a new connection to the Oracle database
        public static Connection oracleConnectionCreation() throws Exception {
            // Register the Oracle JDBC driver
            DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
            //connecting to the DB
            Connection conn =
                DriverManager.getConnection("jdbc:oracle:thin:@myComputerIP:1521:myDB","user", "password");
            return conn;
         * This main is used for testing purposes
        public static void main(String[] args) {
            Log myLog =
                Log.myLogCreation("c:/Migration Logs/", "Test_LinksToMethod.log");
            String directory = "E:\\Blob\\Enalapril_LC-MS%MS_MS%MS_Solid Phase Extraction_Plasma_Enalaprilat_ERROR_BLOB_test";
            myLog.lineWriter(directory);
            System.out.println(directory);
    [pre]
    This class contained some other functions i've deleted, but i think it still works.
    That enables to create a log (.txt file) that you can fill line by line.
    Each line start by the current system date. This class was used in swing application, but could work in a web app.
    Regards,
    Tif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • I got a java excutable file and document from the instrument supplier I want to use it in labview , I want to Know how to do it , step by step

    I got a java excutable file and document from the instrument supplier I want to use it in labview , I want to Know how to do it , step by step
    Attachments:
    this is a java file changr the jpg to jar .jpg ‏101 KB

    I'd recommend searching the forums to find your answer.  http://forums.ni.com/ni/search?submitted=true&q=java+labview

  • JSP, downloading files and show html page

    I like to download files and show a html page on JSP.
    With the source following, downloading works well.
    But, it is just remained on the previous page, not showing the next html page.
    Someone tell me why is it?
    <%@ page import="java.io.*, java.net.URL"%><%
    String file_name = request.getParameter("file_name");
    File fileDir = new File(config.getServletContext().getRealPath("upload/"));
    File theFile = new File(fileDir, file_name);
    FileInputStream fin = new FileInputStream(theFile);
    response.setHeader("Content-Disposition","attachment; filename=\"" + theFile.getName()+"\"");
    response.setContentLength((int) theFile.length());
    BufferedInputStream bf = new BufferedInputStream(new FileInputStream(theFile), 8096);
    int i;
    while ((i=bf.read()) != -1)
    out.write(i);
    bf.close();
    out.close();
    %>
    <html>
    <head>
    <title>file download</title>
    </head>
    <body>
    <p align="center"> </p>
    <p align="center"><b><font face="Tahoma" color="#000000" size="2">You have
    successfully downloaded your file(<%=file_name%>)!</font></b></p>
    </body>
    </html>

    You's already close the JSP output stream befor you try and write your html confirmation, and I don't think browsers can provide the kind of functionality you're trying to demonstrate here. A browser will download the file and open it directly itself or using another application based on user input (e.g. save as, open file, etc.). Once the file is opened or downloaded, it's done!
    I think your best bet is to show a dialogue that the user's download should begin, then set the pages href w/ JS to the location of the file, same way other sites that allow you to download files do it. Go take a look at download.com or something like that.
    Hope that helps.

  • How to access sharepoint logs using Java?

    Is there a way to access Sharepoint logs using Java from a remote machine? 
    Any help / pointers would be appreciated. Thanks.

    Hello,
    I am not aware about any client modal class for log but if you create your own service and host in SP server then you can call this web service in JAVA. (i am not sure whether JAVA supports .NET web service or not).
    You can refer this for web service:
    http://www.arboundy.com/2010/12/centalised-view-of-sharepoint-uls-log-files/
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to not append '.PART' to the file name of the currently downloading file, and just download the file with its normal filename

    In Windows, when Firefox (I'm currently using 7.0) downloads a file, it appends ''.PART'' to the file name of the currently downloading file and just renames it to its original file name after it finishes downloading.
    I sometimes like to watch a currently downloading video file, so it will be better if Firefox just downloads the file to its actual filename (like what Opera does), so I can easily double click the incompletely downloaded file and watch it with the video player assigned to that file extension, rather than the awkward ''Right click -> Open With -> Choose Default Program'' route with .part files.
    Does anyone know how to set Firefox to do this?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox and prevents Firefox from renaming the .part file.
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See "Disable virus scanning in Firefox preferences - Windows"
    * http://kb.mozillazine.org/Unable_to_save_or_download_files

  • Generic Populating the XML document using Java Class Generator and Reflection

    I am looking for a generic source code in order to convert the data parsed from any tabular text form ( tab delimited for example that maps certain XML Schema created form Database Schema for Oracle.
    I know it is possible to generate XML DTD or XSD from Oracle database table schema by XSU utility from XDK. And also it is possible to create Java source files from an XML DTD or XSD by using XML Clas Generator.
    I believe there must be some generic code that parses tabular text data and converts them to XML format using above mentioned generated Java source files and may be Java reflection mechanism.
    If anyone has any tool or knows any free ware that helps me, I would like to know about it, and I would really appreciate it.

    1. Read the XML file into a DMO object, walk the DOM to find the list, insert your new entry as a child, write the DOM back to a file.
    2. If the XML is not in a file, but in a string, then you can do the same with string input and output.

  • I purchased creative lightroom presets. I see the zip file in my download file and I try to import to LR but it just keeps creating a bundle never giving me the option to import (greyed out). What am I doing wrong?

    I purchased creative lightroom presets. I see the zip file in my download file and I try to import to LR but it just keeps creating a bundle never giving me the option to import (greyed out). What am I doing wrong?

    Try unzipping the file first. I have no idea regarding your level of technical expertise so advanced apologies if this is really basic. A ZIP file is a compressed file containing one of more files within it. To access the files you will need to expand it. If you double-click on it first, it should open up for you. If it does not automatically expand, you can select the files and copy them to a new folder. The copy will unload them into an uncompressed form. Once they have been uncompressed, you should be able to import them.
    If the import is still giving you problems, go to your Preferences, click on the Presets tab and click the Show Presets Folder button. You can then copy your purchased presets into the folder shown. You will want to copy them to the User Presets subfolder.

  • Failed to delete a file in MS Vista using java.io.File.delete()

    while trying to delete a file using java.io.File.delete(), it returns true but the file lies intact.
    i'm sure there is no handle or stream open on the file..
    the same code is running fine in XP..
    if anyone can help me.. thanks

    thanks all..
    the problem is diagnosed further..
    MS Vista does not let a user program to delete any file from 'windows' or 'program files' directories..
    Even when the file is deleted manually thru explorer a confirmation is taken from the administrator.. even when he is logged in..
    i for now have opted to install and use my program in Vista outside 'program files' directory...
    more clarification welcome..

  • How to access Websphere variables using java

    Hi
    I want to access Websphere variables using java.
    Any help is appreciated!!
    Thanks
    P

    WebSphere Application Server has a bunch environmental variables such as log locations. These are held at the "server", "node", and "cell" level.
    To access them, you have to get the right context. Something like this, I believe...
    InitialContext initialContext = new InitialContext();
    initialContext.lookup("foo:bar/baz/blah"); //correct context hereGo to the IBM website for WAS and do a search on namespace bindings. That should give you some more information.
    Good luck.

  • I have an ipod touch. previously when i did not update it it used to download skype and kik messenger but now when i have updated it it wont download any od them. i have 4.2.1 software at the moment. im really confused, what might be the problem here?

    i have an ipod touch. previously when i did not update it it used to download skype and kik messenger but now when i have updated it it wont download any od them. i have 4.2.1 software at the moment. im really confused, what might be the problem here?

    Many developers when they updated their apps fro the newer iOSs dropped support for the older iOSs. That included Skype and other developers. Unless you have a copy of the apps version that was compatible with your iPod/iOS you are out of luck. Do you cave such a copy in a computer file backup??

  • Help building an e-commerce site using DreamWeaver MX 2004 and Oracle 10G

    I'm new to using Oracle 10G. After reviewing several rdms's I've picked Oracle 10G as my rdms. I'm trying to build an ecommerce site using DreamWeaver MX 2004 and Oracle 10G. The website will be selling hardware and software products. I have a choice in DreamWeaver to go for a .asp or .jsp setup. I have several questions, here goes:
    1. Is there any book/tutorial/whitepaper out there that describes building an ecommerce site using Oracle 10G/9I/8I? Just some examples as how to make the datamodel regarding the shopping basket etc.
    2. I prefer DreamWeaver as it let's me make nice looking css style based pages without throttling too much through the code. Are there Oracle tools which allow me to make an advanced nice looking ecommerce site?
    I hope some of you can help me get started. Any effort is appreciated.
    Cheers

    I'm new to using Oracle 10G. After reviewing several rdms's I've picked Oracle 10G as my rdms. I'm trying to build an ecommerce site using DreamWeaver MX 2004 and Oracle 10G. The website will be selling hardware and software products. I have a choice in DreamWeaver to go for a .asp or .jsp setup. I have several questions, here goes:
    1. Is there any book/tutorial/whitepaper out there that describes building an ecommerce site using Oracle 10G/9I/8I? Just some examples as how to make the datamodel regarding the shopping basket etc.
    2. I prefer DreamWeaver as it let's me make nice looking css style based pages without throttling too much through the code. Are there Oracle tools which allow me to make an advanced nice looking ecommerce site?
    I hope some of you can help me get started. Any effort is appreciated.
    Cheers

  • HT1711 I puchased 3 songs and was charged and never downloading their currently sitting there with download error and when i tap to retry it still wont download waht can i do as i have been charged?

    I puchased 3 songs and was charged and never downloading their currently sitting there with download error and when i tap to retry it still wont download waht can i do as i have been charged?

    Have you tried signing out of itunes and then signing back in

  • Sony 50mm f1.4 ZA SSM Lens Profile in 8.4 RC  any way I can download file and load into Lightroom ?

    Sony 50mm f1.4 ZA SSM Lens Profile in 8.4 RC  any way I can download file and load into Lightroom ?

    Short answer. No.

Maybe you are looking for

  • Copying data to multiple fields

    I have a number of forms which have been created in Acrobat 8 Professional using the Acrobat tools (not LiveCycle) where I need data entered in one field to copy to another. Usually this data is text. I have used the following Javascript in the Calcu

  • Custom Metadata url

    I have some custom metadata as type url and the button works perfectly in the metadata panel to open the page. I was wondering is there a way to show text for the url in the field instead of the url itself. Like you do in a html like with the text be

  • Error while using mxml taglib in jsp

    Hi, I am getting following error while useing the mxml taglib in jsp for flex 2.0.1, java.lang.NullPointerException flex.webtier.server.j2ee.jsp.MxmlTagImpl.doStartTag(MxmlTagImpl.java:112) flex.bootstrap.BootstrapTag.doStartTag(BootstrapTag.java:77)

  • Time machine issue: always full backup after upgrade to Mavericks

    I just upgraded to OS X Mavericks - since then, each Time Machine backup is a full back (Instead of just backing up the differential between backups) - I couldnt find the answer on the web, pls help! Thanks

  • U00BFHow can I raise an event from visual basic to BW?

    Im looking for simple vb code that will raise and event that will trigger some process chains I have in bw. something similar to Set R3 = CreateObject("SAP.Functions") R3.RaiseEvent("myEvent") I'm sure I saw the code before, but I have looked for hou