Results 1 to 8 of 8
  1. #1
    raghu9198's Avatar
    raghu9198 is offline Member
    Join Date
    Dec 2008
    Posts
    32
    Rep Power
    0

    Default To Access in the web

    Hello Everybody!!!!!

    I have developed a client server program which runs fine
    i.e I can access the html page from the client system by typing

    http://IPAddress:Portnumber if I have started tomcat on my server
    Up to this I have no problem but instead of http://IPAddress:Portnumber
    I want to type some name like www. xyz. com and access it on my client how can i do that???????


    Please help me


    Thanks,
    raghu
    Last edited by raghu9198; 01-19-2009 at 07:10 AM.

  2. #2
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    6

    Default

    Edit file conf/servers.xml in the path of your tomcat server folder.I think it is a HOST tag responsible,then also create webapps-<name of your host> folder.I will check today at my work my pc configuration and will post them.
    Last edited by serjant; 01-19-2009 at 07:25 AM.

  3. #3
    raghu9198's Avatar
    raghu9198 is offline Member
    Join Date
    Dec 2008
    Posts
    32
    Rep Power
    0

    Default

    Thanks for your reply!!!!!!
    I have edited the server.xml and
    changed
    <Host name="localhost" appBase="webapps">
    to <Host name=" www . hosting . com " appBase="webapps">
    but it is not working
    Thanks,
    raghu

  4. #4
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    6

    Default

    You should also edit hostname in your system.The default value is 127.0.0.1=localhost.so you should make it 127.0.0.1=hosting.com
    The second stuff,You shouldn't edit the host tag,add another one,create then folder webapss-hosting,then when you deploy a war file into the folder бкутфьу it to ROOT

  5. #5
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    6

    Default

    What OS do you use?

  6. #6
    raghu9198's Avatar
    raghu9198 is offline Member
    Join Date
    Dec 2008
    Posts
    32
    Rep Power
    0

    Default

    windows xp sp2
    what do u mean by this
    when you deploy a war file into the folder бкутфьу it to ROOT
    Last edited by raghu9198; 01-19-2009 at 08:12 AM.

  7. #7
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    6

    Default

    Sorry,when you create a war file,move it into the webapps-hosting folder and then rename it to ROOT

  8. #8
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    6

    Default

    My servers.xml has the following:

    Java Code:
     <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">
    
            <!-- SingleSignOn valve, share authentication between web applications
                 Documentation at: /docs/config/valve.html -->
            <!--
            <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
            -->
    
            <!-- Access log processes all example.
                 Documentation at: /docs/config/valve.html -->
            <!--
            <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
                   prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
            -->
    
          </Host>
          <Host name="hosting"  appBase="webapps-hosting"
                unpackWARs="true" autoDeploy="true"
    	    xmlValidation="false" xmlNamespaceAware="false"/>
    I don't know how to declare another host on Windows,In linux i edit the /etc/hosts file,i add the following:


    Java Code:
    127.0.0.1   hosting

Similar Threads

  1. Method access or field access
    By carderne in forum New To Java
    Replies: 2
    Last Post: 12-06-2008, 06:20 PM
  2. SQL Server and MS Access
    By Hima in forum JDBC
    Replies: 0
    Last Post: 04-08-2008, 02:59 PM
  3. Replies: 3
    Last Post: 11-18-2007, 07:41 PM
  4. Access with MS SQL
    By cachi in forum JDBC
    Replies: 1
    Last Post: 08-07-2007, 07:54 AM
  5. Replies: 1
    Last Post: 08-07-2007, 07:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •