Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

This weeks giveaway

 
Kyle Willkomm
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh Heck, there are other large replies here...
Covalent FastStart 3.1 freshly installed
----------------------------------------
./covalent/servers/server-name/conf/httpsd.conf
1)
modify prefork.c tag to be
<IfModule prefork.c>
StartServers 5
MinSpareServers 55
#MinSpareServers 5
MaxSpareServers 250
#MaxSpareServers 10
MaxClients 256
#MaxClients 150
MaxRequestsPerChild 0
</IfModule>

2)
change Apache http request port if needed
Listen 8080
3)
modify Document Root and add matching <Directory> tag with location of ui install
DocumentRoot "/home/willkok/lnie"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/home/willkok/lnie">
</Directory>
4)
to <IfModule mod_jk.c> add these tags with the UI location
#Mount lnie
JkMount /lnie/*.jsp loadbalancer
JkMount /lnie/* loadbalancer
#
# The following line makes apache aware of the location of the /lnie context
#
Alias /lnie /home/willkok/covalent/lnie
<Directory "/home/willkok/covalent/lnie">
<IfModule covalent_usertrack.c>
EnableLocationTracking off
</IfModule>
</Directory>
#
# The following line prohibits users from directly accessing WEB-INF
#
<Directory "/home/willkok/covalent/lnie/WEB-INF/">
AllowOverride None
deny from all
</Directory>
in ./covalent/servers/server-name/conf/workers.properties
1)
change workers.list line to
worker.list=tomcat1,tomcat2,tomcat3,loadbalancer
2)
remove all worker.ajp13 lines
3)
add the following modifying ports as needed
worker.tomcat1.port=8019
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
worker.tomcat1.lbfactor=1
worker.tomcat2.port=8029
worker.tomcat2.host=localhost
worker.tomcat2.type=ajp13
worker.tomcat2.lbfactor=1
worker.tomcat3.port=8009
worker.tomcat3.host=localhost
worker.tomcat3.type=ajp13
worker.tomcat3.lbfactor=1
4)
uncomment this line
worker.loadbalancer.type=lb
5)
replace worker.loadbalancer line with
worker.loadbalancer.balanced_workers=tomcat1,tomcat2,tomcat3
copy ./covalent/servers/server-name/conf/server.xml to
./covalent/servers/server-name/conf/server1.xml
./covalent/servers/server-name/conf/server2.xml
./covalent/servers/server-name/conf/server3.xml
1)
in server1.xml modify the shutdown port setting to an open port
<Server port="8015" shutdown="SHUTDOWN" debug="0">
2)
modify the running port setting for an open port
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8019" minProcessors="15" maxProcessors="1500"
acceptCount="50" debug="0"/>

3)
add a jvmRoute to the engine tag
<Engine jvmRoute="tomcat1" name="Standalone" defaultHost="localhost" debug="0">

4)
add a context tag for the ui code location below the examples context tag
<Context path="/lnie" docBase="/home/willkok/lnie" />

5)
repeat steps for server2.xml and server3.xml changing port numbers to other values
and the jvmPath to "tomcat2" and "tomcat3" respectivly

copy ./covalent/servers/server-name/bin/tomcat_startup.sh to
./covalent/servers/server-name/bin/tomcat_startup1.sh
./covalent/servers/server-name/bin/tomcat_startup2.sh
./covalent/servers/server-name/bin/tomcat_startup3.sh

1)
in tomcat_startup1.sh
a. Replace all occurences of server.xml with server1.xml
b. Replace all occurences of jvm.stdout with jvm1.stdout
c. Replace all occurences of tomcat.pid with tomcat1.pid
2)
do the same for tomcat_startup2.sh and tomcat_startup3.sh
to start apache and tomcat's
./covalent/servers/server-name/bin/apache_startup.sh start
./covalent/servers/server-name/bin/tomcat_startup1.sh start
./covalent/servers/server-name/bin/tomcat_startup2.sh start
./covalent/servers/server-name/bin/tomcat_startup3.sh start
stop to stop
 
Mani Venkatesan
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this book about servlet applications or does it discuss the internal details of Apache implementation?
 
David Yutzy
tumbleweed and gunslinger
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've used Tomcat and Resin for quite some time and find it distressing that I have to restart Tomcat every time I change a class.
Is there a way around this so that Tomcat automatically compiles and/or reloads the class (liek Resin) when it detects a change?
I've read about a "reload" attribute and find that it does pickup the change, however, when you hit a servlet/JSP file that hits the changed code, Tomcat dies.
Am I missing something in the configuration?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kyle Willkomm:
Oh Heck, there are other large replies here...

Thanks a lot Willkomm, I would like to give a try soon.
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Roger Garner:
Will this book teach an idiot like me or is there some expected expertice needed?

yes it should but it would be easier if you know a bit about java.
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by subrav:
Is this book about servlet applications or does it discuss the internal details of Apache implementation?

its not about servlet apps and it only discusses the internals of apache in architectural detail so long as this helps you to administrate the server - the book is primarily about administrating tomcat
 
Bruce Jin
Ranch Hand
Posts: 672
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've read about a "reload" attribute and find that it does pickup the change, however, when you hit a servlet/JSP file that hits the changed code, Tomcat dies.

Sometimes Tomcat dies when it sees bad server.xml.
Try this:
<Context path="/report" docBase="c:\mrc\webapps\report" debug="0"
reloadable="true" />
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the most annoying things about servlet development is that it is very time consuming.
Stop server, modify class file, run ant, start server.
One thing I noticed is that if you do not follow the dtd in web.xml, you will get "resource unavailable sc404 from TC." I am getting more comfortable with web.xml, so I can spot my error quickly, but still, it would be nice to have an error for this, such as a SAXParseException pointing to the line number in web.xml, displayed right in the browser.
Is there a way to find those errors through logging?
How can I use logging to streamline the development process?
Garrett
 
Vivek Chopra
Author
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reloadable attribute is very useful while developing application. In a production environment, you would want to turn it off as it has a performance hit.
- Vivek

Originally posted by Bruce Jin:

Sometimes Tomcat dies when it sees bad server.xml.
Try this:
<Context path="/report" docBase="c:\mrc\webapps\report" debug="0"
reloadable="true" />
 
Vivek Chopra
Author
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with you- and apparently so did the Tomcat 4.1 developers! The manager application in Tomcat 4.1 allows manager commands to be run from an ant script.
You can now use ant to build, install and then reload a web application. This allows for a very integrated develop-deploy-test cycle and is discussed in some length in the book. See the "Managing Applications with Ant" section in the sample chapter.
http://www.wrox.com/books/sample-chapters/SampleChapter_1861007736.pdf
The uses of ant in conjuntion with Tomcat is discussed in more detail in a later chapter in the book.
- Vivek
Originally posted by Garrett Smith:
One of the most annoying things about servlet development is that it is very time consuming.
Stop server, modify class file, run ant, start server.

Garrett
 
Ram Balasubramaniam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Have any one of you tried the connection pooling in Tomcat 4.1.12 and Oracle 8.1.7. I followed the JNDI How to tutorial in the Jakarta Apache site.
I am getting Unable to load driver ' null '
error .
Can any one suggest me any tips.
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

[ October 31, 2002: Message edited by: Garrett Smith ]
 
Doug Wang
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am wondering how Tomcat would support Web services development?
 
Sanjay Jadhav
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomacat 4.0.1 does not handle the combination of FORM-base authentication and a constraint
on the HTTP POST method for a resource correctly. It authenticates the user as expected but
call the doGet() method on the resource instead of doPost()
i.e. if you use the FORM-base auhentication and submit the FORM Tomcat calls doGet() method
This combination works well in the Weblogic Application Server.
I want to know more about this and how could this differences about security
i get the reply like call doPost from doGet it just like hook and crook.
van i adjust in configeration some way which we slove this prob or tell some other way.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Doug Wang:
Hi all,
I am wondering how Tomcat would support Web services development?

Web Services!. Apache provides implementation of SOAP through AXIS.
Axis can be easily configured to Tomcat by just adding a axis folder to tomcat webapps, for more information please visit http://xml.apache.org/axis/index.html
Regards
Balaji
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic