Re: Servlet Deployment Issues

2023-01-13 Thread Christopher Schultz

Anthony,

On 1/13/23 12:03, Anthony Dell'Anno wrote:

Chris,
No, I haven’t seen those replies, but I have changed from JavaFX to Jakarta, as 
StackOverflow suggested that, too.
What I’m experiencing now, is the old version of my HelloWorld class running, 
when I’ve updated it slightly, have recompiled it, and have placed the new 
class file in the webapps directory.
Do you, or does anybody else have sny servlet book suggestions?
Amazon only had this and one other that was even older.


Please go back and read the responses from the other day. Check the 
(threaded) mailing list archives. The subject was "Tomcat 10.1.4 HTTP 
Status 404 and 500 Help". Some of your questions have already been answered.


-chris


On Friday, January 13, 2023, 8:23 AM, Christopher Schultz 
 wrote:

Anthony,

On 1/12/23 18:18, Anthony Dell'Anno wrote:

Good evening everyone,
I am just starting out with Java servlets in Tomcat 10.1.4.
I’m learning them using a book written in 2010, of which I don’t remember the 
authors’ names.


Just FYI, a book written in 2010 will be using the Java EE or old
servlet, etc. package names while Tomcat 10 will want you to use the new
ones. Without going into too much detail, you basically want to change
every instance of:

javax.[stuff]

To:

jakarta.[stuff]


The book does a good job of explaining code samples, but doesn’t
describe any solutions to HTTP errors.

That's appropriate, depending on the error(s) you are seeing. A book
about Java servlets and containers is already going to be pretty long;
adding the details of HTTP would roughly double the size of the book.


I have a HelloWorld servlet, located in my
tomcat_home/webapps/servlet_files/classes/hello_app directory, with
the corresponding web.xml file located just outside of that folder.

The same directory structure is the same for servlet #2. The URL
pattern for HelloWorld is /HelloWorld, and the second servlet’s
web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
HTTPError 404 messages when attempting to run either of them. >
Can anybody help me?


Did you see any of the replies sent back to this list on this topic from
Jan 10th and Jan 11th? I think there are already some ideas in there,
and some questions, too.

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Servlet Deployment Issues

2023-01-13 Thread Anthony Dell'Anno
Chris,
No, I haven’t seen those replies, but I have changed from JavaFX to Jakarta, as 
StackOverflow suggested that, too.
What I’m experiencing now, is the old version of my HelloWorld class running, 
when I’ve updated it slightly, have recompiled it, and have placed the new 
class file in the webapps directory.
Do you, or does anybody else have sny servlet book suggestions?
Amazon only had this and one other that was even older.


Sent from Yahoo Mail for iPhone


On Friday, January 13, 2023, 8:23 AM, Christopher Schultz 
 wrote:

Anthony,

On 1/12/23 18:18, Anthony Dell'Anno wrote:
> Good evening everyone,
> I am just starting out with Java servlets in Tomcat 10.1.4.
> I’m learning them using a book written in 2010, of which I don’t remember the 
> authors’ names.

Just FYI, a book written in 2010 will be using the Java EE or old 
servlet, etc. package names while Tomcat 10 will want you to use the new 
ones. Without going into too much detail, you basically want to change 
every instance of:

javax.[stuff]

To:

jakarta.[stuff]

> The book does a good job of explaining code samples, but doesn’t
> describe any solutions to HTTP errors.
That's appropriate, depending on the error(s) you are seeing. A book 
about Java servlets and containers is already going to be pretty long; 
adding the details of HTTP would roughly double the size of the book.

> I have a HelloWorld servlet, located in my
> tomcat_home/webapps/servlet_files/classes/hello_app directory, with
> the corresponding web.xml file located just outside of that folder.
> 
> The same directory structure is the same for servlet #2. The URL
> pattern for HelloWorld is /HelloWorld, and the second servlet’s
> web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
> HTTPError 404 messages when attempting to run either of them. >
> Can anybody help me?

Did you see any of the replies sent back to this list on this topic from 
Jan 10th and Jan 11th? I think there are already some ideas in there, 
and some questions, too.

-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org






Re: Servlet Deployment Issues

2023-01-13 Thread Christopher Schultz

Anthony,

On 1/12/23 18:18, Anthony Dell'Anno wrote:

Good evening everyone,
I am just starting out with Java servlets in Tomcat 10.1.4.
I’m learning them using a book written in 2010, of which I don’t remember the 
authors’ names.


Just FYI, a book written in 2010 will be using the Java EE or old 
servlet, etc. package names while Tomcat 10 will want you to use the new 
ones. Without going into too much detail, you basically want to change 
every instance of:


javax.[stuff]

To:

jakarta.[stuff]


The book does a good job of explaining code samples, but doesn’t
describe any solutions to HTTP errors.
That's appropriate, depending on the error(s) you are seeing. A book 
about Java servlets and containers is already going to be pretty long; 
adding the details of HTTP would roughly double the size of the book.



I have a HelloWorld servlet, located in my
tomcat_home/webapps/servlet_files/classes/hello_app directory, with
the corresponding web.xml file located just outside of that folder.

The same directory structure is the same for servlet #2. The URL
pattern for HelloWorld is /HelloWorld, and the second servlet’s
web.xml URL pattern is /HelloWorld_Two. In both instances, I receive
HTTPError 404 messages when attempting to run either of them. >
Can anybody help me?


Did you see any of the replies sent back to this list on this topic from 
Jan 10th and Jan 11th? I think there are already some ideas in there, 
and some questions, too.


-chris

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Servlet Deployment Issues

2023-01-12 Thread Anthony Dell'Anno
Good evening everyone,
I am just starting out with Java servlets in Tomcat 10.1.4.
I’m learning them using a book written in 2010, of which I don’t remember the 
authors’ names.
The book does a good job of explaining code samples, but doesn’t describe any 
solutions to HTTP errors.
I have a HelloWorld servlet, located in my 
tomcat_home/webapps/servlet_files/classes/hello_app directory, with the 
corresponding web.xml file located just outside of that folder.
The same directory structure is the same for servlet #2.
The URL pattern for HelloWorld is /HelloWorld, and the second servlet’s web.xml 
URL pattern is /HelloWorld_Two.
In both instances, I receive HTTPError 404 messages when attempting to run 
either of them.
Can anybody help me?
Thank you,
Anthony 

Sent from Yahoo Mail for iPhone


Re: Deployment issues with multiple instance of Tomcat sharing web-apps directory

2019-01-16 Thread Mark Thomas
On 16/01/2019 10:26, Vinu Vibhu Sobhana wrote:
> Hai,
> 
> Iam new to mailing list and I apologize in advance if this is not the
> correct place..

Welcome to the Tomcat community. No need to apologise. And you are in
the right place.

> I am a system administrator and my development team creates application
> in JAVA that are been hosted on tomcat web-servers. While hosting the
> application, I was asked to explore the feasibility on the below
> points
> 
> 1. Can I have centralized web-apps directory for multiple tomcat
> instances hosted on the same or different servers. ie tomcat1 running
> on server1 and tomcat2 running on server2. Both servers are been
> assigned a common storage folder (via NFS) named "webstore" which has
> been mapped to both servers webapps directories. Now my query is upon
> starting tomcat instances on both servers, I should receive a working
> instance of my application on both servers.>
> Is this possible in any way or is there any other recommended method
> that I should follow. Providing individual webapps folder to all
> tomcat instances would be a waste of storage space for our project as
> our application warsize is large. I have searched the internet and
> found nothing clarifying my point. Hence I though to post here and
> collect your vaild comments.

It is possible but not generally recommended.

Experience of shared network storage is that it is not 100% reliable. If
the Tomcat server's connection to the shared server drops, then all the
applications will be undeployed on that Tomcat instance.

Reliable network storage is available but it is generally significantly
more expensive to purchase and even more expensive to maintain than
simply buying a few TB of local disk storage for each Tomcat instance.

Other factors to bear in mind:
- running from a WAR is slower than running from an unpacked directory
- you can't have multiple Tomcat instances unpacking WARs into the same
  shared storage
- your options are:
  1) Run web apps from WARs on shared storage (slow plus see above)
  2) Run web apps from unpacked diretcories on shared storage
 (see above)
  3) Have the web apps in shares storage but have each Tomcat instance
 unpack them to local disk (may as well use local disk in the first
 place)

> 2. Deploying a patched/updated web application to the current live
> production tomcat server should require least deployment time. For us,
> it takes too long to update the web application war file on most of
> our servers. Hence we have to shutdown the server, update the new war
> file and then starts up tomcat. Is there any best practices that I
> should follow so that I can reduce the deployment time to minimum.

Parallel deployment should help with that.

http://tomcat.apache.org/tomcat-9.0-doc/config/context.html

Roughly it works like this:

- deploy app##001.war
- users get directed to version 001
- deploy app##002.war
- once that web application starts any new users (i.e. new HTTP
  sessions) will be directed to version 002. Users with sessions in
  version 001 will continue to be directed to version 001.
- undeploy version 001 once all the sessions have expired (Tomcat can do
  this for you automatically)
- repeat for app##003.war, app##004.war etc

It also works in a cluster.

HTH,

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Deployment issues with multiple instance of Tomcat sharing web-apps directory

2019-01-16 Thread Vinu Vibhu Sobhana
Hai,

Iam new to mailing list and I apologize in advance if this is not the
correct place..

Iam a system administrator and my development team creates application
in JAVA that are been hosted on tomcat web-servers. While hosting the
application, I was asked to explore the feasibility on the below
points

1. Can I have centralized web-apps directory for multiple tomcat
instances hosted on the same or different servers. ie tomcat1 running
on server1 and tomcat2 running on server2. Both servers are been
assigned a common storage folder (via NFS) named "webstore" which has
been mapped to both servers webapps directories. Now my query is upon
starting tomcat instances on both servers, I should receive a working
instance of my application on both servers.

Is this possible in any way or is there any other recommended method
that I should follow. Providing individual webapps folder to all
tomcat instances would be a waste of storage space for our project as
our application warsize is large. I have searched the internet and
found nothing clarifying my point. Hence I though to post here and
collect your vaild comments.

2. Deploying a patched/updated web application to the current live
production tomcat server should require least deployment time. For us,
it takes too long to update the web application war file on most of
our servers. Hence we have to shutdown the server, update the new war
file and then starts up tomcat. Is there any best practices that I
should follow so that I can reduce the deployment time to minimum.

-- 
Thank You

Best regards
Vinu Vibhu Sobhana

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Web app deployment Issues

2012-10-02 Thread Pid *
On 30 Sep 2012, at 11:52, ASIYA LABARAN a_laba...@yahoo.com wrote:

 Hello,

 I am trying to use tomcat server to deploy a webapp called mifos mfi. I 
 created a folder in the C: (C:\MifosInstall\) where i unzipped the tomcat 
 server 6.0.35.
 I created environment variables as required namely:

 JAVA_HOME
 value:  C:\Program Files\Java\jdk1.7.0_07

 CATALINA_HOME
 value: C:\Mifos Install\apache-tomcat-6.0.35-windows-x64\apache-tomcat-6.0.35

 CATALINA_OPTS
 value: -Xms1024M -Xmx1024M -XX:MaxPermSize=256m

 MIFOS_CONF
 C:\Mifos Install\mifos-v2.4.1\config


 Specifically, where did you put the mfi folder?
 C:\Mifos Install\

 I also  installed a jdk and set up its environment variables as required and 
 also copied the mifos.war file into the webapps folder 
 (CATALINA_HOME/webapps).
 I launched the tomcat server by double clicking the startup.bat inside 
 'CATALINA_HOME/bin/' folder.

 I do receive an error message (HTTP Status 404) saying the resource you 
 requested is not available.


 I need help on deploying my webapp.

There are log files in CATALINA_HOME/logs.

What do they contain? Any interesting messages about the app startup?


p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Web app deployment Issues

2012-10-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Asiya,

On 9/30/12 6:52 AM, ASIYA LABARAN wrote:
 I am trying to use tomcat server to deploy a webapp called mifos
 mfi. I created a folder in the C: (C:\MifosInstall\) where i
 unzipped the tomcat server 6.0.35. I created environment variables
 as required namely:
 
 JAVA_HOME=C:\Program Files\Java\jdk1.7.0_07 CATALINA_HOME=C:\Mifos
 Install\apache-tomcat-6.0.35-windows-x64\apache-tomcat-6.0.35 
 CATALINA_OPTS=-Xms1024M -Xmx1024M -XX:MaxPermSize=256m 
 MIFOS_CONF=C:\Mifos Install\mifos-v2.4.1\config
 
 
 [I put something else under C:\Mifos Install\]

Neither NIFOS_CONF nor C:\Mifos Install have anything to do with
Tomcat unless you have something in your webapp that is referencing
them. Do you?

 I [...] also copied the mifos.war file into the webapps folder 
 (CATALINA_HOME/webapps).

So that would be C:\Mifos
Install\apache-tomcat-6.0.35-windows-x64\apache-tomcat-6.0.35\webapps\mifos.war?

 I launched the tomcat server by double clicking the startup.bat 
 inside 'CATALINA_HOME/bin/' folder.
 
 I do receive an error message (HTTP Status 404) saying the
 resource you requested (http://localhost:8080/mifos) is not
 available.

With a default configuration, this should work (port 8080 is enabled
by default, defaultHost=localhost, localhost/appBase=webapps/).
Perhaps your web application is not launching properly.

As Pid suggests, you need to look at the log files in C:\Mifos
Install\apache-tomcat-6.0.35-windows-x64\apache-tomcat-6.0.35\logs to
see if there are any problems launching your webapp. Start with
catalina.out and go from there. You might want to stop Tomcat, remove
all files under logs/ and then restart Tomcat just so you don't try to
track-down issues that are from a previous run but aren't actually a
problem.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBrM/kACgkQ9CaO5/Lv0PC4FwCgsH3ZZKGxKsSDrpEVdABkn9s8
/KcAn1Keh8IXJ9lFlK+xxTuABOLx2k6I
=NVdg
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Deployment issues

2010-11-22 Thread Victor Kabdebon
Hi everybody,

After having check the log files, several things appear :

22 nov. 2010 18:02:30 org.apache.catalina.startup.HostConfig deployWAR
INFO: Déploiement de l'archive ..war de l'application web
java.io.FileNotFoundException: /opt/victor/tomcat-base/webapps/ROOT.war
(Permission denied)

The second line translation is :
INFO : deploying archive ..war of web application

Where does this error come from ?

Secondly, I have noticed that if I try to delete the ROOT.war in webapps and
I try to deploy my index.war at the location / a ROOT.war appears with the
exact same size that the index.war, so I imagine that my war
is successfully copied.
I tried to access the / of my server and I saw the following error :
 :
java.io.FileNotFoundException:
/opt/victor/tomcat-base/work/Catalina/localhost/manager/ROOT.war (No such
file or directory)

I checked and indeed this file is not in the directory. Is it supposed to be
there to be deployed ?

I am really lost on this issue I don't understand what is its problem...


Thank you for your help
Victor


2010/11/20 Konstantin Kolinko knst.koli...@gmail.com

 2010/11/21 Victor Kabdebon victor.kabde...@gmail.com:
  Hiello Konstantin
 
  Yes I do have access to the HTML manager interface, but nothing is
 deployed
  in the list.
  I will check the context file in conf/catalina/localhost, I don't have
  access to it right now, I didn't think about it.
 
  Thank you very much for your help. Is there anything else that I might
 have
  missed ?
 

 The log files? There might be something interesting there.

 Also I should say that error handling during deploy and undeploy
 operations was improved in 6.0.24. See CVE-2009-2901
 http://tomcat.apache.org/security-6.html

 Best regards,
 Konstantin Kolinko

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Deployment issues

2010-11-20 Thread Victor Kabdebon
Hello everybody,

I am running a server with tomcat 6 installed and running for a long time. I
deploy the war files remotely with the following command in my browser :

[Server location]/manager/deploy?path=/war=file:[pathtoFile]/index.war
[Server location]/manager/deploy?path=/userwar=file:[pathtoFile]/user.war

Recently I went on this address while index.war was being transferred with
scp.

It failed and thrown :

fail deployed application at context path /

I waited until the end of the previous transfer and I decided to deploy the
good file but the same message appeared again. I tried with other valid .war
files and I always got the same error.
I tried to deploy the index.war file to another context path like : /index
and it worked.

It looks like the context path / is locked, do anybody had the same problem
?
 I tried rebooting tomcat's server but it doesn't change anything to the
problem...
I'd like to avoid reinstalling the whole tomcat server for such a mistake

Thank you for your help !


Re: Deployment issues

2010-11-20 Thread Konstantin Kolinko
2010/11/21 Victor Kabdebon victor.kabde...@gmail.com:
 Hello everybody,

 I am running a server with tomcat 6 installed and running for a long time. I
 deploy the war files remotely with the following command in my browser :

 [Server location]/manager/deploy?path=/war=file:[pathtoFile]/index.war
 [Server location]/manager/deploy?path=/userwar=file:[pathtoFile]/user.war


Do you have access to the HTML Manager interface?
[Server location]/manager/html

Maybe the app is already deployed (some remnants of the app).

Or maybe there is context file for it (in conf/Catalina/localhost)
while the app itself is unavailable.


 I'd like to avoid reinstalling the whole tomcat server for such a mistake

If it is some old release of tomcat6 (you are not mentioning which
one), installing a newer version might be a good thing to do.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Deployment issues

2010-11-20 Thread Victor Kabdebon
Hiello Konstantin

Yes I do have access to the HTML manager interface, but nothing is deployed
in the list.
I will check the context file in conf/catalina/localhost, I don't have
access to it right now, I didn't think about it.

Thank you very much for your help. Is there anything else that I might have
missed ?

Victor

2010/11/20 Konstantin Kolinko knst.koli...@gmail.com

 2010/11/21 Victor Kabdebon victor.kabde...@gmail.com:
  Hello everybody,
 
  I am running a server with tomcat 6 installed and running for a long
 time. I
  deploy the war files remotely with the following command in my browser :
 
  [Server location]/manager/deploy?path=/war=file:[pathtoFile]/index.war
  [Server
 location]/manager/deploy?path=/userwar=file:[pathtoFile]/user.war
 

 Do you have access to the HTML Manager interface?
 [Server location]/manager/html

 Maybe the app is already deployed (some remnants of the app).

 Or maybe there is context file for it (in conf/Catalina/localhost)
 while the app itself is unavailable.


  I'd like to avoid reinstalling the whole tomcat server for such a mistake

 If it is some old release of tomcat6 (you are not mentioning which
 one), installing a newer version might be a good thing to do.


 Best regards,
 Konstantin Kolinko

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Deployment issues

2010-11-20 Thread Konstantin Kolinko
2010/11/21 Victor Kabdebon victor.kabde...@gmail.com:
 Hiello Konstantin

 Yes I do have access to the HTML manager interface, but nothing is deployed
 in the list.
 I will check the context file in conf/catalina/localhost, I don't have
 access to it right now, I didn't think about it.

 Thank you very much for your help. Is there anything else that I might have
 missed ?


The log files? There might be something interesting there.

Also I should say that error handling during deploy and undeploy
operations was improved in 6.0.24. See CVE-2009-2901
http://tomcat.apache.org/security-6.html

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Deployment issues

2010-07-14 Thread Sandip d...@iit
   Dear All,



 I have deployed a web application (war file) in webapps directory of tomcat
 6.0.18  its working fine. Please note that its a struts application and has
 been developed sometimes three years back. I am not sure which version of
 struts has been used in it.




 When I deployed the same application in the webapps directory of tomcat
 6.0.26 or 7.0 its not getting deployed and fails to get hosted on my
 localhost.



 Please suggest me where I am missing.

 Thanks in advance.


 Regards,
 Sandip
 India



Re: Deployment issues

2010-07-14 Thread André Warnier

Sandip d...@iit wrote:

   Dear All,



I have deployed a web application (war file) in webapps directory of tomcat
6.0.18  its working fine. Please note that its a struts application and has
been developed sometimes three years back. I am not sure which version of
struts has been used in it.






When I deployed the same application in the webapps directory of tomcat
6.0.26 or 7.0 its not getting deployed and fails to get hosted on my
localhost.





Please suggest me where I am missing.



Sandip,

re-read your message above, and imagine that you are the greatest Java and Tomcat 
specialist.  Do you really think that with the information you provide above, you could 
figure out what your problem is ?
And even if you could, you being the greatest Java and Tomcat specialist and all, do you 
think you would want to spend your time helping someone who does not seem to have made any 
effort of his own to find the problem ?


Start with having a look at the Tomcat logfiles. It is guaranteed that one of them tells 
you why your application is not being loaded.
If you do not know where to find the Tomcat logfiles, then start here : 
http://tomcat.apache.org/tomcat-6.0-doc/index.html





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat caching and deployment issues

2008-06-25 Thread Mark Thomas

Steven Probetts wrote:

Thanks for your replies.
Couple of things, I'm in Australia so that is why I don't get back to you 
straight away.
Also, I hope I'm replying properly and that this message get put in the correct 
location in the thread list.



To deploy I:
Stopped tomcat
added the war file to my wars directory
edited the context fragment file (in conf/Catalina/localhost/mycontext.xml to 
point the docBase attribute to the correct war file)

started tomcat

I am wondering if maybe I didn't 'undeploy' the app in the Tomcat manager (or 
another manager app called probe).


You need to do something to tell Tomcat that the context.xml has changed 
and that the classes etc need to be reloaded. Restarting Tomcat will do 
that but there might be a less invasive way. Have you tried re-loading just 
the changed webapp. Both Tomcat manager app and probe (assuming that is 
lambdaprobe, an excellent tool) will let you do that.


Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat caching and deployment issues

2008-06-25 Thread Johnny Kewl


- Original Message - 
From: Steven Probetts

To: users@tomcat.apache.org
Sent: Wednesday, June 25, 2008 4:13 AM
Subject: Re: Tomcat caching and deployment issues


Thanks for your replies.
Couple of things, I'm in Australia so that is why I don't get back to you 
straight away.
Also, I hope I'm replying properly and that this message get put in the 
correct location in the thread list.





To deploy I:
Stopped tomcat
added the war file to my wars directory
edited the context fragment file (in conf/Catalina/localhost/mycontext.xml 
to point the docBase attribute to the correct war file)

started tomcat


I am wondering if maybe I didn't 'undeploy' the app in the Tomcat manager 
(or another manager app called probe).
I'm unclear as to whether I need to explicitly 'undeploy' to clear out the 
works directory etc.
So, as Johnny Kewl said, there is legacy code being used from the old 
version.
So do i need to 'undeploy' to clear out the work directory and any other 
directories that tomcat uses to run the app or does restarting tomcat do 
this automatically.
Having said that, the solution I used was to stop and start tomcat, which 
apparently cleared out the cache, so why didn't it do this when i restarted 
tomcat after deployment.
And it doesn't seem to answer the problem of when I changed the database 
directly and it didn't show up in the app. Here it seemed to cache the data 
rather than the application
code (which resetting the browser or using a different browser or using a 
different machine that has never run the application before didn't fix).



I'd like to explain how we deploy a bit clearer as I think I rushed it a bit 
earlier.



We have two business sites that have two separate databases (running on the 
same database instance but that is irrelevant).
For convenience, we wanted to have a single war file for the web app that 
all sites shared.



So we do the following (and I lied earlier we use /var not /opt):
We have a dir called /var/tomcat/wars in which we store the single war file
We have a dir called /var/tomcat/instances which contains directories for 
each site

ie
/var/tomcat/instances/site_a
/var/tomcat/instances/site_b


in each of these directories we have the tomcat directories conf, webapps, 
work etc.



The tomcat binary is in /opt/tomcat (and yes i do mean /opt this time)


We have a context fragment file for each site which is
/var/tomcat/instances/site_a/conf/Catalina/www.site_a.com.au/myContext.xml
which contains
Context docBase=/var/tomcat/wars/site_a-version1.war
   reloadable=false swallowOutput=true


The server.xml file has a Host element that reads:
Host name=www.site_a.com.au appBase=webapps
  unpackWARs=false autoDeploy=false
  xmlValidation=false xmlNamespaceAware=false


There is no Context element
Running version.sh returns:Using CATALINA_BASE:   /opt/tomcatUsing 
CATALINA_HOME:   /opt/tomcatUsing CATALINA_TMPDIR: /opt/tomcat/temp

To deploy I:
* Stop tomcat using launchctl (MacOSX's services controller, like init.d in 
Linux)
* copy the war file into the wars directory (with a different name to the 
old app)

*Edit the context fragment file so that docBase points to the new war file
* restart tomcat using launchctl


Regards,


=
Steven

Ah... I see what you doing... this is what is wrong

Do not change the name of the WEB APP of the WAR
The way TC relates context and path is thru the actual name of the file.

This is so that normal humans can easily change the context just by changing 
the file name...


So make the context file in TC look something like this

?xml version=1.0 encoding=UTF-8?
Context docBase=D:/DEV/Ext/test/WebApplication2.war 
path=/WebApplication2/


The path is the context you want it to run on ie domain/WebApplication2
Make them the SAME...

Then do this... in HOST

autoDeploy=true

Then just drop the new wars over the old one and it will redeploy 
automatically.


Notes...
You are not sharing files like this, ie when it deploys, each TC is getting 
its own unpacked version in webapps... have a look.
So you see what happens and its what you calling CACHING... is that when you 
change the name... TC looks for that context.
Cant find it, BUT does find the old already unpacked one in webapps... and 
just runs that.
It cant connect that the new WAR name, ie context must be the same as war 
file name.
Context docBase=D:/DEV/Ext/test/WebApplication2.war 
path=/WebApplication2/


is the full way, so you can see if you can try match a context to a 
different war name, but I dont think TC will figure it out.


If you want to mismatch war and context... you can
but then you must undeploy from /manager/html

and you must run this to redeploy

http://localhost:8080/manager/deploy?config=file://path/to/context.xmlpath=/NewContext

Too much pain...

Then one last thing... becareful if you develop against one of these TC's... 
as soon as you do that, the IDE will steal the context away

Re: Tomcat caching and deployment issues

2008-06-25 Thread Mark Thomas

Steven Probetts wrote:
You say that restarting tomcat will tell tomcat that the context.xml file has 
changed. But does it clean out the cache. My understanding is that TC uses the 
work dir as its work area

when running a war file in unpacked form.
i am wondering if a TC restart tells TC that the context file has changed, but 
only changes the files in work that have changed, and leaves the others alone.

On the other hand, an undeploy and redeploy does clean out ALL the files.


A reload will not clean out the work dir but providing the timestamps on 
your files are correct (ie newer files have later timestamps and nothing 
has a timestamp in the future) then that shouldn't be a problem.


Mark



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat caching and deployment issues

2008-06-24 Thread Johnny Kewl


- Original Message - 
From: Johnny Kewl [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, June 24, 2008 4:21 PM
Subject: Re: Tomcat caching and deployment issues



 - Original Message - 
 From: Steven Probetts

 To: users@tomcat.apache.org
 Sent: Tuesday, June 24, 2008 10:58 AM
 Subject: Tomcat caching and deployment issues


 Hi all,

 I am running Tomcat 5.5.25 on MACOSX Server.
 I seem to be having a problem with what seems to be caching through
 deployments.

 I deploy a newer version of my application (which uses Icefaces) or
 make a change in the database and what appears to happen is that the
 changes don't take effect until after i stop and restart the tomcat
 instance. (I do this via launchd load and unload commands).

 Resetting the browser caches doesn't seem to solve the problem, only
 restarting tomcat.

 My web app uses iceFaces (a plug in to JSF which I believe icefaces is
 written in javascript).

 I also have a suspicion that Tomcat was copied (or at least the
 directories such as conf, temp, work and all the others) from another
 machineif this helps. A single binary of Tomcat is stored
 elsewhere in the file system which (/opt/tomcat/).

 Also we don't use the webapps directory. We put the war file into a
 specially created wars dir and point to it from the context file (we
 do this so that we can have one war file serve multiple sites, each
 site having a different context file.). The native tomcat that
 apparently comes with MACOSX server wasn't used, I'm not sure why.
 The directory structure looks like:
 /opt/tomcat/wars stores our war files These are pointed to from each
 site's (instance's) context file
 /opt/tomcat/instances/site-name1/ contains the conf, webapps (not
 used), logs etc

 Running version.sh returns:

 Using CATALINA_BASE:   /opt/tomcat
 Using CATALINA_HOME:   /opt/tomcat
 Using CATALINA_TMPDIR: /opt/tomcat/temp
 Using JRE_HOME:   /System/Library/Frameworks/JavaVM.framework/
 Versions/1.5/Home
 Server version: Apache Tomcat/5.5.25
 Server built:   Aug 24 2007 05:33:50
 Server number:  5.5.25.0
 OS Name:Mac OS X
 OS Version: 10.5.3
 Architecture:   i386
 JVM Version:1.5.0_13-b05-237
 JVM Vendor: Apple Inc.

 Any help would be appreciated. I'm fairly new to Tomcat, iceFaces etc
 so I'm not sure what caches where etc.

Steve... if you want to redeploy an unpacked webapp, outside of TC, because 
I dont thing auto detection of a WAR will work, you have to also run this


http://TheTC:8080/manager/deploy?config=file://path/to/context.xmlpath=/TheContextWanted

and that context needs to have the correct docPath etc...

Your successor was probably up to something like that... and probably 
because they trying to share static content or file uploads or something...


The rest you on your own, it looks like they also have Mac bundles sharing a 
common TC binary... and inside those things one can make a whole virtual 
machine.


So what they maybe up to is sharing static stuff... TC will detect a new 
html file and images and JSP changes without a full redeploy.
So one TC uploads, the others can see it... probably something like that, 
but TC will have to be told when you doing a full redeploy.


If they not sharing... then take the whole thing back to webapps, and even 
think about load sharing with Apache, because then that will hold the static 
content in one place and you have three TC's with one URL address... if they 
sharing the same content on 3 TC's with no load sharing, then URI cant be 
the same now.


Ok now done guessing ;) something like that must be happening... good luck 
with your take over job ;)


---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



deployment issues

2007-07-06 Thread Fatima
Hi

I am new to web services, I am trying to deploy a service named
HelloWorld. The service is uploaded without any problems but when i
click on the service, it gives me

This XML file does not appear to have any style information associated
with it...

What am i doing wrong?

thanks





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: deployment issues

2007-07-06 Thread Hassan Schroeder

On 7/6/07, Fatima [EMAIL PROTECTED] wrote:


What am i doing wrong?


http://www.catb.org/~esr/faqs/smart-questions.html

--
Hassan Schroeder  [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: deployment issues

2007-07-06 Thread Fatima
Thanks that is really helpful

On Fri, 2007-07-06 at 06:45 -0700, Hassan Schroeder wrote:
 On 7/6/07, Fatima [EMAIL PROTECTED] wrote:
 
  What am i doing wrong?
 
 http://www.catb.org/~esr/faqs/smart-questions.html
 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Deployment issues

2007-06-13 Thread Sumit Gupta
Hi,
 
We have multiple applicaitons running on tomcat (24 x 7).
 
Sometimes, the appications gets undeployed automaticaly without any changes. 
Can you please let me know the reason?
 
Also, at times some applications does not work and we need to restart the 
Tomcat server to run those applications. Any idea why this happens?
 
Please help me out on these issues.
 
Thanks,
Sumit



 

Need Mail bonding?
Go to the Yahoo! Mail QA for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=listsid=396546091