Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Many thanks to you for putting it together and to the forum members for taking the time to post their replies and give their time to help others. Their isn't another site that can touch it..."

Geography

Where in the world do Tek-Tips members come from?
dparrott (MIS)
6 Sep 07 16:12
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 www.company1.com/pmc.  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 www.comany2.com/agile/HcmServlet.

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,
Ghodmode (Programmer)
7 Sep 07 3:43
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 http://company2.com/agile/HcmServlet, put your complete Web application into a directory named agile and use a url-pattern of /HcmServlet/*

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.

dparrott (MIS)
7 Sep 07 8:29
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 http://company2.com/agile/HcmServlet.  That's what's not going to work.  We need it to be http://agile.company2.com, 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

IRudebwoy (IS/IT--Management)
14 Sep 07 2:37
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 http://www.some.url the server actually serves up http://my.server:8080/tomcat/servlet 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

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close