You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Maureen Fisher <mf...@cornell.edu> on 2000/07/18 19:34:17 UTC

multiple jvm's?

is it possible to load multiple jvm's under 1 instance of tomcat? The faq contradicts itself.
========================================================
Maureen Fisher, CIT/ASDT, Cornell University
Ithaca, NY 14850
mf12@cornell.edu
http://mo.cit.cornell.edu/
Ad astra per aspera


Re: multiple jvm's? followup

Posted by Tim Kientzle <ki...@acm.org>.
Maureen Fisher wrote:
> My question is how to get these guys using different versions
> of the jdk? Currently they both use the same tomcat.conf file.
> How would I do it if I wanted one mount to use 1.1.8 and the
> other to use 1.2?

tomcat.conf does not specify which JVM you're using, the startup script
does.
Just create two startup scripts, one for each JVM.

				- Tim

Re: setProperty and arrays

Posted by Matt Goss <mg...@rtci.com>.
Bob,
If there is going to be different (not related) data in each textfield, then
you should name each textfield differently. If you are using a Bean to store
the data when processed (ie the setProperty method) it works much better if
each textfield on the form has a unique name. In fact, on JSP's, you can use
introspection to do that for you. All you have to do is name the textfields the
same name as the property name in the Bean. Then after your <JSP:UseBean> tag
you put a <jsp:setProperty name="BeanName" property="*"/> tag. That will tell
the page to dump the data from all form fields whose name corresponds to the
name of the properties in the bean into those properties.
Hope this helps,
Matt Goss,

Bob Byron wrote:

> I am developing a form that dynamically generates a number of rows.  These
> rows contain inputs.  I was wondering how to utilize the setProperty method
> to post my data?  As an example:
> (The table rows would be generated by a loop)
> <form>
>   <table>
>     <tr><td><input type="text" id="somename"></td></tr>
>     <tr><td><input type="text" id="somename"></td></tr>
>     <tr><td><input type="text" id="somename"></td></tr>
>     <tr><td><input type="text" id="somename"></td></tr>
>     <tr><td><input type="text" id="somename"></td></tr>
>   </table>
> </form>
>
> So, how do I best process "somename"?  Will my setSomename method be called
> once for each input?  Should I make the names more unique like
> "somename_001", "somename_002", "somename_003", etc.  Any advice on your
> techniques would be appreciated.
>
> Thank You,
> Bob Byron
> RAD Systems, Inc.
> www.radit.com
> (972)516-4256

Re: setProperty and arrays

Posted by Mike Lazlo <ml...@ndc-nfi.com>.
This article may help,
http://www.javaworld.com/javaworld/jw-03-2000/jw-0331-ssj-forms_p.html


Bob Byron wrote:

> I am developing a form that dynamically generates a number of rows.  These
> rows contain inputs.  I was wondering how to utilize the setProperty method
> to post my data?  As an example:
> (The table rows would be generated by a loop)
> <form>
>   <table>
>     <tr><td><input type="text" id="somename"></td></tr>
>     <tr><td><input type="text" id="somename"></td></tr>
>     <tr><td><input type="text" id="somename"></td></tr>
>     <tr><td><input type="text" id="somename"></td></tr>
>     <tr><td><input type="text" id="somename"></td></tr>
>   </table>
> </form>
>
> So, how do I best process "somename"?  Will my setSomename method be called
> once for each input?  Should I make the names more unique like
> "somename_001", "somename_002", "somename_003", etc.  Any advice on your
> techniques would be appreciated.
>
> Thank You,
> Bob Byron
> RAD Systems, Inc.
> www.radit.com
> (972)516-4256

--
\\\\\\\\\\\\\\\\\\\\\\\\\\\\
/        Mike Lazlo        /
\  Technical Manager/DBA   \
/    mlazlo@ndc-nfi.com    /
\ 1-800-922-5088 ext. 4758 \
////////////////////////////


setProperty and arrays

Posted by Bob Byron <bb...@radit.com>.
I am developing a form that dynamically generates a number of rows.  These
rows contain inputs.  I was wondering how to utilize the setProperty method
to post my data?  As an example:
(The table rows would be generated by a loop)
<form>
  <table>
    <tr><td><input type="text" id="somename"></td></tr>
    <tr><td><input type="text" id="somename"></td></tr>
    <tr><td><input type="text" id="somename"></td></tr>
    <tr><td><input type="text" id="somename"></td></tr>
    <tr><td><input type="text" id="somename"></td></tr>
  </table>
</form>

So, how do I best process "somename"?  Will my setSomename method be called
once for each input?  Should I make the names more unique like
"somename_001", "somename_002", "somename_003", etc.  Any advice on your
techniques would be appreciated.

Thank You,
Bob Byron
RAD Systems, Inc.
www.radit.com
(972)516-4256



RE: multiple jvm's? followup

Posted by "Rob S." <rs...@home.com>.
Hi again Trig =)

> Ihave a question setting up two separate environments.  In the tomcat.conf
> file where you specify the 2 diferent mount points, what exactly is the
> mount point?  Is it the root for tomcat or the htdoc root or the each
> respective environments root?   Basically what do we need to put here in
> tomcat.conf:
>
> # Mounting the first context demo3
> ApJServMount /???? ajpv12://localhost:8021/????
>
> # Mounting the second context demo2
> #ApJServMount /?? ajpv12://localhost:8015/??
> </IfModule>

An example:

In server.xml...
<Context path="/myApp" docBase="/path/to/root" debug="0" reloadable="true"
/>

In httpd.conf...
ApJServMount /trigsApp ajpv12://localhost:8007/myApp

Means "for all requests under /trigsApp, give them to the Tomcat context
/myApp."

So http://trigsServer/trigsApp/index.jsp will secretly map to
http://trigsServer/path/to/root/index.jsp.

Hope this helps!

- r


RE: multiple jvm's? followup

Posted by Trig Gullberg <tr...@partnet.com>.
Ihave a question setting up two separate environments.  In the tomcat.conf
file where you specify the 2 diferent mount points, what exactly is the
mount point?  Is it the root for tomcat or the htdoc root or the each
respective environments root?   Basically what do we need to put here in
tomcat.conf:

# Mounting the first context demo3
ApJServMount /???? ajpv12://localhost:8021/????

# Mounting the second context demo2
#ApJServMount /?? ajpv12://localhost:8015/??
</IfModule>

- Trig Gullberg -
- PartNet - Consulting Engineer  -
- 615 Arapeen Dr, Suite 204
  Salt Lake City, UT  84108  -
- Phone 801-736-9734 -
- Fax 801-581-1785 -
- trig.gullberg@part.net  -


-----Original Message-----
From: Maureen Fisher [mailto:mf12@cornell.edu]
Sent: Wednesday, July 19, 2000 10:38 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: multiple jvm's? followup


Just wanted to share with everyone what I did, and pose a question.
My goal was to setup 2 separate environments, (one for test that had to be
stable and one for test where stability didn't matter).
There was no mention of this in the online FAQ, but I did find some info in
the uguide.html.
Basically in the tomcat.conf, set up 2 mount points with different ports.
Then create 2 server.xml files, each defining their own contexts.
Then startup.bat -f <path to first server.xml file> and startup.bat -f <path
to other server.xml file>

This works very well.

My question is how to get these guys using different versions of the jdk?
Currently they both use the same tomcat.conf file. How would I do it if I
wanted one mount to use 1.1.8 and the other to use 1.2?


At 11:32 AM 07/18/2000 -0700, Tim Kientzle wrote:
>Maureen Fisher wrote:
> > Is it possible to load multiple jvm's under 1 instance of tomcat?
>
>Tomcat is a Java program, it runs inside of a JVM.
>To have multiple JVMs, you must have multiple instances
>of Tomcat.  (1 running in each JVM.)
>
>Tomcat can be used with many different JVMs, and
>you can have configurations in which you run multiple
>JVMs (multiple Tomcat instances) either to provide
>security (isolating servlets from one another) or
>to distribute load across multiple machines.
>
>                         - Tim Kientzle

========================================================
Maureen Fisher, CIT/ASDT, Cornell University
Ithaca, NY 14850
mf12@cornell.edu
http://mo.cit.cornell.edu/
Ad astra per aspera


Re: multiple jvm's? followup

Posted by Maureen Fisher <mf...@cornell.edu>.
Just wanted to share with everyone what I did, and pose a question.
My goal was to setup 2 separate environments, (one for test that had to be stable and one for test where stability didn't matter).
There was no mention of this in the online FAQ, but I did find some info in the uguide.html.
Basically in the tomcat.conf, set up 2 mount points with different ports. Then create 2 server.xml files, each defining their own contexts.
Then startup.bat -f <path to first server.xml file> and startup.bat -f <path to other server.xml file>

This works very well.

My question is how to get these guys using different versions of the jdk? Currently they both use the same tomcat.conf file. How would I do it if I wanted one mount to use 1.1.8 and the other to use 1.2?


At 11:32 AM 07/18/2000 -0700, Tim Kientzle wrote:
>Maureen Fisher wrote:
> > Is it possible to load multiple jvm's under 1 instance of tomcat?
>
>Tomcat is a Java program, it runs inside of a JVM.
>To have multiple JVMs, you must have multiple instances
>of Tomcat.  (1 running in each JVM.)
>
>Tomcat can be used with many different JVMs, and
>you can have configurations in which you run multiple
>JVMs (multiple Tomcat instances) either to provide
>security (isolating servlets from one another) or
>to distribute load across multiple machines.
>
>                         - Tim Kientzle 

========================================================
Maureen Fisher, CIT/ASDT, Cornell University
Ithaca, NY 14850
mf12@cornell.edu
http://mo.cit.cornell.edu/
Ad astra per aspera


Re: multiple jvm's?

Posted by Tim Kientzle <ki...@acm.org>.
Maureen Fisher wrote:
> Is it possible to load multiple jvm's under 1 instance of tomcat?

Tomcat is a Java program, it runs inside of a JVM.
To have multiple JVMs, you must have multiple instances
of Tomcat.  (1 running in each JVM.)

Tomcat can be used with many different JVMs, and
you can have configurations in which you run multiple
JVMs (multiple Tomcat instances) either to provide
security (isolating servlets from one another) or
to distribute load across multiple machines.

			- Tim Kientzle