Virtual Directory  Apache/tomcat/jdk

Hello everyone,
I'm very new to this environment and I desparately need help in setting up a virtual directory so that every thing works, just please let me know where to start. I already have Apache, tomcat and jdk that works separately. Please help
Katyann

Edit
server.xml under <TOMCAT_HOME>/conf folder and add a contex
<Context path="/"
docBase="c:\somepath"
trusted="false"
crossContext="true"
debug="1"
reloadable="true" >
</Context>
D.

Similar Messages

  • VIRTUAL DIRECTORY in TOMCAT 5.5

    Hi all ,
    I am abeal to create a virtual directory under tomcat , I want to create another virtual directory under a virtual in tomcat , is there any way to do this ?
    As far as my knowledge is concern , IIS has the power to do this .
    Thanks ,
    SB

    gladiator_cbe,
    Did you ever figure this out? I cannot figure out how to create aVirtual Directory in Tomcat 6?
    Thanks

  • Remote Virtual Directory with Tomcat

    Does anybody knows if is it possible to set a virtual directory in Tomcat 4.1 or 6.0 in a remote PC ?
    This is the example:
    Mi PC running Tomcat. Mi PC IP: 172.16.8.212.
    There is another PC in the company with another Tomcat running. Let's say in IP 172.16.8.213.
    The public IP is asociated with my PC, and I need that when somebody tries to find certain web application (located in the Tomcat in 172.16.8.213 ) my Tomcat execute the remote application as if it is local.
    Somebody could tell me: "Ok, so why don't you bring the remote application to your local Tomcat, and end with the complications". For some reasons (one of them is security), that's not a choice.
    Thank you very much for any help, and sorry if for my ignorance somebody gets angry.

    A few methods that come to mind off hand would be:
    1) Make an app on your server act as a proxy to the other app. That is, make a Servlet mapped to all URLs in the context. The servlet simply makes a corresponding request to the other server passing all pertinent information from the originating client. Your servlet then reads the response and pipes it directly to the response object
    2) Try setting up a <context> element with the docBase attribute set to the other server's docBase. The other computer would have to give your server read/write access to the directory of interest. Since your server would be actually hosting the application you would have to check on environment and resources to make sure any required settings are duplicated properly.
    3) Have the other application hosted on a different port, and your firewall map that port to their server and your port to your server.

  • CREATING VIRTUAL DIRECTORY THROUGH jakarta-tomcat-4.1.10

    dear friend(s)
    how to create a virtual directory through tomcat jakarta-tomcat-4.1.10
    please help me
    very very urgent
    mohd meraj

    Go to %TOMCAT%/conf/server.xml file and see Context settings samples

  • Virtual Mapping in Tomcat-6.0

    hello all,
    i had migrated to Tomcat-5.0 to Tomcat-6.0, Virtual Directory in Tomcat-5 is working fine but not working in Tomcat-6.0. the code below is from \web-inf\web.xml
    <virtual-directory virtual-path="/p" real-path="C:\p" />
    the above code is not working in Tomcat-6.0. any one can help me to solve this problem. your information will be valuable and appriciatable by many clients

    gladiator_cbe,
    Did you ever figure this out? I cannot figure out how to create aVirtual Directory in Tomcat 6?
    Thanks

  • Servlet, Tomcat 3.3, IIS virtual directory access denied

    Hello people,
    I've set up Tomcat to run as a service with a domain log on usr/pswd. IIS works fine redirecting servlet requests to Tomcat via ISAPI redirector. All on Windows 2000 Server.
    The problem:
    The java application creates and reads files from a location which corresponds to an IIS virtual directory and is also a local directory with respect to the Tomcat and IIS installation. The application is denied access to this directory when submitting a network path (\\server/drive/directory/) where to store and read files, but is happy when a local path is given instead (E:/) Why? The domain user should have complete access to this. Is it Tomcat, IIS, or java restrictions?
    I appreciate any suggestion on this
    Thanks

    The problem would be with the logon that you have Tomcat running under. Writing to a file accessed by network share (\\server\share) is not a problem under Java as long as the logon has appropriate privileges. If you are writing to something of the form \\server\c$\directory, as it sounds like you might be, the logon may need administrator access to the box (in order to see \\server\c$).

  • Help Apache Tomcat integrate with Active Directory

    Hello ,
    I am trying to authenticate users in Apache Tomcat 5.5 from active
    directory with no such luck.
    The way my users are structured in AD is there's a department root OU
    and then sub OU's for each department . The Groups OU is in its own OU.
    This is the syntax Im using for the server.xml file. I have created
    two groups am and thc and put the neccesary users in the groups.
    <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
    connectionURL="ldap://dc1:389"
    alternateURL="ldap://fs6:389"
    userRoleName="member"
    userBase="OU=Departments,dc=2krecovery,dc=com"
    userPattern="cn={0},OU=Departments,dc=2krecovery,dc=com"
    UserSubtree="true"
    roleBase="OU=Groups,dc=2krecovery,dc=com"
    roleName="cn"
    roleSearch="(member={0})"
    roleSubtree="false"
    userSubtree="true"
    />
    Could someone tell me if this is right? Running a Windows 2000 native
    domain level with 2 windows 2000 dc's and one windows 2003 dc.
    Here's the web.xml
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Tax Housing Compliance</web-resource-name>
    <url-pattern>/thc/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>thc</role-name>
    </auth-constraint>
    </security-constraint>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Asset Management</web-resource-name>
    <url-pattern>/am/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>am</role-name>
    </auth-constraint>
    </security-constraint>

    Pl do not post duplicates - Use Multi Domain to integrate with Active Directory in R12

  • I get a error when starting Apache Tomcat 6.0 service

    Hi Friends,
    I get a error when starting Apache Tomcat 6.0 service. Do you help me?
    Kind regards.
    Fatih Temiz
    First Step:
    Second Step:
    Thanks for helps...

    It seems like the JVM is pointing to incorrect .dll file.
    Goto Apache bin directory, and from there open Apache[version]W.exe
    Click the "Java" tab and ensure the first textbox "Java Virtual Machine" is pointed to the correct jvm.dll
    If it was pointed to the JDK then it is wrong. Repoint it to the jre jvm located at \jre6\bin\client\jvm.dll
    Let me know if it resolves the issue.

  • Coldfusion 11 SSL Certs applied - The APR based Apache Tomcat library which allows optimal performance in production environments,

    Coldfusion 11
    Windows Server 2012 R2
    Both the Coldfusion admin and additonal site work fine on HTTP.
    As soon as I attempt to enable SSL websockets and install SSL certs, the Coldfusion 11 Application service will not start. I followed the steps below....
    Coldfusion 11 - Web Sockets via SSL
    The Coldfusion-error.log shows
    Jan 26, 2015 3:21:23 PM org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
    Server was a cloned VM of the test server with developer copy of CF11, but license has been purchased and applied. SSL certs have been imported successfully, paths are correct in CF Admin to the cert file etc.
    Do I need to install another version of Coldfusion to get around this issue or is there a download update I need to apply?
    If i reconfig the \cfusion\runtime\conf\server.xml to comment out the SSL sections it works fine.
    Any assistance welcome - I can't allow this site to made publicly available with using SSL.
    SM

    @Scott, first are you running update 3? If so, let’s clarify at the outside that, as that bug report (you point to) does indicate in the notes below it, there is a fix for a problem where this feature broke in that release.  And as it notes, you can email [email protected] to request the fix (referring to that bug), or you can wait for it to be released publicly as part of a larger set of fixes.
    If you are NOT on update 3, or you may apply the fix and find things still don’t work, I would wonder about a few things, from what you’ve described.
    First, you say that the CF service won’t start, and you offer some lines from the ColdFusion-error log. Just to be clear, those particular error messages are common and nothing to worry about. They definitely do NOT reflect any reason CF doesn’t start. But are you confirming that that time (in the log lines) is in fact the time that you had started CF, when it would not start? I’d suspect not.
    Look instead in the coldfusin-out.log. What does THAT log show at the time you try to start CF and it won’t start? You may find something else there. (And since you refer to editing the server.xml file, you may the log complains that because of an error in the XML it can’t “parse” the file. It’s worth checking.
    You say also that you have confirmed that “paths are correct in CF Admin to the cert file”. What path are you referring to? There’s no page in the CF admin that points to the CACERTS file in which the certs are stored. Do you perhaps mean on the “system info” or “settings summary” page? Even so there’s still no line in there which refers to the “cert file”.
    Instead—and this could be a part of your problem—the cert file is simply found WITHIN the directory where CF’s pointed to to find its JVM. Wherever THAT is, is where you need to put any certificates. So take a look at the CF Admin, either in the ”java and jvm” page (and the value of its “Java Virtual Machine Path”), or in the “settings summary” or “system information” pages and their value for “Java Home”. Is that something like \coldfusion11\jre? Or something like \Java\jdk1.7.0_71\jre? Whichever it is, THAT’s where you need to put the certs, within there (in its \lib\security folder).
    Finally, when you say that if you “comment out the SSL sections  it works fine”, do you mean that a) CF comes up and b) some example code calling your socket works, as long as you don’t use SSL?
    To be clear, no, you don’t need any other version of CF11 to get websockets to work. But if you are on update 3, that may be the simple problem. Let us know how it goes for you with this info.
    /charlie

  • Creating Virtual Directory

    I have 2 directories outside tomcat folder.i have created a virtual directory path to point to one folder. now i need to point to another folder also through this directory..
    Appreciate your help at the earliest.
    -Su

    Seems like the question is related to tomcat, please post the question to tomcat forum.
    http://mail-archives.apache.org/mod_mbox/tomcat-users/

  • Creating Virtual directory doubts

    i tried following ways to create virtual directory. but none didn't work.
    i have a war file named MyTestPage.war , it will work if i place it under webapps in the tomcat directory.
    but i want to create a virtual directory C:\myDir\TomcatVirtualDir
    i tried the following things
    1) edited the server.xml and added this code.
    <Context path="\" docBase="c:\myDir\TomcatVirtualDir" trusted="false" crossContext="true" debug="1" reloadable="true" >
    </Context> its didn't work.
    2) i created an xml under conf\Catalina\localhost
    named MyTestPage.xml
    added this code.
    <Context path="" docBase="c:\myDir\TomcatVirtualDir" trusted="false" crossContext="true" debug="1" reloadable="true" >
    </Context> it didn't work either.
    what shld i do?

    Ok.
    The examples you gave are for deploying a web app into an existing host.
    To define a new host, you need to add a <host> entry to server.xml
    Docs link: http://tomcat.apache.org/tomcat-5.0-doc/config/host.html
    The appBase directory specifies which directory will work like "webapps"
    example:
    <Host name="virtualTest" debug="0" appBase="c:\myDir\TomcatVirtualDir"
            unpackWARs="true" autoDeploy="true"  xmlValidation="false" xmlNamespaceAware="false">
      <Logger className="org.apache.catalina.logger.FileLogger"
              directory="logs"  prefix="virtualTest\_log." suffix=".txt" timestamp="true"/>          
      <Alias>virtualAlias</Alias>
    </Host>You will also get a directory [TOMCAT]/conf/Catalina/virtualTest
    which is the equivalent of the [TOMCAT]/conf/Catalina/localhost for your new host. You can put a context.xml file in that directory to define the "default" web app for this host.
    You would access the host with url http://virtualTest:8080
    Hope this helps,
    evnafets

  • Problem connecting oracle database to jsp pages using Apache Tomcat server 8.0

    Well...I tried too many things..googled so many times..but still could not find solution to my problem.
    I use windows 8 Enterprise Edition(if this has to do something with the problem)
    Oracle 11.2.0
    Apache Tomcat server 8.0
    JDK 1.7
    My oracle is installed in the D: drive and tomcat in c:. i copied the ojdbc6.jar file from oracle to lib directory of tomcat server.
    Then i set  CLASSPATH in environment variables as "C:\Program Files\Apache Software Foundation\Tomcat 8.0\lib\ojdbc6.jar" in system variables
    My path variable is set as "C:\Program Files\Java\jdk1.7.0_02\bin".
    My program is as follows in notepad:
    <%@ page import="java.sql.*" %>
    <html>
    <body>
    <%
    Connection conn;
    Statement st;
    ResultSet rs;
    try{
    new oracle.jdbc.driver.OracleDriver();
    String dbURL="jdbc:odbc:oracle:thin:@localhost:1521:XE";
    String userId="system";
    String pwd="moon";
    conn=DriverManager.getConnection(dbURL,userId,pwd);
    st=conn.createStatement();
    rs= st.executeQuery("SELECT * FROM login");
    while(rs.next())
    System.out.println(rs.getString(1)+""+rs.getString(2));
    catch(Exception e){}
    %>
    </body>
    </html>
    I get too many errors then
    eroors
    org.apache.jasper.JasperException: An exception occurred processing JSP page /page2.jsp at line 14
    11: String userId="system";
    12: String pwd="moon";
    13:
    14: conn=DriverManager.getConnection(dbURL,userId,pwd);
    15: st=conn.createStatement();
    16:
    17: rs= st.executeQuery("SELECT * FROM login");
    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    root cause
    javax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:905)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:834)
         org.apache.jsp.page2_jsp._jspService(page2_jsp.java:102)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
         org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    Nothing solved this problem.

    >> Nothing solved this problem.
    Can't fix a problem 'till an actual problem is identified.
    >> ODBC Driver Manager ... Data source name not found
    That appears to be ODBC drivers looking for a DSN (Data Set Name). If it wants a DSN, the DSN has to be specified in the code, and the DSN has to be configured in the windows host ODBC applet. So that is at least two squirrels to get in the right tree before moving forward. A ...host:...[port:]SID|service name are some of the bits needed in a jdbc connect string, and that is in no way related to DSNs. A Whole Different Animal. If it wants a DSN that might be what needs to go in the URL bit.
    And ODBC setups can be confusing, especially if an x64 OS is in the mix- if that is the case there are two different ODBC configuration applets, one for x64 the other for x86, and if one gets as far as talking to an actual database it might toss an architecture error. Only way to fix that "problem" is *delete* the ODBC DSN and then run the correct (maybe the x86) ODBC config utility, and set up the DSN. Again.

  • How to create file form servlet in our virtual directory

    hi....
    I want to create a file form my servlet in my virtual directory..
    my directory name ia vps
    it cconatin vps -> WEB-INF -> classes-> servTest
    servTest is servlet....
    and i want to create file from servTest in vps directory..
    actually i am trying to create file but it by default saved in windows/system32 directory.

    You need to give the absolute path to create the file, if you just give the filename, the file will be created in the working directory which is system32 for Windows.
    You could either hardcode it, or you can use ServletContext.getRealPath("/") ( http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String) ) This will return the path on the server's filesystem where your application folder ( under webapps for Tomcat) is located.
    NOTE: If you application is in the form of a .war file, this may not work! The server may return a null.
    "/" specifies the root i.e., your application's highest level directory. If your application is webapps/vps then getRealPath("/") will return something like C:\Program Files\Apache Group\Tomcat 4.1\webapps\vps

  • How to run different versions of Apache Tomcat on one machine?

    Hi, I am developing a web application. My application runs on Apache Tomcat 5.5.12 and i am using jdk 1.5_03. My application detects files that are automatically scanned to a specific directory and queues them for capture in a database.
    The scanner software (HP Toolbox) is also a web application (Unfortunately), it installs itself with Apache Tomcat 4.03. It is "wired" in a specialised way (not the way you would usually deploy web apps). So the Web server is customised by HP (Hewlett-Packard).
    The scanner needs this software running inorder to automatically scan to a specified folder. You can only specify local directories to scan to from the Toolbox application
    There seems to be some resource conflict when I run my version of Tomcat when the Toolbox application is running (I get an exception
    ..IllegalMonitorState...current thread not owner). Visa vera is alos true..if i start my application first the Toolbox application won't run.
    I tried to install the Toolbox app on another machine and monitor a directory remotely...this doesn't work because you can't read or write to remote files from a servlet or JSP.
    I tried loading my application in the web apps directory of Apache 4.03 but it did not detect my application. I don't know how to configure the Tomcat customised by HP.
    How can i go about this problem? Is there a way of running two versions of Apache Tomcat on one machine?
    Thanks
    Parthiv

    This is the exception i get when i try to run my version of Apache Tomcat when the Toolbox is running: My application is set to port 80.
    Exception in thread "http-80-1" java.lang.IllegalMonitorStateException: current thread not owner
         at java.lang.Object.notifyAll(Native Method)
         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1216)
         at java.lang.Thread.run(Unknown Source)

  • JSP apache tomcat probs

    hi im newbie in JSP and i started at some tutorials about JSPs
    everthing stops here
    http://www.jsptut.com/Forms.jsp
    im using apache tomcat 5.5.17 and jdk 1.5.06
    error when i typed name and email and age.... and submited and then this error occur:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 1 in the jsp file: /SaveName.jsp
    Generated servlet error:
    UserData cannot be resolved to a type
    An error occurred at line: 1 in the jsp file: /SaveName.jsp
    Generated servlet error:
    UserData cannot be resolved to a type
    An error occurred at line: 1 in the jsp file: /SaveName.jsp
    Generated servlet error:
    UserData cannot be resolved to a type
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    i have searched google for this error and find something about registy thing and that the apache is not installed ok and so on... i have tried all that stuff... but havent succedded
    the above example si copy pase...
    my directory tree for this "project" looks like this
    ROOT=%CATALINA_HOME%\webapps\example4
    ROOT\GetName.html
    ROOT\SaveName.jsp
    ROOT\NextPage.jsp
    ROOT\WEB-INF\calsses\UserData.class
    any ideas?
    Message was edited by:
    zmeda

    My guess would be this is an old tutorial.
    As of Java 1.4, classes not in a package won't work in Tomcat JSP pages.
    You need to put your UserData class in a package:
    package mypackage;
    public class UserData{ ....This would then compile into
    /WEB-INF/classes/mypackage/UserData.class
    And in your web page you would need
    <%@ page import="mypackage.*" %>

Maybe you are looking for

  • Non saleable returned finished goods which are discarded handled in SAP

    Hi Gurus, I have a question with regards to Sales return.  I have some returned finished goods which was taken back in the system and reserved for quality check.  Here FG stock was debited and COGS was creditedat the time of physical receipt of mater

  • HT201269 Can't copy my contacts from NOKIA E6 to iPhone 5S Please help...

    I am unable to copy my contacts from Nokia E6 to iPhone 5S. I am able to make a backup on Nokia PC Suit. But when opening iTunes it says thta contacts are being copied through iCloid Please help.

  • Delete Google Search ?

    How do you delete the search history in google? While in Safari, if I simply "clear history" then go to google to do a search all of my old searches are there. I wrote a huge research paper, and it's getting annoying everytime I go to google and my p

  • Generic MDX Statement

    Hi! What I'm looking for is the MDX equivalent of the SQL statement: "Select * from Table". What I want is a generic MDX statement that I can use to get all the measures and dimensions from a Cube or DSO. I know it's possible to get all the measures

  • Lumia 930 app like glance screen

    I need some app which will work something like glance screen - peak option. I have Nokia cp-637 case, and wish some applications which will turn on screen when I open cp-637 case. Something like on Samsung.