Focal Point
tomcat 6.0

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5891084492

August 06, 2008, 09:35 AM
susannah
tomcat 6.0
tomcat 6.0 is, what we call in the South, a hot mess.

-*--------
revised opinion; tcat6 is wicked cool
-*--------

for one, there doesn't even seem to be an admin tool to download, even tho the same old error message exists when you try to go to
http://servername:port/admin.

and..we can't find any place that points to a .war file (so we could change it to point to the explodes)
and...it seems to make a copy of your ibi_html and we can't figure out if its caching, or what.
So customizing the mre interface is pretty much out. and when you have 5 servers, you really need to keep them straight with customized branding.
CSS is perplexed, as well.
Does anyone have any experience with 6.0 they'ld like to share?

This message has been edited. Last edited by: susannah,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 07, 2008, 11:44 PM
StuBouyer
Suzannah,

Not sure if it's much help, but Tomcat6 default install comes with a Manager rather than Admin - not sure why they dropped the Admin and whether you can get it as an optional extra.

I haven't used Tomcat 6 for WebFOCUS, but the $CATALINA_BASE/conf/[enginename]/[hostname] folder is still used for deploying applications via a .xml file (At least it does on Gentoo Linux)

The Tomcat 6 documentation gives 5 ways to deploy an application.

1. Copy unpacked directory hierarchy into a subdirectory in directory $CATALINA_BASE/webapps/

2. Copy the web application archive file into directory $CATALINA_BASE/webapps/

3. Use the Tomcat 6 "Manager" web application to deploy and undeploy web applications.

4. Use "Manager" Ant Tasks In Your Build Script.

5. Use the Tomcat Deployer.

From my very limited experience the Tomcat manager creates the app.xml file in $CATALINA_BASE/conf/jakarta/localhost - at least on my machine.

Hope that is of some help.

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
August 08, 2008, 06:55 AM
susannah
stu, they dropped admin in 5.5 but it was still available as an extra downlaod. 6 says the same down load mesasge (which i now suspect is just leftover code) and doesn't offer it at all.
#1 The 'unpacked directory heirarchy' is indeed unpacked into $CATALINA_BASE/webapps..
i dont' know what #2 is..we found an xml file to search, but it didn't have anything like
'webfocus76.war' in it, which is what we were looking for...to change it to 'webfocus76';
CSS/NY told me they were cache files...and that editing them wouldn't do any good. Should i try making my edits there??




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 11, 2008, 11:30 PM
StuBouyer
Susannah,

Sorry for the delay in replying, but I wanted to check that what I was telling you was actually correct and also worked for WebFOCUS.

With Tomcat 6.0.18 - the version I tested with - I could create Tomcat contexts (aliases) using the following procedures:

1) Using the Manager application, Deploy tool, set Context Path: /ibi_apps, WAR or Directory URL: /home/wfadmin/ibi/WebFOCUS76/Webapps/webfocus76
This creates the context and copies the above directory to $CATALINA_BASE/webapps/ibi_apps. Any change made to files in /home/wfadmin/ibi/WebFOCUS76/Webapps/webfocus76 is not seen unless the application is redeployed - kinda silly if you ask me

2) Manually copy the directory /home/wfadmin/ibi/WebFOCUS76/Webapps/webfocus76 to $CATALINA_BASE/webapps/ and rename it to ibi_apps. Same end result as 1), you end up with a copy of the webapp.

3) Copy webfocus76.war to $CATALINA_BASE/webapps/ (good idea to rename is to ibi_apps.war prior to copying) this is automatically unpacked to a directory called webfocus76 (or ibi_apps if you renamed). So once again we get a copy of the webapp in 2 places.

4) Create an XML file called ibi_apps.xml in $CATALINA_BASE/conf/Catalina/localhost (create the directories Catalina and localhost if they don't exist). The XML file has the following syntax:



This gives the result I believe you are aiming for. The context exists and there isn't an extra copy created so any edits to files in /home/wfadmin/ibi/WebFOCUS76/Webapps/webfocus76 are seen immediately (or after the application is reloaded).

With regards to the "cache" files that CSS/NY mentioned, I believe they were referring to $CATALINA_BASE/work/Catalina/localhost/ where Tomcat stores the cached copies of the compiled javascripts and java programs.

I hope this helps

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
August 12, 2008, 03:15 AM
GamP
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="/home/wfadmin/ibi/WebFOCUS76/Webapps/webfocus76" path="/ibi_apps">
</Context>

Is what the contents of the xml file should be. Stu forgot to put it in between CODE brackets ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
August 12, 2008, 11:15 AM
susannah
bless you both...
so,
1,2,3) I have the dir $CATALINA_BASE/webapps/ibi_apps/
and its populated with all its belongings.
Are you saying that Tomcat uses these files actually? ... meaning if i made my edits to these files directly, that i should see the edits right away? (or do i need to recycle?)
4) that dir does not exist $CATALINA_BASE/conf/Catalina/localhost
and i see that you say go ahead and create it...
Are you saying that if i create that dir, and plop in that xml file, that tomcat will now use the unexploded files on the server and no longer use the $CATALINA_BASE/webapps/ibi_apps/ files?

5) yes the /work/Catalina/locahost is the only place where i see the /Catalina directory at all, and i see where that must be the cache as css says. thanks.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 12, 2008, 11:21 AM
susannah
quote:
<Context docBase="/home/wfadmin/ibi/WebFOCUS76/Webapps/webfocus76" path="/ibi_apps">


Gamp, is that docBase meant to be the absolute root on your unix box?

This message has been edited. Last edited by: susannah,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 12, 2008, 11:37 AM
<JG>
Susannah Tomcat 6 does not create the directory $CATALINA_BASE/conf/Catalina/localhost
by default but if you create it manually then everything should work as in previous releases.

I would not make changes directly in the deployed webapp folder as they will be lost if you have a
problem with Tomcat and the webapp folder is recreated.

Rather change them in the actual WebFocus folder and deploy the folder as indicated by stu.

When you deploy the folder and need to load changes to ibi_apps. Stop Tomcat, delete the ibi_apps folder
under the work \work\Catalina\localhost directory and restart tomcat, (same applies for rcaster)

If you have already deployed ibi_apps and it is under the webapp folder delete it as well or you may have major conflicts
August 12, 2008, 12:33 PM
susannah
reading my mind...
I'm having fun now!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 12, 2008, 01:10 PM
susannah
recycling tomcat didn't clear the cache
putting the ibi_apps.xml file in the newly created catalina/localhost/ directory crashed everything, tomcat couldn't find any page to present.
i restored the mr-login.jsp(s), recycled and i'm back where i started.
hmmm.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 12, 2008, 09:23 PM
StuBouyer
quote:
Originally posted by susannah:
bless you both...
so,
1,2,3) I have the dir $CATALINA_BASE/webapps/ibi_apps/
and its populated with all its belongings.
Are you saying that Tomcat uses these files actually? ... meaning if i made my edits to these files directly, that i should see the edits right away? (or do i need to recycle?)


Yes, if files are in $CATALINA_BASE/webapps/ibi_apps/, then Tomcat uses these files. Whether or not the changes will be seen without a recycle depends on the actual file. It seems that WebFOCUS caches certain values at start up and editing these values make a difference until Tomcat (or the app) is recycled. Changes to JSP pages should however be seen straight away.

quote:
4) that dir does not exist $CATALINA_BASE/conf/Catalina/localhost
and i see that you say go ahead and create it...
Are you saying that if i create that dir, and plop in that xml file, that tomcat will now use the unexploded files on the server and no longer use the $CATALINA_BASE/webapps/ibi_apps/ files?


Yep, but make sure that you remove the ibi_apps folder out of $CATALINA_BASE/webapps - it seems that this takes precedence over the XML files values. Also depending on your Tomcat installation you may have to change Catalina to Jakarta (I've only seen this once) but if you match the directories under $CATALINA_BASE/work/ you should be fine

quote:
recycling tomcat didn't clear the cache
putting the ibi_apps.xml file in the newly created catalina/localhost/ directory crashed everything, tomcat couldn't find any page to present.
i restored the mr-login.jsp(s), recycled and i'm back where i started.
hmmm.


Did you create catalina/localhost/ or Catalina/localhost/? The case is important in Unix - not sure about Windows - also make sure that $CATALINA_BASE/webapps/ doesn't contain the same named folder. Does the Tomcat logs show anything useful in deciphering the reason for the crash?

The cache files are not cleared at recycling, they are only updated when a new version of a page or script is added and even then I've seen issues with Tomcat not recompiling the new version. I usually delete this manually when I'm making updates, slows down the app for the first few people a tad, but they usually don't notice.

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
August 12, 2008, 09:45 PM
susannah
ah
delete manually
how would i do that?
Can i just nuke files in that work dir? without the world coming to a halt?

Yep "Catalina/localhost" and there was no other dir of that name...
i made sure to 755 my script..
here's my script..ibi_apps.xml

<?xml version='1.0' encoding='utf-8'?>
<Context docBase="/data/eda/prod765/ibi/WebFOCUS76/Webapps/webfocus76" path="/ibi_apps">
</Context>


holy cow batman...i just saw a typo..its webapps not Webapps.
i'm trying again...

This message has been edited. Last edited by: susannah,




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 12, 2008, 09:52 PM
susannah
rats
recycled tomcat.
didn't change anything; didn't crash tho Smiler
Stu, tell me if its safe to just nuke files in that /work/ and i'll nuke whats in /work/login/.
thanks.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 12, 2008, 11:12 PM
StuBouyer
Susannah,

Perfectly safe to nuke the everything under /work/ - keep work though, and I generally try to do it while Tomcat is down, but I have done it a few times while Tomcat was running without any noticeable problems - !!!YMMV!!!

Just got off the phone iwth a client that is trying to do the same thing with Tomcat 5.5 on Debian Linux and adding the XML file also doesn't work for them. Might be a Tomcat config issue but at repsent I'm not sure what needs to be changed. As soon as I find out I'll post back.

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
August 13, 2008, 07:55 AM
susannah
cool. i'll nuke.
YMMV !!! that was a new one...i love it!!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 13, 2008, 08:17 AM
susannah
Stu
IT WORKED!
the ibi_apps.xml has no effect at all
its the 1)stopping tcat,
2) nuking the /work/
3) makeing the edits in the source and copying them to the tomcat conf
4)restarting tcat
that worked.
thank you thank you thank you.
Major mischief is about to be committed.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 13, 2008, 09:42 PM
susannah
guess what.
recycling tomcat isn't necessary
just nukeing the /work/.../login/
content is all that matters.
Oh this is waaaaay too much fun!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 13, 2008, 11:20 PM
StuBouyer
Susannah,

Glad you are having fun!
I got one machine to work with the ibi_app.xml - my dyslexic fingers had typoed the dcBase. Once that was fixed the context appeared, but on their Dev box we haven't been able to get it to work. As far as I can see the tomcat config is the same for both boxes (apart from some minor path differences) but the ibi_app.xml does nothing Frowner

If I work out what the problem was and get it to work I'll let you know.

Keep up the mischief

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
August 14, 2008, 09:57 AM
susannah
quote:
got one machine to work with the ibi_app.xml -

stu
you mean ibi_app.xml or ibi_apps.xml ??




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
August 14, 2008, 12:44 PM
hammo1j
A couple of questions Susannah for you if you wouldn't mind:

1. Why are you going 6.0 when 5.5 is the recommended release?

2. Is there any memory usage/stability benefit in going to 6.0? We find 5.5 quite memory hungry. Would 6 make a big difference.

3. Do you know if the next rel of wf is going to recommend 6?

Best regards and thanks!

John


Thanks



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
August 14, 2008, 08:55 PM
StuBouyer
quote:
Originally posted by susannah:
stu
you mean ibi_app.xml or ibi_apps.xml ??


See what I mean about dyslexic fingers

Cheers

Stu


WebFOCUS 8.2.03 (8.2.06 in testing)
August 15, 2008, 07:43 AM
susannah
hi john
1) not my choice, the unix gods [sic] put 6.0 on.
and then turned around and put 5.5 on our new production server. go figure. but then consider the source.
2) don't know yet
3) shoot, i don't even know where summit is gonna be next year Wink
but i really like 6. the manager screen is very feature-rich vs 5.5.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID