Tomcat Default Directory

Hello I'm using Tomcat 4.0 for Win. I'm trying to create a file in my JSP, however no matter how I enter the directory string on where to put the file it will put it into the directory I start tomcat from. C:\apache tomcat 4.0\bin. How do I define I want to put it into the C:\apache tomcat 4.0\webapps\root\videos directory? I've tried using the ..\webapps\root\videos, but no matter what I put it will always put the new file in the bin directoty. Thanks,
Rob

Lets say you have a Web App named "Bull", your directory structure would be ..
<code>
tomcat 4--
webapps
--Bull
or
...(tomcat install directory)\webapps\Bull
</code>
You would put your JSP page in the Bull directory. Lets say that the JSP page is called .. bullpoop.jsp and you put this file into your Bull directory. You would execute tis JSP page by typing;
//If you did not change your port number it will be the default 8080.
http://localhost:8080/Bull/bullpoop.jsp
//If you changed your port to 80 then its just;
http://localhost/Bull/bullpoop.jsp
It is case sensitive, or i have found it to be, so becareful just in case!!! (ok that was a bad joke =P )
IF you want to use classes in a package structure and ONLY use them in the "Bull" webapp then install them into the following;
<code>
tomcat 4--
webapps
Bull
WEB-INF
classes
package hierarchy
or
(tomcat install directory)\webapps\Bull\WEB-INF\classes\(package hierarchy)
</code>
By package Hierarchy i mean the following;
lets say you have a class called "Poop". You package the "Poop" class into the
package bull.stinky;
your directory structure would be;
<code>
bull--
stinky
--Poop.class
or
(tomcat install directory)\webapps\Bull\WEB-INF\classes\bull\stinky\Poop.class
</code>
In your case you want to have a Video in a directory on its own. The following would work.
<code>
tomcat 4--
webapps
Bull
video
or
(tomcat install directory)\webapps\Bull\video\
</code>
You would then reference that directory the following way in your code ..
/Bull/video/myvideo.mpg
If you want to change your port number from 8080 to 80 (if its not already being used. DO the following (Your URL's will look a lot cleaner)
You need to open the server.xml file in the conf directory and that is located here ..
<code>
tomcat 4--
conf
--server.xml
or
...\(tomcat install directory)\conf\server.xml
</code>
Change the port to 80 from 8080
<Connector
className="org.apache.catalina.connector.http.HttpConnector"
port="8080" ...
... />
I hope that helps.
Here are a coupleof sites that will help.
www.coreservlets.com and www.moreservlets.com
If you have not purchased these books DO IT NOW ! ! ! !! hehe they are excellent!!!!!!!!! They explain in great detail servlets and JSP.
Good luck =)
Oh yah in www.moreservlets.com there is a section on setting up Tomcat 4. www.coreservlets.com has set up for Tomcat 3.2
again GOOD LUCK =)

Similar Messages

  • Deploying a .war file - outside of Tomcat default webapps?

    I would like to deploy a war file outside of the [tomcat]/webapps directory.
    How can I get tomact to recognize AND unpack a war file in a location other then the default webapps directory?
    I have tried the following;
    altering server.xml -
    added context pointing directly to .war in other directory.
    adding context.xml entry to my war -
    added context.xml to META-INF of my war file, indicating that the docBase should be in outside directory.
    Neither of these created the desired result.
    Any suggestions?

    The following is from tomcat docs
    - http://tomcat.apache.org/tomcat-5.5-doc/config/host.html
    appBase : The Application Base directory for this virtual host. This is the pathname of a directory that may contain web applications to be deployed on this virtual host. You may specify an absolute pathname for this directory, or a pathname that is relative to the $CATALINA_BASE directory. Going by that. try making the change as below in your server.xml
    <Host name="localhost" appBase="your_directory"
           unpackWARs="true" autoDeploy="true"
           xmlValidation="false" xmlNamespaceAware="false" deployXML="true">I am going by what the doc says.
    I havent tried it out myself, so do let us know if that worked.
    cheers,
    ram.

  • Default directory for FIle Manager

    Hi,
    I am working on file manager for my final year project. I am using jsp, Tomcat and Linux as OS.
    The question is,
    "Is there any way to authenticate users from OS(linux or windows 2000) and how can i set user home directory(e.g. home/sahsan/) to my file manager default directory"
    I really appreciate if anybody help me in this regard. I am ready to read any article,tutorial or even any book chapter for this purpose. Coding Help will be best choice ;-)
    Thank you.
    Regards,
    Syed Ahsan

    I am not sure, i am in search of the code as well. pls let me know if u come across something. i will keep u posted if i know some.........
    Riz

  • Default Directory

    When you run Servlet in tomcat, what is the default directory?

    it used directory which you specify in <tomcat>/conf/server.xml
    example:
    <Context path="/kios" docBase="kios" debug="0" reloadable="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="kios_log." suffix=".txt" timestamp="true"/>
    <Ejb name="ejb/EmplRecord" type="Entity" home="com.wombat.empl.EmployeeRecordHome" remote="com.wombat.empl.EmployeeRecord"/>
    </Context>
    url address for servlet woul be http://localhost/kios/servlet/Yourservlet
    on your disk it would be:<tomcat>/webapps/kios/WEB-INF/classes/Yourservlet.class

  • How to change the default directory from within SQL*Plus ?

    Hello,
    I want to change the default directory directly from within SQL*Plus to be able to launch my command files with simple instructions like :
    @my_command.sql
    If I haven't launched SQL*Plus from the directory containing the file my_command.sql, how do I change the default directory to the directory of my command files ?
    I've searched through the Oracle documentation, there's no SET DEFAULTDIR or something like that. When I do a SHOW ALL, there's no variable containing the default directory.
    If you have an idea...
    regards,
    Jérôme.

    Hi Jérôme (J鲴me ?),
    You cannot directly do that, but you can use @@ instead of @ to run subscripts in the same directory as the superscript
    # head /tmp/tl30/xxx/[xyz].sql                    
    ==> /tmp/tl30/xxx/x.sql <==
    prompt call y
    @y
    prompt call z
    @@z
    quit
    ==> /tmp/tl30/xxx/y.sql <==
    prompt i am in y
    ==> /tmp/tl30/xxx/z.sql <==
    prompt i am in z
    # pwd                                             
    /root
    # sqlplus -s scott/tiger@lsc62 @/tmp/tl30/xxx/x.sql
    call y
    SP2-0310: Datei "y.sql" konnte nicht geöffnet werden
    call z
    i am in zKind regards
    Laurent Schneider
    OCM DBA

  • How to change default directory of exe file

    I have created a VI that reads a template and writes on the template and saves it to a new file. When i created to an exe file, I would like for this exe to be able to be used on any computer. As such, the directory where i will open my template will change on different computers. Hence I am having this problem of how to change my VI such that it will choose this template in a new computer and set it as its default directory.
    I understand that in my own computer, I can simple "set current values as default" so that my VI will always open this file from a particular path. But what i need help with is when i put it on another computer where the particular path would definitely be different. I tried using the config file.vi but I could not understand how it is used.
    Please assist me in this. Thanks

    Hi Aaron,
    Micorsoft suggest to use folders like UserAppData to store files for your own programs.
    Put your template in there and use GetSystemDir function to get the UserAppData path...
    Or you put the template in the program folder or one of it's subfolder (not recommended by MS) and use a relative path to load it...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How can I specify a default directory on my external drive, for iPhone photos to be imported to on Macbook Air?

    I use both a PC as well as my Macbook Air and when I sync my iPhone with my PC (I connect the phone to PC) my phone (or is it my computer)? knows to import my photos and videos to a specific directory/folder on my external hard drive (I am able to tell my PC which folder to import my photos and videos to). For example, it imports all photos and videos to the external drive and organises the photos and videos by date (it creates a separate folder for each date the photos/videos were taken; I had to tell my PC to import to the default directory (external drive) when I did this for the first time, and it now creates a new folder for each date which is useful for keeping photos organised, etc. 
    I'd like to be able to do the same thing, using my Macbook Air, i.e., when I connect my iPhone to the Macbook air, I want my Macbook Air to know to import my photos to my external hard drive; is this possible? I am not familiar with the photo programmes on the Macbook air, but to be honest, I don't want to use them for this; I just want my photos and videos on my iPhone to import to the same folder when I use my Macbook air to sync, as when I use my PC to sync  (I use my PC at work and have my Macbook at home). I'd like to be able to sync my phone when at home and not have to wait till I get to work, etc.
    Many thanks for any help you can provide...

    Yes there are many, but the question is why won't the new folder create on the drive?
    What format is it?
    I think you've not grasped what iPhoto is. Have a read of these
    For help accessing your photos in iPhoto see this user tip:
    https://discussions.apple.com/docs/DOC-4491
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.
    Though dealing with different topics, they explain some of the background and the differences between what you're looking for (file management) and what iPhoto does (photo management).

  • How do I change the "Default Directory" associated with my subscription?

    I was recently added as an administrator for a client's Azure subscription.  This has caused his account AD to be the default directory I see when I log in.  So every time I log in I have to open the Subscriptions menu and change the FILTER BY
    DIRECTORY option.  How can I make my own directory the default directory when I log in?
    Note: there was an almost identical question back in Dec 2013 and the solution was to have the other user remove you as an administrator.  The marked answer suggested the questioner read some arcane description of Azure subscriptions and Active Directory.
      I need to remain an admin for the other account and the referenced document had nothing useful to say about my problem.
    Anyway, thanks in advance for your help.

    Hi,
     Thank you for posting.
     I hope you find the following link helpful.
     http://itproguru.com/expert/2014/07/change-azure-subscriptionsgo-directly-to-a-specific-subscription-in-windows-azurestep-by-step/
    Regards,
    Nithin Rathnakar.

  • ASO - .dat file in default directory

    Hi,
    Our .dat file in the 'default' directory on our server is 209,715,200 The sys admin says we need to move it as it's too big for that directory. They do this on the BSO cubes and identify a path where the 'Storage' resides. However she doesn't see this option for ASO. Is this not possible in ASO and the .dat file must remain where it's at? Or is there an alternative method to store the .dat file somewhere else?

    You mean managing the tablespaces ? - http://docs.oracle.com/cd/E17236_01/epm.1112/eas_help/tablespc.html
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • **Creating default directory in failed: \logging.properties (Access is denied)**

    Hello Experts,
    i am deploying edq on weblogic.
    After deployment, when lauching the edq url getting below error on firefox.
    **Creating default directory in failed: \logging.properties (Access is denied)**
    by default, it took the path as:
    C:\oraclesw\oracle\middleware\user_projects\domains\oedq_dev_domain\servers\edqdev_server1\tmp\_WL_user\dndirector\1i3bzo\war\WEB-INF\config
    i have unzipped the config.zip into above mentioned config folder.

    When we restart the application server up and start the managed server, the deployment is in the failed status with the following message:
    We have the Memory settings on the managed server set as : -Xmx5024M –XX:MaxPermSize=256M
    <Jul 11, 2013 4:45:13 PM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating start task for application 'dndirector'.>
    <Jul 11, 2013 4:45:13 PM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException:
            at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1520)
            at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484)
            at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
            at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
            Truncated. see log file for complete stacktrace
    Caused By: java.lang.ClassNotFoundException: com.datanomic.utils.transport.TransportSignature
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
            Truncated. see log file for complete stacktrace
    >
    <Jul 11, 2013 4:49:42 PM EDT> <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redirect url is /console/console.portal?_nfpb=true&_pageLabel=WebAppApplicationOverviewPage&WebAppApplicationOverviewPortlethandle=com.bea.console.handles.AppDeploymentHandle%28%22com.bea%3AName%3Ddndirector%2CType%3DAppDeployment%22%29.>

  • Set default directory/path for SaveAs Dialog using WPG_DOCLOAD

    Hi, im trying to set the default directory/path for the SaveAs Dialog called by wpg_docload.download_file.
    I'm not able to find where I can specify the default path.
    Is it something like "htp.p('Content-Disposition: attachment; path=:PX_OUTPUT_DIR" ?
    Thx for your help !
    Here's a part of my code
    owa_util.mime_header( NVL(mime,'application/octet'), FALSE );
    htp.p('Content-length: ' || length);
    htp.p('Content-Disposition: attachment; filename="'||substr(fileName,INSTR(fileName,'/')+1)|| '"');
    owa_util.http_header_close;
    wpg_docload.download_file( lobLoc );
    /*********************/

    I don't believe you're allowed to set the directory path in the Content-Disposition (or any other) header. More accurately, you can set path in the filename, but browsers don't pay any attention to that, they only look at only the terminal filename.
    <p>According to RFC 2183, browsers are supposed to ignore any path information sent with the filename. Even though it's dated 1997, I believe this RFC is still in effect.
    <p>This was done as a security precaution against malicious web apps that might try to download into a system directory or other dangerous place. Also, browsers (usually) allow users to specify their own default download directories. Further, even if you could specify the path, you'd have to do it for any and all filesystems (Linux, Mac HFS, Mac OSX, Windows, etc etc).

  • How to set default directory for SQL LOADER

    hi all,
    i wanted to know how can we setup a default directory for SQL LOADER if at all we can. i connot place my control and data files in local system and use them at command prompt. rather i wanted to know if we can set default directory that the loader can use. this requirement is basically to enable all the clients to upload the data placed on the server and use the loader utility.
    thanks in advance,
    Basavraj

    Ella,
    You don't say which version of SQL Developer you are using via Citrix, but just setting the SQLDEVELOPER_USER_DIR hasn't worked for a long time (see Re: SQLDEVELOPER_USER_DIR does not function anymore). Also, since version 1.5, the default for the user directory (now set via ide.user.dir as shown below) is under the user profile area (relative to %APPDATA%), which you should be able to write to, even on Citrix.
    Assuming that neither of those help, you will need to get whoever installed SQL Developer on the Citrix C: drive to modify the sqldeveloper.conf to have a line like, where the path exists for everyone who will be using the shared SQL Developer (assumes everyone has a H: drive):
    AddVMOption -Dide.user.dir=H:\sqldeveloperAn alternative (depending on how you start SQL Developer via Citrix), is to create your own shortcut to start SQL Developer with something like:
    sqldeveloper -J-Dide.user.dir="%SQLDEVELOPER_USER_DIR%"theFurryOne

  • Default directory for sql script in iSqlplus 10g

    I want to run an sql file from the url as "http://machine_name.domain:5560/isqlplus/dynamic?script=http://machine_name2.domain/myscript.sql
    ". What is the default directory to place the file myscript.sql in? Do I need to create a DAD for specifying a different directory?
    Am using Oracle 10g.
    AN

    Hi Alison,
    I tried putting the sql script on different directories on the Oracle server but the url doesnt seem to find the script at all. It gives an error "Cannot find sql script".
    I have not installed Oracle Application server 10g yet. Am only running Oracle Database 10g with iSqlplus and PL/SQL.
    AN

  • Co-Administrator added to the default directory cannot log in, Error message: No Subscriptions

    So I had set up Azure Subscription earlier this week and activated a Standard website plan. I added co-admins to the default directory but when they try to log in through manage.windowsazure.com they get an error that there are no subsciprtions associated
    with their account. Why is this happening? Why can't they log in even though I have added them into the default directory of which I'm a Global Administrator?

    Hi,
    Based on your description, you want to add co-administrator? Am I right? If that, please have a look at below article and follow its steps.
    #http://msdn.microsoft.com/en-us/library/azure/gg456328.aspx
    Apologies if I have misinterpreted.
    Best Regards,
    Jambor
    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.

  • Reverse Cobol Copy Book - default directory

    Hi,
    We use the functionality "Reverse COBOL Copy Book" quite often to import metadata for flat files.
    When you have to select the .cbb file the default path to select the file is c:
    Is there a possibility to set the default path to any other directory (where for instance all .cbb files are stored)?
    Thanks in advance!
    Best regards,
    H.

    Hi H,
    Yeah its possible to set for a directory and even for folder also.Follow these steps:
    1.In topology manager under file technology duplicate any dataserver which is working eg: FILE_GENERIC.
    2.Change the name of the dataserver,and apply changes.i.e click on yes..
    3.Under physical schema fill the directory(Schema) as ur wish for default directory.
    Eg: for directory c:/
    If u need folder then c:/TEMP
    4.copy same path for work schema
    5.provide appropriate context
    6.Now reverse from model it will point to default path which u have menttiioned in topology
    Thanks,
    katukota

Maybe you are looking for

  • HP Officejet Pro 8600 Plus - no longer able to receive faxes

    I can no longer receive faxes!  I consistently get error message 281.  My bookkeeper and I exchange faxes multiple times a week and it has always worked in the past.  She is able to send and receive faxes from her machine.  I am able to send faxes to

  • Problems with Outlook and 365

    Hi BarbBouchard, I can fully understand how you feel when you made several calls to Godaddy and Microsoft but no one resolved the issue. I think the Go-daddy support sent you to Microsoft since they identified it as a pure Outlook desktop client side

  • Open in new tab not working

    hello all, ever since upgrading to Lion I have been unable to get highlighted text in a text entry box (ex: FB status update) to open in a new tab whenever the contextual menu item "search with Google" is clicked. I have the safari settings checked s

  • IPhoto 09 & storing "Originals" directory in NFS-mounted partitition

    In iPhoto 08, I had the Originals directory NFS mounted off a Linux server. On the Mac, I mounted it at /Volumes/pics and I had a symbolic link pointing from iPhoto Library/Originals to /Volumes/pics. Everything was hunky-dory. I upgraded to iPhoto 0

  • Can't access to Fat Partition - Mount problem

    Dear all A few months ago I used disk utility and perform a partition. The idea was 3 partitions, 1 for mac (Journaled), 1 for bootcamp (NTFS) and 1 for transfer between the OSs (FAT). And it worked OK, I can use mac when I want and Windows too, I pu