Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subdomains and Servlets

Status
Not open for further replies.

dparrott

MIS
Jul 26, 2004
201
0
0
US
Hey all,

So the higher ups decided to buy a new website without consulting the IT people. The new website is only run on linux/apache/php. Our problem is the linux. Between the three of us on staff, linux is not a strong point. Plus, we have a critical web app provided by a third party (not the same ones making the new website), to access our Agile installation. This program requires Windows 2003 and Tomcat.

We currently host 2 websites and 2 web applications, one the aforementioned Agile, and another written in ASP which requires IIS, which requires Windows. So since they spent sooo much money on the website, they want it up asap. The design company is also a web hosting company, and since no one thought to get a requirement stating it run on Windows, they are nice enough to host the website for free while we pay them to get it to work on Windows. Problem is that currently our ASP program is accessible only through I have figured that one out, using pmc.company1.com.

Now I need to do something similar for the other one. Currently it is accessible through
We want it to be accessible through something like agile.company2.com (or agile.company2.com/agile/HcmServlet, although the first is by far the most preferable).

We are using IIS 6.0 (Windows 2003 Std), and Tomcat 5. Obviously before this goes live, there are the necessary DNS changes, but before we notify our ISP, we want this working.

Whatever is unclear, please let me know. I set this up a couple of years ago, but I should be able to find anything you need.

Thanks,
 
Your URL, after the .com is controlled by the context of your servlet and your web.xml file in the same way on Linux as it is on Windows. So, your problem isn't related to Linux. It's all defined by the servlet specification (ref: Java Servlet Technology). Note that the latest version of the specification is 2.5, but I've only been able to find the definition of the Web Application Deployment Descriptor in version 2.3.

In general the context is going to be the name of the subdirectory of the webapps folder and the rest is going to be defined by the url-pattern in the servlet-mapping. So, if you want put your complete Web application into a directory named [tt]agile[/tt] and use a url-pattern of [tt]/HcmServlet/*[/tt]

If you will need to access your page through the Apache HTTP server, then that will make it a bit more complicated. However, none of this is specific to Linux. It's all standard and documented on Tomcat's site.

--
-- Ghodmode

Give a man a fish and he'll come back to buy more... Teach a man to fish and you're out of business.
 
Ghodmode,

Linux isn't the problem with the JSP. Linux is the problem with the other website, which we won't be hosting (yet). The JSP app requires Windows.

Because the other app requires IIS, we can't use (or at least not that I am aware of) Apache. We will have to access the Agile stuff through IIS.

Not having a real good working knowledge of Linux/Apache/Tomcat/IIS means that the Tomcat docs are fairly useless for me. I don't understand the terminology, and therefore, have no effective way to search the documents. If I tried to read all of it, I think my head would explode.

We already have That's what's not going to work. We need it to be so that way the public DNS can point company2.com to the new website on different machine, and point agile.company2.com to the one currently pointed to by company2.com that we have in house.

We need to make it so that instead of using what I am going to call extensions (the part after the .com), we use a subdomain to access this. Thats what I don't know how to do.

Thanks
 
Sounds like an IIS problem. The agile site is IIS / Tomcat, right?

If the site ran apache there's a quick fix with mod_proxy but I'm fairly sure it doesn't apply. There might be a way with tomcat but I'm not the authority.

I've set up many sites with apache /tomcat and what you want can be accomplished with apache. When I point my browser to the server actually serves up if you catch my drift. I don't know if IIS can accomplish similar, I've never had to use IIS. Maybe I'll try someday.

An html redirect in the root of your server could get you half way there. There won't be any masking of the tomcat containers but it works if you want to use the URL without knowing the extra stuff at the end.

I think I understand.

Have Fun!
[pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top