• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deploy a servlet project on Apache HTTP 2.0 server

 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to deploy a servlet project on Apache HTTP 2.0 server?
What are the things needed that i have to do for the same?
I tried searching on the topic but did not come up with something relevent. So please help me.
Thank you.
[ November 06, 2008: Message edited by: Sudipto Shekhar ]
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have deployed a project on the server. in the wel-come page i have a button which calls the controller servlet. The welcome page works fine.When the button is clicked it says "404 error.file not found. the link appears to be broken." the project when deployed on tomcat 5.0 it works fine,but not when deployed on Apache HTTP 2.0 server.
I have configured the Apache httpd.conf file and set it as follows:

DocumentRoot "C:\Program Files\Apache Group\Apache2\MyWebPage"

and

<Directory "C:\Program Files\Apache Group\Apache2\MyWebPage">

where MyWebPage is the root dir of my project.

I have my servlet in MyWebPage\WEB-INF\classes\com\example\web

The index.html(welcome file) is under MyWebPage (context root)folder.]

what are rest of the settings i require?
Please help.

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apache httpd doesn't support Java web apps. You need to hook it up to Tomcat or some other servlet container. See http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html for more information.
[ November 06, 2008: Message edited by: Ulf Dittmer ]
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes i too was thinking the same.Ok i'll try out what you said. Thank you very much.


 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using the Apache httpd 2.0 server i have set-up my own server at my work place and am hosting a site. I have got a domain name,bound to my ip from one of the service provider. But now that i know that that apache httpd 2.0 does not support JAVA, do you have some alternative ideas of a server which can serve my purpose?
[ November 06, 2008: Message edited by: Sudipto Shekhar ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are any number of servlet containers - Tomcat, Resin, JBoss, ...

Most standard hosting plans do not support those, though - you'll need a Java hosting plan which will likely be more expensive. (Unless your plan gives you root access, of course, in which case you can install any of these.)
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ulf Dittmer:
(Unless your plan gives you root access, of course, in which case you can install any of these.)



Sorry as i am very new to all these please can you explain a little more of this to me?

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many inexpensive hosting plans will not give you root access, meaning you can only use whatever software is preinstalled by the provider. In that case, if no servlet container is installed, you can't add one later.

So you should check the feature list of your hosting company to see whether they provide Java web app support and/or root access.
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok i get it. Let me explain to you what i want to do.
I have an embedded server.I want a web-site through which i can access the embedded server.What my embedded server does is it takes the request from the user and do the processing. To provide this input i want a web-server through which the client can send requests to my embedded server. now my web-server would be using a .dll file which will be the driver for the embedded server,and no service provider will allow me to make system calls om their system.This is for what i require a web-server running at my place.So what do you think should be the probable choice?

Please help.
[ November 06, 2008: Message edited by: Sudipto Shekhar ]
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ulf please check your private messages.
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which server will help me hosting as well as support servlet-api? I am trying to figure it out, any help will be great.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "at my place" - your home machine? That's under your control, so you can do anything you want. If you're talking about a hosting setup that allows DLLs to be deployed, I have no idea if those exist. You may have to go for a dedicated machine for that.

The http://faq.javaranch.com/java/ServletsFaq#hosting has a list of Java hosting providers.
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, my own machine. That's exactly what i tried to say! I want my own server. So what should i do? Which software will i require to set-up my own server and that too which supports JAVA api. By using the apache http server set-up i was able to host my own web-site and it worked fine. When the domain name www.mylane.com was typed, it worked over the internet and the well-come page was displayed.But on click of a particular button,which called a servlet,it showed 404 error(because as you, said it does not support JAVA api). Now i want to replace this server with another which would fulfill the requirement and also support servlet api. I hope now you might have understood what i am trying to say and do.
[ November 06, 2008: Message edited by: Sudipto Shekhar ]
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So can i use TOMCAT for my purpose? Will it help me create a server to host my website?


 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sudipto Shekhar:
So can i use TOMCAT for my purpose? Will it help me create a server to host my website?




Tomcat works as a standalone webserver and as a servlet container.
If you use it, you won't need Apache HTTPD.
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok i installed tomcat on my machine.But i am unable to configure it.I can not bind it to my domain name! How do i configure tomcat now?
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wait i found it, i hope so
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no it did not work.the host name could not be resolved.
Any help how do i configure Tomcat 5.0..please
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what the "it" is that you tried and which didn't work, but getting a domain name to resolve to your machine has nothing to with Tomcat (or Apache httpd). It's a feature of DNS. You need to register your IP address (which must be static, not dynamic) with the registrar you're using for your domain name. The registrar will make sure it gets into the DNS system (which might take a few hours or even days).
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes i do have a domain name.My ip is registered and the service provider has provided me with the domain name. After configuring tomcat when i typed www.mydomainname.com, the message was "host could not be resolved", which i think, was because i could not configure tomcat properly. So i asked a help regarding configuring tomcat, as a web host,any help....
[ November 06, 2008: Message edited by: Sudipto Shekhar ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That message has nothing to do with Tomcat; it occurs before the request is even sent. What happens when you do "nslookup www.mydomainname.com" - does it report the correct IP address? Can you ping the address?
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok how do i do "nslookup www.mydomainname.com"!

i did that! it says this web page is not availabe.
[ November 06, 2008: Message edited by: Sudipto Shekhar ]
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please tell me if at any point i am not able to explain any point to you...
 
reply
    Bookmark Topic Watch Topic
  • New Topic