Solution to using Site Root with Sub-folders on Testing Server & Browser Previews

Hi Everyone
Have found an elegant solution when using Site Root relative linking for a website, that allows browser previews, even when the testing server uses sub-folders and the live code references just the server site root " / " of the live server and not the sub-folder structure of the testing server.  This is really useful when you don't want to use document relative linking, which normally takes care of this problem in Dreamweaver.
The solution is to use sub-domains referencing the sub-folders on the testing server, so the sub-folders appear as the root of each website and the html code pointing to the site root works correctly on both testing & live servers without alteration.
Testing Server Setup
One testing server domain is used for all client development work:
For example:  www.testingserver.com
On the testing server there are multiple sub-folder (one for each client website being developed):
For example:  www.testingserver.com/clientA/ ,  www.testingserver.com/clientB/ , www.testingserver.com/clientC/
Live Server Setup
The site code needs to be developed with the final live server folder structure (url references) in mind:
For example:  www.livesite.com (with all pages referencing the root of the live site server)
Page URLs on Testing & Live Servers
/page-name.html
Testing server url:  www.testingserver.com/clientA/page-name.html
Live server url:  www.livesite.com/page-name.html (without /clientA/ sub-folder)
Browser Previews Don't Work
You want to be able to run browser previews on the testing server while developing the website.  To do this you normally have to reference the sub-folder structure of the testing server in the url for things to work right:
For example www.testingserver.com/clientA/page-name.html
What do you do, when you can't keep switching all the urls in the code from pointing to the sub-folder to pointing to the site root, and you don't want to use document relative linking?
One Solution - Sub-domains on Testing Server
In your domain hosting (outside of Dreamweaver) setup a sub-domain to point to the testing server sub-folder.
For example:  Sub-domain clientA.testingserver.com points to www.testingserver.com/clientA (sub-folder)
So now when you reference the sub-domain it sees the sub-folder as the site root and all your problems are solved.
Dreamweaver Site Definition Setup
Site Definition under "Local Info"
Links relative to: Site Root
Site Definition under "Remote Info" (live server)
Access: FTP
FTP host:  ftp.livesite.com
Host directory: /
Site Definition under "Testing Server" 
Access: FTP
FTP host:  clientA.testingserver.com
Host directory: /
URL prefix: http://clientA.testingserver.com
(location of the site's root folder on the testing server, the sub-domain redirection takes care of pointing to the sub-folder)
This is just one solution but it works well for me as it doesn't have any cost associated with it under our hosting package where you can have multiple sub-domains setup.
Hope this helps someone in a similar situation.
Aly

Just Google it, or run out and buy a copy of David Powers' Foundations Dreamweaver CS4 with CSS, Ajax and PHP, a book that is never out of reach for me.  He details the process explicitly for both Mac and PC.
For me, on W7, I edit the C:/Windows/System32/drivers/etc/hosts file, and add the ip of my testing server along with the site alias -
192.168.1.82  site.local
Then I add this same designation to my httpd.conf file in Apache on the testing server.  Finally I restart Apache.
Now from my production machine if I browse to "http://site.local", I get to see either the default file in the root of the site on the testing server, or a directory of the site on the testing server (my testing server is a unix box running on my LAN at that ip address).  Furthermore, all of my root relative links now work as they would if the pages were being browsed from the live server.

Similar Messages

  • Importing Main Folders with Sub-folders

    I am a new Mac user and I am trying to import my photos into iPhoto6.0. I have created main folders with sub-folders (eg. Main Folder = Holiday, Sub-folder = Australia Trip) and would like the sub-folders to appear when I open iPhoto. However, I cannot seem to get the main folder or sub-folder names to appear in iPhoto. The photos just get imported into the library and segregated by year.
    I tried reading the forum, and seem to infer that iPhoto cannot handle sub-folder names. However, when I read iPhoto 6.0 Help page, it states:
    "You can also drag individual photos or an entire folder from the Finder into iPhoto's photo viewing area. If you drag a folder, a film roll is created with the folder's name. If the folder you import contains subfolders, film rolls are created with each subfolder's name."
    I tried the above, but I don't seem to manage to get the film rolls named as described.
    Please help!!
    MacBook   Mac OS X (10.4.8)  

    Could it be confusion with what you are viewing in the iPhoto window?
    iPhoto always shows you a "last roll", which is really more like a smart album than a Film Roll. It is simply a quick way to find the photos from your most recent import session. When I drag in 2 folders to import, it only shows the second folder when I select "last roll." Are you seeing photos from one of your folders, or both of them together?
    Select "Library" from the top of your Source Pane to see your entire library. It doesn't mattter if you already have photos in your library or if you're beginning fresh. Under the "View" menu, select "Film Rolls" so that it is checked. Also under View, select "Sort Photos" > "by Film Roll". Now try to select the name/icon of 2 folders in Finder, then drag over the iPhoto window onto where the thumbnails display your library. (Or display nothing, if your library is empty.) Release when the curser is a green plus sign. When the import is finished you should see the 2 folder names (now as rolls) each with a set of thumbnails below it. Check the slider near the bottom right of the iPhoto window; moving it all the way to the left will give you the smallest thumbnails and allow you to see more photos at once.
    Please try this again and let me know how it goes. If this does not solve it, then I can tell you how to check what's in your library. But the Film Roll view should work.

  • Site-relative links fail on local testing server

    Using CS4/WAMP/XP, I have a testing server set up. All works well except that when I specify site-relative links, on the testing server they go back to localhost, not localhost/Frances. They work fine on the live site, but not on my testing server.
    This prevents me from using (well, testing) 'include' files for things like menus when parts of the site are in different folders.
    I have my site setup as follows:
    Local Info
    Site name "FFG2009"
    Local root folder C:\wamp\www\Frances\
    Default images folder C:\wamp\www\Frances\images\
    HTTP Address: http://localhost/Frances/
    Testing Server
    Server model: PHP/MySQL
    Access: Local/Network
    Testing Server Folder: C:\wamp\www\Frances testing\
    URL Prefix: http://localhost/Frances/
    In my Apache config file I have a virtual directory set up like this
    Alias /Frances/ "c:/wamp/www/Frances/"
    <Directory "c:/wamp/www/Frances/">
        options all +includes
        AllowOverride all
        Order allow,deny
        Allow from 127.0.0.1
    </Directory>
    I have been advised that I could temporarily change the Apache webroot folder to my "Frances" folder, but that stops other things like PHPMyAdmin from working. Also I have other sites within my www directory and I'd rather not have to change the Apache rootweb directory every time I need to work on a different site.
    Is there a way to set up my site in CS4 so that site root links go to localhost/Frances rather than just localhost?
    Thanks
    Tone'z

    Many thanks Mark.
    I fact I spent all yesterday coming to the same solution. Finally at around 12:30am this morning it worked!
    Early in the day I found the same reference you mentioned in an on-line copy of David Power's book where he exactly described the very problem I had - and with the VH solution.
    However, I had a problem with an obscure syntax error in the virtual hosts include file. I still don't know what it was. The flag to perform a syntax check on HTTPD startup didn't discover it. The problem actually prevented the Apache service from starting at all but that little point escaped me for a long time because the WAMP system tray icon is so small I didn't spot that it was telling me "some services are running" (half yellow) instead of "all services are running" (white).
    It wasn't until I ran (in desperation!) Apache Monitor that it became obvious that Apache was tripping over this virtual host definition and failing to start.
    It also seems that if you have any virtual host directive in an include file, then it negates the localhost directive in the Apache config file. So when I define the Frances virtual host, I also need to have localhost defined in the include file.
    It was this localhost directive that was causing the problem. I found it by having Apache Monitor running so I can see the true state of the Apache service and, after pointing the config file 'include' directive to a vhosts file...
    empty the vhosts file - Apache starts - 'localhost' works, frances doesn't - makes sense.
    add the frances virtualhost definition to the vhosts file - Apache starts -  'frances' goes to the frances site, 'localhost' does too (dam')
    add the localhost virtualhost definition to the vhosts file - Apache fails to start - "IE cannot display this page"
    pull out the localhost definition - Apache starts... hmmmm... .
    find an example localhost definition from somewhere else - to all intents and purposes identical to mine - add it in - Apache starts!
    Both localhost and frances now work! Maybe there was a space where no space should be - I don't know.
    Of course I also had to add entries into windows/system32/drivers/etc/hosts to point to 127.0.0.1.
    Oh yes, virtualhosts are fussy about folder names. You cannot have spaces in a folder name.
    Thanks
    Tone'z

  • Syncing photos with sub folders

    Hi
    Is there any way to sync my photo exactly like them on my pc?
    i have a photo folder and many sub folders , each sub folder contains more sub folders
    and on my iphone my sub folders merge and they all displayed in one folder

    I also have the same problem.
    With itunes on windows and an Iphone 3g, I can only sync the first level, so all subdirectory folders appear in the top one.
    This means that for example my holidays snaps are all together, which is a real pain to find anything.
    I know that using a Mac with iphoto I can do this, but I dont have a Mac.
    I have also tried using Photoshop elements 7 and 8 but it only allows the transfer of everything (obviously I want to sync just the ones I want - to save space).
    A faq I found said that photoshop elements and album work, but only a very early release of these. Otherwise you get everything.
    thoughts or suggestions?
    Will apple ever provide iphoto or support a windows tool such as the latest elements 8 or picasa 3.5
    Regards
    Joe

  • N95 music player and working with sub folders

    Hi, I use file transfer to move my music from PC to N95 and use folders and sub folders within the music folder.  I cannot see the folders when using the music player.  I need advise how I can transfer my music easily so that I can play music files that are within a folder.  regards.

    Yes. The refresh seems to have no effect on the Podcasts. I even unsubscribed to all my podcasts--which is supposed to also delete the downloaded podcasts as well; did a refresh and the the podcasts are still listed on the mediaplayer.
    Another weird thing is that if the podcast app downloads another podcast, it is added to the list!

  • Using Applicationo Express with MY SQL or SQL Server ?

    Hello,
    I am new to APEX. Please guide me can I use it with My SQL or SQL Server in any possible way. As shared hosting for both of these databases is easily available.
    Secondly I heard APEX support web services. Can I use dotnet webservices with it ?
    thanks
    haansi

    Shared hosting is ALSO available for APEX. The product RUNS inside an Oracle database, so unless you use the connectivity software to link an Oracle database to SQL Server or mysql, you can NOT use it with these products?
    Why exactly are you looking to do this? Is i the cost of hosting an APEX application? There are places charging $10-20 a month to host APEX applications, comparable to mysql/SQL Server sites..
    Thank you,
    Tony Miller
    Webster, TX

  • Failed to provision site PWA with error: Microsoft.Office.Project.Server.Administration.ProvisionException: To create databases we need dbcreator and securityadmin server roles on servers.

    I'm getting the following errors while trying to provision a PS 2010 PWA on our SharePoint 2010 farm. Our PS instance has been working for a while now, and houses two other PWAs. But today,
    when trying to create this one, I get "Failed - see the Application event Log" and the following in the Event Viewer:
    Log Name: Application
    Source: Microsoft-SharePoint Products-Project Server
    Date: 4/2/2014 2:09:08 PM
    Event ID: 6980
    Task Category: Provisioning
    Level: Error
    Keywords:
    User: DOMAIN\DB_Access
    Computer: server
    Description:
    Provisioning 'PWA/SDN': To create databases we need dbcreator and securityadmin server roles on servers 'DB1' and 'DB1'.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Microsoft-SharePoint Products-Project Server" Guid="{b2178104-1b5b-4c20-8c8f-960678ced9e5}" />
    <EventID>6980</EventID>
    <Version>14</Version>
    <Level>2</Level>
    <Task>20</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2014-04-02T19:09:08.225Z" />
    <EventRecordID>1676727</EventRecordID>
    <Correlation ActivityID="{90131653-B0A4-4FAF-A43C-7DF07CBC3332}" />
    <Execution ProcessID="11040" ThreadID="12384" />
    <Channel>Application</Channel>
    <Computer>sharepoint</Computer>
    <Security UserID="S-1-5-21-2280669542-4145173436-3058324265-4222" />
    </System>
    <EventData>
    <Data Name="string0">PWA/SDN</Data>
    <Data Name="string1">DB1</Data>
    <Data Name="string2">DB1</Data>
    </EventData>
    </Event>
    Log Name: Application
    Source: Microsoft-SharePoint Products-Project Server
    Date: 4/2/2014 2:09:08 PM
    Event ID: 6993
    Task Category: Provisioning
    Level: Error
    Keywords:
    User: DOMAIN\DB_Access
    Computer: sharepoint
    Description:
    Provisioning 'PWA/SDN': Failed to provision databases. An exception occurred: To create databases we need dbcreator and securityadmin server roles on servers..
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Microsoft-SharePoint Products-Project Server" Guid="{b2178104-1b5b-4c20-8c8f-960678ced9e5}" />
    <EventID>6993</EventID>
    <Version>14</Version>
    <Level>2</Level>
    <Task>20</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2014-04-02T19:09:08.225Z" />
    <EventRecordID>1676728</EventRecordID>
    <Correlation ActivityID="{90131653-B0A4-4FAF-A43C-7DF07CBC3332}" />
    <Execution ProcessID="11040" ThreadID="12384" />
    <Channel>Application</Channel>
    <Computer>sharepoint</Computer>
    <Security UserID="S-1-5-21-2280669542-4145173436-3058324265-4222" />
    </System>
    <EventData>
    <Data Name="string0">PWA/SDN</Data>
    <Data Name="string1">To create databases we need dbcreator and securityadmin server roles on servers.</Data>
    </EventData>
    </Event>
    Log Name: Application
    Source: Microsoft-SharePoint Products-Project Server
    Date: 4/2/2014 2:09:08 PM
    Event ID: 6958
    Task Category: Provisioning
    Level: Error
    Keywords:
    User: DOMAIN\DB_Access
    Computer: sharepoint
    Description:
    Provisioning 'PWA/SDN': Database provisioning failed.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Microsoft-SharePoint Products-Project Server" Guid="{b2178104-1b5b-4c20-8c8f-960678ced9e5}" />
    <EventID>6958</EventID>
    <Version>14</Version>
    <Level>2</Level>
    <Task>20</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2014-04-02T19:09:08.225Z" />
    <EventRecordID>1676729</EventRecordID>
    <Correlation ActivityID="{90131653-B0A4-4FAF-A43C-7DF07CBC3332}" />
    <Execution ProcessID="11040" ThreadID="12384" />
    <Channel>Application</Channel>
    <Computer>sharepoint</Computer>
    <Security UserID="S-1-5-21-2280669542-4145173436-3058324265-4222" />
    </System>
    <EventData>
    <Data Name="string0">PWA/SDN</Data>
    </EventData>
    </Event>
    Log Name: Application
    Source: Microsoft-SharePoint Products-Project Server
    Date: 4/2/2014 2:09:08 PM
    Event ID: 6971
    Task Category: Provisioning
    Level: Error
    Keywords:
    User: DOMAIN\DB_Access
    Computer: sharepoint
    Description:
    Failed to provision site PWA/SDN with error: Microsoft.Office.Project.Server.Administration.ProvisionException: Failed to provision databases. ---> Microsoft.Office.Project.Server.Administration.ProvisionException: To create databases we need dbcreator and
    securityadmin server roles on servers.
    at Microsoft.Office.Project.Server.Administration.PsiServiceApplication.EnsureDatabases(ProjectProvisionSettings provset, SPSite pwaSite, String adminName, String adminEmail, ProjectDatabaseStateType& originalDatabaseState, Guid& adminGuid)
    --- End of inner exception stack trace ---
    at Microsoft.Office.Project.Server.Administration.PsiServiceApplication.EnsureDatabases(ProjectProvisionSettings provset, SPSite pwaSite, String adminName, String adminEmail, ProjectDatabaseStateType& originalDatabaseState, Guid& adminGuid)
    at Microsoft.Office.Project.Server.Administration.PsiServiceApplication.CreateSite(ProjectProvisionSettings provset)
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="Microsoft-SharePoint Products-Project Server" Guid="{b2178104-1b5b-4c20-8c8f-960678ced9e5}" />
    <EventID>6971</EventID>
    <Version>14</Version>
    <Level>2</Level>
    <Task>20</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2014-04-02T19:09:08.226Z" />
    <EventRecordID>1676730</EventRecordID>
    <Correlation ActivityID="{90131653-B0A4-4FAF-A43C-7DF07CBC3332}" />
    <Execution ProcessID="11040" ThreadID="12384" />
    <Channel>Application</Channel>
    <Computer>sharepoint</Computer>
    <Security UserID="S-1-5-21-2280669542-4145173436-3058324265-4222" />
    </System>
    <EventData>
    <Data Name="string0">PWA/SDN</Data>
    <Data Name="string1">Microsoft.Office.Project.Server.Administration.ProvisionException: Failed to provision databases. ---&gt; Microsoft.Office.Project.Server.Administration.ProvisionException: To create databases we need dbcreator and securityadmin
    server roles on servers.
    at Microsoft.Office.Project.Server.Administration.PsiServiceApplication.EnsureDatabases(ProjectProvisionSettings provset, SPSite pwaSite, String adminName, String adminEmail, ProjectDatabaseStateType&amp; originalDatabaseState, Guid&amp; adminGuid)
    --- End of inner exception stack trace ---
    at Microsoft.Office.Project.Server.Administration.PsiServiceApplication.EnsureDatabases(ProjectProvisionSettings provset, SPSite pwaSite, String adminName, String adminEmail, ProjectDatabaseStateType&amp; originalDatabaseState, Guid&amp; adminGuid)
    at Microsoft.Office.Project.Server.Administration.PsiServiceApplication.CreateSite(ProjectProvisionSettings provset)</Data>
    </EventData>
    </Event>
    Anybody ever get any events like this before? I'm not finding much or nothing on Google or on other forums, so I thought I would run it past and see if anyone has experienced anything of a similar
    nature. And yes, the farm account obviously has creator/secadmin permissions, at this point of our deployment....
    I look forward to any and all feedback. Thanks and good afternoon!

    I figured out the answer to this myself. For those few who might run into something akin to my error...
    During the off-hours of where I work, I re-applied the farm account credentials to all dB server VM SQL services that had the account for a log-on (i.e., MSSQLSERVER, SQLSERVERAGENT, etc.) as well as all SharePoint services on our WFE/App Server VM (a two
    server farm is what we host), in that order. Then I rebooted the dB server first, followed by the SharePoint server. Upon coming back, everything was working fine again. I was able to provision a site, no probelm, and it seemed to even be a little snappier
    when doing so.
    One note: doing this procedure gave me a "One or more services have started or stopped unexpectedly" error in the Health Analyzer, for the SPTimerV4 service. When you get this, simply enter into the item and click on "Reanalyze Now;" this will quickly clear
    the error out of the Analyzer, and all should be right with the world! :)

  • I am unable to do video chat using Gtalk either with ichat as well as Safari Browser any idea.

    I am unable to do video chat using Gtalk either with ichat or Browser. i tryed to use Firefox with Viedo chat plugin but this also doesn't help. My Voice and Picture is going but i am unable to receive. I am using Mac OS X10.7 Lion.

    IE uses an [http://en.wikipedia.org/wiki/ActiveX ActiveX] control to handle Flash objects.<br />
    Firefox uses a different [http://en.wikipedia.org/wiki/NPAPI NPAPI] plugin.<br />
    <br />
    Your above posted list of installed plugins doesn't show the Flash plugin for Firefox.<br />
    See [[Managing the Flash plugin]] and [[Installing the Flash plugin]]<br />
    <br />
    You can find the links to download the Flash plugin for Windows at the bottom of this page:<br />
    Adobe - Common Flash Player download and installation issues (Windows): http://www.adobe.com/products/flashplayer/support/index.html<br />
    Go to: 3. Download Adobe Flash Player : Flash_Player_10_Plugin (All other Windows browsers)<br />
    <br />

  • Cannot enter URL or use advanced tab when creating a (local) testing server

    Hi,
    I have created a site in Dreamweaver and I have tried creating a testing server. However everytime I try to create a test server Dreamweaver does not allow me to enter the Web URL in the server window. I knnow its local (localhost) but it seems it should still need a URL - http://localhost/...
    It allows me put in the name of the server the connection  type - Local/Network and allows me to browse to the server folder and select it but does not allow me to put any data in to Web URL: field.
    Additionally, it does not allow me to select the Advanced tab to specify my Server Model - PHP MySQL.
    When I click save with these settings I can see all the necessary files and folders in the Dreameaver Testing Server window but when I go to create a database connection I get an error saying "The URL prefix http:// for this site's testing server could not be resolved"  - on hitting the Select button to select the database.
    I am running WAMP (in Windows 7) and I can see the database in phpMyAdmin. I know the username and password are correct.
    Any help would be appreciated - Thanks

    Does this help?
    http://helpx.adobe.com/dreamweaver/kb/cant-select-some-items-site.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com/

  • Unzipping  zipfile with sub folders...using zlib java

    Hello,
    I am encounterig a problem while unzipping a zipfile using zlib.The zip file contaings subdirectories.so i am not able to unzip the zipfile.Since my code is able to unzip only the files which are in current directory.Please help me out to unzip the subdirectories using zlib.
    Please find my below code..for unzip the files in current directory..
    String destinationname = rootFolder.getAbsolutePath();
    byte[] buf = new byte[1024];
    ZipInputStream zipinputstream = null;
    ZipEntry zipentry;
    zipinputstream = new ZipInputStream(
    new FileInputStream(destinationname+"\\"+date+".zip"));
    zipentry = zipinputstream.getNextEntry();
    while (zipentry != null)
    //for each entry to be extracted
    String entryName = zipentry.getName();
         LoggerHtml.debug(entryName);
         int n;
         FileOutputStream fileoutputstream;
         File newFile = new File(entryName);
         String directory = newFile.getParent();
         if(directory == null)
         //break;
         fileoutputstream = new FileOutputStream(
         entryName);
         while ((n = zipinputstream.read(buf, 0, 1024)) > -1)
         fileoutputstream.write(buf, 0, n);
         fileoutputstream.close();
         zipinputstream.closeEntry();
         zipentry = zipinputstream.getNextEntry();
    Please provide me the coding..It is very urgent...

    google
    code #1
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    public class unzip
        public static void main(String args[])
            if(args.length < 1)
                System.out.println("Syntax : unzip zip-file destination-dir[optional]");
                return;
            try
                ZipFile zf = new ZipFile(args[0]);
                Enumeration zipEnum = zf.entries();
                String dir = new String(".");
                if( args.length == 2 )
                    dir = args[1].replace('\\', '/');
                if(dir.charAt(dir.length()-1) != '/')
                    dir += "/";
                while( zipEnum.hasMoreElements() )
                    ZipEntry item = (ZipEntry) zipEnum.nextElement();
                    if( item.isDirectory() ) //Directory
                        File newdir = new File( dir + item.getName() );
                        System.out.print("Creating directory "+newdir+"..");
                        newdir.mkdir();
                        System.out.println("Done!");
                    else //File
                        String newfile = dir + item.getName();
                        System.out.print("Writing "+newfile+"..");
                        InputStream is = zf.getInputStream(item);
                        FileOutputStream fos = new FileOutputStream(newfile);
                        int ch;
                        while( (ch = is.read()) != -1 )
                            fos.write(ch);
                        is.close();
                        fos.close();
                        System.out.println("Done!");
                zf.close();  
            catch(Exception e)
                System.err.println(e);
    }code #2
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Enumeration;
    import java.util.SortedSet;
    import java.util.TreeSet;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;
    * UnZip -- print or unzip a JAR or PKZIP file using java.util.zip. Command-line
    * version: extracts files.
    * @author Ian Darwin, [email protected] $Id: UnZip.java,v 1.7 2004/03/07
    *         17:40:35 ian Exp $
    public class UnZip {
      /** Constants for mode listing or mode extracting. */
      public static final int LIST = 0, EXTRACT = 1;
      /** Whether we are extracting or just printing TOC */
      protected int mode = LIST;
      /** The ZipFile that is used to read an archive */
      protected ZipFile zippy;
      /** The buffer for reading/writing the ZipFile data */
      protected byte[] b;
       * Simple main program, construct an UnZipper, process each .ZIP file from
       * argv[] through that object.
      public static void main(String[] argv) {
        UnZip u = new UnZip();
        for (int i = 0; i < argv.length; i++) {
          if ("-x".equals(argv)) {
    u.setMode(EXTRACT);
    continue;
    String candidate = argv[i];
    // System.err.println("Trying path " + candidate);
    if (candidate.endsWith(".zip") || candidate.endsWith(".jar"))
    u.unZip(candidate);
    else
    System.err.println("Not a zip file? " + candidate);
    System.err.println("All done!");
    /** Construct an UnZip object. Just allocate the buffer */
    UnZip() {
    b = new byte[8092];
    /** Set the Mode (list, extract). */
    protected void setMode(int m) {
    if (m == LIST || m == EXTRACT)
    mode = m;
    /** Cache of paths we've mkdir()ed. */
    protected SortedSet dirsMade;
    /** For a given Zip file, process each entry. */
    public void unZip(String fileName) {
    dirsMade = new TreeSet();
    try {
    zippy = new ZipFile(fileName);
    Enumeration all = zippy.entries();
    while (all.hasMoreElements()) {
    getFile((ZipEntry) all.nextElement());
    } catch (IOException err) {
    System.err.println("IO Error: " + err);
    return;
    protected boolean warnedMkDir = false;
    * Process one file from the zip, given its name. Either print the name, or
    * create the file on disk.
    protected void getFile(ZipEntry e) throws IOException {
    String zipName = e.getName();
    switch (mode) {
    case EXTRACT:
    if (zipName.startsWith("/")) {
    if (!warnedMkDir)
    System.out.println("Ignoring absolute paths");
    warnedMkDir = true;
    zipName = zipName.substring(1);
    // if a directory, just return. We mkdir for every file,
    // since some widely-used Zip creators don't put out
    // any directory entries, or put them in the wrong place.
    if (zipName.endsWith("/")) {
    return;
    // Else must be a file; open the file for output
    // Get the directory part.
    int ix = zipName.lastIndexOf('/');
    if (ix > 0) {
    String dirName = zipName.substring(0, ix);
    if (!dirsMade.contains(dirName)) {
    File d = new File(dirName);
    // If it already exists as a dir, don't do anything
    if (!(d.exists() && d.isDirectory())) {
    // Try to create the directory, warn if it fails
    System.out.println("Creating Directory: " + dirName);
    if (!d.mkdirs()) {
    System.err.println("Warning: unable to mkdir "
    + dirName);
    dirsMade.add(dirName);
    System.err.println("Creating " + zipName);
    FileOutputStream os = new FileOutputStream(zipName);
    InputStream is = zippy.getInputStream(e);
    int n = 0;
    while ((n = is.read(b)) > 0)
    os.write(b, 0, n);
    is.close();
    os.close();
    break;
    case LIST:
    // Not extracting, just list
    if (e.isDirectory()) {
    System.out.println("Directory " + zipName);
    } else {
    System.out.println("File " + zipName);
    break;
    default:
    throw new IllegalStateException("mode value (" + mode + ") bad");
    hth

  • Need solution for using Symbol LRT3840 with Apps 10.7 and/or 11i?

    Any suggestions for using Symbol's scanner/terminal with Oracle 10.7 and/or 11i? The symbol unit runs a telnet session (with a 1/4 viewable area). I'm looking for some alternate screen templates and/or a software solution that will allow me to remap the existing full screen forms so all critical information is displayed on the symbol unit in the allowable viewing area. I understand that version 11i of Oracle Apps does not support character-based telnet sessions, so I'm also interested in a fix that will be transparent to my material handlers when we upgrade from 10.7 to 11i. Any help would be greatly appreciated.

    Hi
    We are developing solutions in that area.
    If we can know more of the exisitng solution you have implemented or PDA and how it is integrated with Oracle Application(whether it is a third party tool?)
    then we can discuss about arriving at a solution.
    My mail-id is [email protected]
    Thanks and Regards,
    Bibs

  • Is there a way I can use a Master with sub-projects on different calendars?

    Wondering if I can get some advice creating a Master Project (MSP2013 Standard, no Project Server software). I have 3 projects of which 2 are utilising a Standard calendar 8:00AM to 5:00PM 8hr day 40hr week, and 1 project (the largest) utilising a Customised
    calendar 7:30AM to 3:30PM  7.5hr day 37.5hr week.
    The dominant project is running on the Customised calendar so I have set the Global Options in the Master to reflect the 7:30AM to 3:30PM  7.5hr day 37.5hr week. Then set the calendar in Master Project Information default to the Customised calendar. 
    Finally, the resource pool for all 3 projects is in the Master.
    No problem when I insert the sub-project into the Master which is using the customised calendar. All data is reflective of the original project.  However, when I insert either of the 2 sub-projects using the 40hr week calendar the Summary Headings for
    the inserted projects are incorrect.  For example, instead of being 2 weeks duration, the summary heading displays 2.13 weeks, and instead of 4 weeks duration, the summary heading displays 4.27 weeks.
    The Global settings appear to be interfering with the projects on the Standard calendars.  I am surprised and extremely frustrated as I thought the settings in the Master would not affect anything?
    Sorry guys, have posted this in 3 different places as it is so important to me!

    Hi Guys, many thanks for your responses, really appreciate your time, however I am finding this much more complex. I have put my original sheets to one side and started again. Once again this is very important hence a lot of detail here. I am hoping something
    will provide a clue where I am going wrong.
    New sheet |save as Master | Change Working Times |copy Standard Calendar and called it 37.5 Hour
    Calendar| No exceptions | Work Weeks tab |Details | Set Monday to Friday 7:30AM to 12:30PM then 1:00PM to 3:30PM. Selected Options | Schedule | Start 7:30AM End 3:30PM |Hours 7.5 | Hours per week 37.5 |Auto Scheduled |Duration Hours|
    Work Hours |Fixed Duration | OK OK. Project | Project Information | Calendar changed to 37.5 Hour Calendar | Save.
    In my previous example I noted that my main project is scheduled 37.5 hours but I will skip inserting it here, the issue is subprojects with different settings to the Global, that is mixing projects with different calendars in a Master.
    New sheet | save as 40 Hour Project |Change Working Times |Standard Calendar | No exceptions | Selected Options | Schedule | Start 8:00AM End 5:00PM |Hours 8 Hours per week 40 |Auto Scheduled |Duration Weeks | Work Hours |Fixed Duration
    | OK OK | Save.
    Entered 5 new Tasks, all 2weeks duration, all linked Finish to Start. Inserted a Summary Heading named 40 Hour Summary | 40 Hour Summary Duration = 10 wks | Start 9 June 1014 8:00 AM | Finish 15 August 2014 5:00 PM |Created 1 Resource called Fred | 100%
    |$100 Standard Rate | Assigned Fred to all tasks 100% | Project | Project Information | Statistics | 10w 400h $40.000 |Save and Close | All correct.
    Back to the Master | Project | Insert Subproject | selected 40 Hour Project |Duration 400 hrs | Start 9 June 2014 8:00AM | Finish 21 August 2014 10:30AM. It appears the Global settings are affecting the inserted subproject note the finish time is now
    10:30AM. Project | Project Information |Statistics |Duration 400h | Work 400h | All correct!
    BUT | select View Outline Show Subtasks |This is where further changes have happened | Project | Project Information |Statistics |Duration is now
    374.5h | Work 400h.
    Besides information being displayed incorrectly these figures will affect all Reports. This example suggests you cannot have subprojects in a Master that are associated with different calendars? Surely not! Please help if you can, I have
    spent hours searching for answers, and I can’t believe I am the only one who has come across this! Many thanks.......

  • Burning Playlists with Sub-Folders

    I have a playlist and then about 16 sub-playlists under it. I wanted to burn the whole playlist to a DVD disk as a data CD. This is primarily for my car. For example, the USB feature allows me to put music in folders and I can navigate through the artists with one button instead of pressing the button ten times to get to the next artist(s). It lets me burn the individual sub-playlists, but when I try to burn the entire playlist, the "burn playlist to disc" button disappears entirely. I was wondering if there was a way to burn the WHOLE playlist with the subfolders on iTunes, or if I have to stick with just burning the individual sub-playlists.

    Sort the playlist by Album or Artist then burn it.
    See this -> http://support.apple.com/kb/HT2455

  • Using genres as Movie sub folders?

    Is it possible to set up the "automatically add to itunes" watch folder to treat movies similar to tv shows / music?
    So for example, when you copy over an episode of a tv show (and it is properly tagged) to the automatically add to itunes, itunes breaks it out by TV Show, then by season , then the episode itself.  Same with music...Artist, then album then the song...which i really like. 
    But for movies it just creates another folder with the same name as the movie.  I have my movies broken into 4 very generic genres...comedy, family, drama,action...which makes it a little bit more organized on my computer.  So i was wondering if there is a way that iTunes automatically add to itunes can create the genre sub folder and then add the movie? (again assuming the file is properly tagged)
    example...I copy and paste My Cousin Vinny in the automatically add to itunes and iTunes sees that it is a movie and has "comedy" as the genre and drop its into a the "Comedy" sub folder.
    I get that this may be a long shot but i figured i would ask, or if others had a nice work around.
    Thanks. 

    Thanks for the quick response...i tried add "Comedy" as an album but it doesnt seem to recognize that when its a movie ...is it possible for movies to have albums? (i know that sounds silly)

  • Using CORR function with sub-queries

    I need to compute the correlation of two datasets, however here is my problem:
    The table stores responses to a questionnaire, with these columns:
    RESPONSE_ID, QUES_ID, ANS_CD
    What my query needs to get is the Correlation of 2 sets of ANS_CD, one with QUES_ID=x and one with QUES_ID=y. What I have looks like this:
    SELECT CORR ((SELECT ans_cd
    FROM fact_responses
    WHERE ques_id=x) ,
    (SELECT ans_cd
    FROM fact_responses
    WHERE ques_id=y)
    FROM fact_responses
    And i get a 'single row subquery returns more than one row' error. Can someone who has more experience with this help me out? I don't want to create a new table to store the data for this one report

    The short and sweet of it is that you are trying to correlate question x against question y. With three questions, you are looking for the correlation as such:
    1,1
    1,2
    1,3
    2,1
    2,2
    2,3
    3,1
    3,2
    3,3
    Is that correct?

Maybe you are looking for

  • Can Apple tv connect thru a satelite receiver and not a tv

    I have an older projection HDTV Mitusubishi big screen TV model # WS55909 that doesn't have an HDMI connection on it but connected to the TV are two Direct TV HDTV satellite receiver DVR's (models 20-700 & 21-100) that do have an HDMI output as well

  • Input Marketing Attributes data by EML

    Hi All, I want to input Marketing Attributes with BP data by EML(External List Management) of Marketing. Maybe I need same enhancements for EML. Please tell me how to this implementation? Regards, Masazumi.

  • Looking for existing ABAP Text/XML editor

    Is there any XML editor or Text Edit with an XML flavor in NW? We need following function: 1. upload /edit/ save XML to some place. 2. we can retrieve it via some methods, or we can access via writing program. If cannot find editor for all of the cri

  • Itunes 9.2.1 updateing itouch to ios 4.2

    is it even possible to update an itouch to ios 4.2 on itunes 9.2.1,,,,,,if i have an itouch formated on an apple g4 laptop using tiger...can i connect it to a pc and update it with out lossing any info

  • Demonstration Environment for odi download

    Hi From where i can download Demonstration Environment for ODI? This link (from documentation) is not working, gives me a 404 error: http://otn.oracle.com/goto/odi Where i can find that demo?