Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getting host, port and contextPath in the webapplication

843841Jan 24 2008 — edited Jan 25 2008
I deploy my web app. on tomcat server. The web application that consists of servlets and jsps. I am also running a quartz cron job in my application that sends email once a day to some configured addresses. In the email, I need to provide a url to a web app resource. Because I'm building the url on the fly, I need to determine the servername/host, port and the application contextPath at runtime.

How can I get this information in the quartz job class?

thanks,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2008
Added on Jan 24 2008
8 comments
356 views