You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lee Jesse <Le...@COLPAL.COM> on 2002/09/18 05:44:42 UTC

Enquiry

Dear Sir or Madam,

I have some problems changing the host name of the Tomcat. The initial host
name for Tomcat is 'localhost', and I want to change to some other name.
Can it be done?

Thank you.


Regards,
Jesse Lee



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Enquiry

Posted by Tom Cook <to...@adelaide.edu.au>.
On  0, Lee Jesse <Le...@colpal.com> wrote:
> Dear Sir or Madam,
> 
> I have some problems changing the host name of the Tomcat. The initial host
> name for Tomcat is 'localhost', and I want to change to some other name.
> Can it be done?

You can't just assign host names.  You can address tomcat as

http://localhost:8080/

or, if your host has another valid name, say frog.pond, then you can
address tomcat as

http://frog.pond:8080/

This is not a tomcat issue, it is an operating system issue, or really
a network issue.  You can set your host name to whatever you like, but
if you are on a network then it is best to ask your sysadmin about it
- they can change your machine's entry in your DNS.

Tom
-- 
Tom Cook
Information Technology Services, The University of Adelaide

"Chaos Theory is a new theory invented by scientists panicked by the thought that the public were beginning to understand the old ones."
	- Mike Barfield

Get my GPG public key: https://pinky.its.adelaide.edu.au/~tkcook/tom.cook-at-adelaide.edu.au

RE: Caching / Cloning

Posted by neal <ne...@yahoo.com>.
Siddarth,

Thanks but I'm thinking of two possible issues:

1. using the ServletContext.getContext() - won't this still just return a
pointer rather than cloning the cache?  I looked at the API and didn't see
anything that said it was copying the object and creating a local copy.

2. Returning and having to handle the entire contents of the servlet context
could imply alot of overheard, I would think....at least presuming your
copying the context each time a page is called in ordert to obtain a local
copy of something, in this case an XsLT Transformer object.

Am I misunderstanding your suggestion, or how this would work?

Thanks.
Neal


-----Original Message-----
From: Siddharth [mailto:siddharth@pun.cmc.net.in]
Sent: Tuesday, September 17, 2002 10:30 PM
To: Tomcat Users List
Subject: Re: Caching / Cloning


Neal,
I have never worked with XSLT but I can show you the way where you can have
an
initial copy of ServletContext which you can use independently.
Interface ServletContext has a mathod called
getContext(java.lang.String uripath)  returns  ServletContext
You can use this method by giving uripath of same application to get a copy
of cache.

I hope, This suggestion may help you.
Siddharth


----- Original Message -----
From: neal <ne...@yahoo.com>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Wednesday, September 18, 2002 9:52 AM
Subject: Caching / Cloning


> Is there a way to make a copy of what's in my cache (getServletContext())
> and make changes to that local copy, independent of whether the cached
> object implements Cloneable()?
>
>
> In order to speed up my XSLT I thought I would preload them (their
> Transformer objects) into app scope and simply retrieve it as needed for
> transforms.
>
> This works fine except I just remembered that I need to set attributes on
> these XsLT Transformer objects.  Now, I am PRESUMING that this means that
I
> would then be locking up the servlet context each time I set one of these
> parameters so then it seems I should clone() the object locally.  That way
I
> could set the params locally without affecting (or locking) the cached
> version).  BUT Transfomer does not appear to implement the Cloneable()
> interface.
>
> Is there a way around this?  Am I by any chance wrong about what's
actually
> happening here?   Can anyone make a suggestion?
>
> Here's what I'm doing basically:
>
> ServletContext application = getServletContext();
> application.setAttribute("TEMPLATES_HASH",templates);
> (where templates is a Hashtable containing Transformer objects)
>
>
> Thanks.
> Neal
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Reloading application with tomcat 4.x manager

Posted by Aviv Eliezer <ae...@aquanet.co.il>.
Hi guys,
When I'm using Tomcat Manager app to reload a webapp, I have a problem:
I use a ContextListener to do some application initialization and to put in
the ServletContext some objects.
When using reload, for some reason the servletContext I receive from the
destroy() event is different (?!?) from the ServletContext I received in the
init() event- thus I can't clean the resources the app used.
I never get these problems when I shutdown Tomcat- in which case I get the
same ServletContext from the init() and destroy() events. Is that a bug in
the Manager app?
Note that I don't have any other webapp installed, just one (so there's no
chance of confusing ServletContext of different webapps).
Anyone has an idea?

-----Original Message-----
From: Siddharth [mailto:siddharth@pun.cmc.net.in]
Sent: Wednesday, September 18, 2002 7:30 AM
To: Tomcat Users List
Subject: Re: Caching / Cloning


Neal,
I have never worked with XSLT but I can show you the way where you can have
an
initial copy of ServletContext which you can use independently.
Interface ServletContext has a mathod called
getContext(java.lang.String uripath)  returns  ServletContext
You can use this method by giving uripath of same application to get a copy
of cache.

I hope, This suggestion may help you.
Siddharth


----- Original Message -----
From: neal <ne...@yahoo.com>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Wednesday, September 18, 2002 9:52 AM
Subject: Caching / Cloning


> Is there a way to make a copy of what's in my cache (getServletContext())
> and make changes to that local copy, independent of whether the cached
> object implements Cloneable()?
>
>
> In order to speed up my XSLT I thought I would preload them (their
> Transformer objects) into app scope and simply retrieve it as needed for
> transforms.
>
> This works fine except I just remembered that I need to set attributes on
> these XsLT Transformer objects.  Now, I am PRESUMING that this means that
I
> would then be locking up the servlet context each time I set one of these
> parameters so then it seems I should clone() the object locally.  That way
I
> could set the params locally without affecting (or locking) the cached
> version).  BUT Transfomer does not appear to implement the Cloneable()
> interface.
>
> Is there a way around this?  Am I by any chance wrong about what's
actually
> happening here?   Can anyone make a suggestion?
>
> Here's what I'm doing basically:
>
> ServletContext application = getServletContext();
> application.setAttribute("TEMPLATES_HASH",templates);
> (where templates is a Hashtable containing Transformer objects)
>
>
> Thanks.
> Neal
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Caching / Cloning

Posted by Siddharth <si...@pun.cmc.net.in>.
Neal,
I have never worked with XSLT but I can show you the way where you can have
an
initial copy of ServletContext which you can use independently.
Interface ServletContext has a mathod called
getContext(java.lang.String uripath)  returns  ServletContext
You can use this method by giving uripath of same application to get a copy
of cache.

I hope, This suggestion may help you.
Siddharth


----- Original Message -----
From: neal <ne...@yahoo.com>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Wednesday, September 18, 2002 9:52 AM
Subject: Caching / Cloning


> Is there a way to make a copy of what's in my cache (getServletContext())
> and make changes to that local copy, independent of whether the cached
> object implements Cloneable()?
>
>
> In order to speed up my XSLT I thought I would preload them (their
> Transformer objects) into app scope and simply retrieve it as needed for
> transforms.
>
> This works fine except I just remembered that I need to set attributes on
> these XsLT Transformer objects.  Now, I am PRESUMING that this means that
I
> would then be locking up the servlet context each time I set one of these
> parameters so then it seems I should clone() the object locally.  That way
I
> could set the params locally without affecting (or locking) the cached
> version).  BUT Transfomer does not appear to implement the Cloneable()
> interface.
>
> Is there a way around this?  Am I by any chance wrong about what's
actually
> happening here?   Can anyone make a suggestion?
>
> Here's what I'm doing basically:
>
> ServletContext application = getServletContext();
> application.setAttribute("TEMPLATES_HASH",templates);
> (where templates is a Hashtable containing Transformer objects)
>
>
> Thanks.
> Neal
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Caching / Cloning

Posted by neal <ne...@yahoo.com>.
Is there a way to make a copy of what's in my cache (getServletContext())
and make changes to that local copy, independent of whether the cached
object implements Cloneable()?


In order to speed up my XSLT I thought I would preload them (their
Transformer objects) into app scope and simply retrieve it as needed for
transforms.

This works fine except I just remembered that I need to set attributes on
these XsLT Transformer objects.  Now, I am PRESUMING that this means that I
would then be locking up the servlet context each time I set one of these
parameters so then it seems I should clone() the object locally.  That way I
could set the params locally without affecting (or locking) the cached
version).  BUT Transfomer does not appear to implement the Cloneable()
interface.

Is there a way around this?  Am I by any chance wrong about what's actually
happening here?   Can anyone make a suggestion?

Here's what I'm doing basically:

	 ServletContext application = getServletContext();
	 application.setAttribute("TEMPLATES_HASH",templates);
	(where templates is a Hashtable containing Transformer objects)


Thanks.
Neal


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>