Re: Virtual Hosting and SSL

2005-10-11 Thread Justin Jaynes
Strike that--I just found that documentation after
looking the hundredth time.  I guess we overlook what
we didn't know before, assuming it isn't what we
wanted to find--or something strange like that.

But I found it.  Thanks everyone.

Justin

--- Justin Jaynes <[EMAIL PROTECTED]>
wrote:

> I'll try... thanks so much for such a fast reply. 
> Is
> there any document about that feature on the tomcat
> apache site?
> 
> Justin
> 
> --- David Smith <[EMAIL PROTECTED]> wrote:
> 
> > Try address="192.168.56.32" or whatever IP you
> want
> > tomcat to bind to. 
> > The port attribute will do the same thing for
> > defining what port number
> > to bind to.
> > 
> > --David
> > 
> > Justin Jaynes wrote:
> > 
> > >I DID try, but there is no IP address attribute
> for
> > >connector elements. .. at least not in the
> > >documentation listed on the 5.5 documentation /
> > >configuration setup.
> > >
> > >How would I do it?  Can you please indicate the
> > >syntax?
> > >
> > >Thanks, Justin
> > >
> > >--- Hassan Schroeder <[EMAIL PROTECTED]>
> wrote:
> > >
> > >  
> > >
> > >>Justin Jaynes wrote:
> > >>
> > >>
> > >>>I am running tomcat 5.5.12 and need to host two
> > >>>  
> > >>>
> > >>sites,
> > >>
> > >>
> > >>>both with ssl.  
> > >>>  
> > >>>
> > >>>Can you set up two connectors (one port 443 and
> > >>>  
> > >>>
> > >>one
> > >>
> > >>
> > >>>port 80) for one specific ip address and
> another
> > >>>  
> > >>>
> > >>set
> > >>
> > >>
> > >>>of connectors for another ip address? 
> > >>>  
> > >>>
> > >>Yes. :-)
> > >>
> > >>That's exactly what you need to do. Try it, ask
> if
> > >>you run into a
> > >>specific problem...
> > >>
> > >>-- 
> > >>Hassan Schroeder -
> > >>[EMAIL PROTECTED]
> > >>Webtuitive Design ===  (+1) 408-938-0567   ===
> > >>http://webtuitive.com
> > >>
> > >>  dream.  code.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> >
>
>-
> > >  
> > >
> > >>To unsubscribe, e-mail:
> > >>[EMAIL PROTECTED]
> > >>For additional commands, e-mail:
> > >>[EMAIL PROTECTED]
> > >>
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > >   
> > >   
> > >__ 
> > >Yahoo! Mail - PC Magazine Editors' Choice 2005 
> > >http://mail.yahoo.com
> > >
> >
>
>-
> > >To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > >For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > >
> > >  
> > >
> > 
> > 
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>   
> __ 
> Yahoo! Music Unlimited 
> Access over 1 million songs. Try it free.
> http://music.yahoo.com/unlimited/
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Hosting and SSL

2005-10-11 Thread Justin Jaynes
I'll try... thanks so much for such a fast reply.  Is
there any document about that feature on the tomcat
apache site?

Justin

--- David Smith <[EMAIL PROTECTED]> wrote:

> Try address="192.168.56.32" or whatever IP you want
> tomcat to bind to. 
> The port attribute will do the same thing for
> defining what port number
> to bind to.
> 
> --David
> 
> Justin Jaynes wrote:
> 
> >I DID try, but there is no IP address attribute for
> >connector elements. .. at least not in the
> >documentation listed on the 5.5 documentation /
> >configuration setup.
> >
> >How would I do it?  Can you please indicate the
> >syntax?
> >
> >Thanks, Justin
> >
> >--- Hassan Schroeder <[EMAIL PROTECTED]> wrote:
> >
> >  
> >
> >>Justin Jaynes wrote:
> >>
> >>
> >>>I am running tomcat 5.5.12 and need to host two
> >>>  
> >>>
> >>sites,
> >>
> >>
> >>>both with ssl.  
> >>>  
> >>>
> >>>Can you set up two connectors (one port 443 and
> >>>  
> >>>
> >>one
> >>
> >>
> >>>port 80) for one specific ip address and another
> >>>  
> >>>
> >>set
> >>
> >>
> >>>of connectors for another ip address? 
> >>>  
> >>>
> >>Yes. :-)
> >>
> >>That's exactly what you need to do. Try it, ask if
> >>you run into a
> >>specific problem...
> >>
> >>-- 
> >>Hassan Schroeder -
> >>[EMAIL PROTECTED]
> >>Webtuitive Design ===  (+1) 408-938-0567   ===
> >>http://webtuitive.com
> >>
> >>  dream.  code.
> >>
> >>
> >>
> >>
> >>
> >>
>
>-
> >  
> >
> >>To unsubscribe, e-mail:
> >>[EMAIL PROTECTED]
> >>For additional commands, e-mail:
> >>[EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >
> >
> >
> > 
> > 
> >__ 
> >Yahoo! Mail - PC Magazine Editors' Choice 2005 
> >http://mail.yahoo.com
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >  
> >
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Newbie seeking guidance

2005-10-11 Thread Justin Jaynes
John,

If you need help with setting up the environment I
described (and BOY could I have used help my first
time--mostly I tutored myself and failed and failed
before succeeding) you can ask me and I will know at
least where to point you for relevant information.  I
assume you have done your own building of software
packages from source like PostgreSQL, but if you
haven't, that alone can feel like a daunting
task--really, its quite simple.  Just email me
directly and I'll fill you in as much as I can.

Justin

--- John Geiger <[EMAIL PROTECTED]> wrote:

> Not at all, Justin. Thank you, thank you!
> 
> Also, thank you, Mark Eggers.
> 
> As I am so new to this, I run the risk of veering
> off-topic, which I realize
> is inappropriate. That said, I will get my newbie
> noggin back into the
> woodshed so that I may be true to this list.
> 
> Best wishes,
> John G.
> 
> 
> on 10/10/05 10:11 PM, Justin Jaynes at
> [EMAIL PROTECTED] wrote:
> 
> > Justin
> > --with more to say than you probably wanted to
> here
> 
> ***
> John Geiger
> Fox Parlor Design
> Pho 415-821-7100
> Fax 415-821-7102
> Cell 415-307-2554
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Virtual Hosting and SSL

2005-10-11 Thread Justin Jaynes
I DID try, but there is no IP address attribute for
connector elements. .. at least not in the
documentation listed on the 5.5 documentation /
configuration setup.

How would I do it?  Can you please indicate the
syntax?

Thanks, Justin

--- Hassan Schroeder <[EMAIL PROTECTED]> wrote:

> Justin Jaynes wrote:
> > I am running tomcat 5.5.12 and need to host two
> sites,
> > both with ssl.  
> 
> > Can you set up two connectors (one port 443 and
> one
> > port 80) for one specific ip address and another
> set
> > of connectors for another ip address? 
> 
> Yes. :-)
> 
> That's exactly what you need to do. Try it, ask if
> you run into a
> specific problem...
> 
> -- 
> Hassan Schroeder -
> [EMAIL PROTECTED]
> Webtuitive Design ===  (+1) 408-938-0567   ===
> http://webtuitive.com
> 
>   dream.  code.
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Virtual Hosting and SSL

2005-10-10 Thread Justin Jaynes
I am running tomcat 5.5.12 and need to host two sites,
both with ssl.  Obviously one SSL cert/keystore will
not do for two sites.  I understand that SSL is IP
based  because the http header is not read until after
the connection is established.

I know you can configure tomcat to do virtual hosting
based on IP's by adding IPVHost="true" to connectors
in server.xml file.  but you have to specify the
keystore a connector will use PER the connector--NOT
THE HOST.  So even though I can distinguish between IP
addresses, it is too late already.  The connector has
already opened the keystore--without understanding
which IP address the request has come from.

Can you set up two connectors (one port 443 and one
port 80) for one specific ip address and another set
of connectors for another ip address?  This seems to
me (and I am sometimes wrong) the logical way tomcat
should work.  What good is virtual hosting capability
based on IP's if you can't use SSL in conjunction with
them?  Everybody needs some SSL these days for
something or other.

Can you tell jsvc to make the daemon listen only on
one ip address when you start it, and simply start two
dameons listening to different IP's (which would mean
two servers running on my machine, and NOT the
scenario I would prefer)?

I hope some very seasoned pserson can help me.  This
list has never failed me yet and I have been asking
questions for over a year.

Mad-Props to all of you!  Thanks for everything.

Justin






__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Newbie seeking guidance

2005-10-10 Thread Justin Jaynes
I would HIGHLY recommend using SuSE Linux 10 which can
be purchased or download from Novell directly at
suse.com.  Also, see the openSuSE project (essentially
the open source community effort half of the
SuSE/novell team).

I used to run RedHat but was disappointed in the drop
to Fedora.  I tried SuSE a few years ago and have
never looked back.  So easy to install and configure. 
The YaST systems management tool is amazing.  You can
still do everything the manual way (and I do
sometimes).  But the firewall is easy and strong, the
package management is simple, the install resizes
partitions (even NTFS).  Just so many highly polished
surfaces there.  Try SuSE and see if you ever go back.

I have run tomcat and SuSE in production for over a
year and not had a problem and am now in the process
of upgrading my production server to SuSE 10 and
tomcat 5.5.12.  So far so good.  It's all working in
my development area.  The improvements in 5.5.12 are
EXCELLENT.  But there are significant changes in how
you set up the server.xml file, so read up on the 5.5
doc page.  I had previously only been using 5.0.x. 
ALso, I had some glitchy problems with 5.5.9.  No
reason to download it now anyhow, since 5.5.12 is
stable release.

I also recommend PostgreSQL 8.0 from postgresql.org if
you need database (as i imagine you must) (open source
and fully ansiSQL standard and RDBMS compliant, unlike
mySQL --don't yell at me for saying so, please-- i
know how much many people love mySQL.

You have to build Postgresql from source on SuSE 10
since no rpms are out in the combination of those
versions of SuSE and PGSQL.  I tired to use older
RPMS--not a good idea.  But the build and install went
perfectly.  Be sure you have the proper dev packages
installed before you try.  If not, the documentation
tells all you need to know.

PostgreSQL 8.0, Tomcat 5.5.12, and SuSE 10 are real
winners.  I have had --no-- problems with the past
versions, and these new versions seem up to par or
better.

I LOVE SuSE 10.0 for my desktop environment/school
computing/web surfing/DVD watching(i use KDE) and run
everything just described on my Dell Inspiron 6000
notebook.  That's my developemnt envrionment. 
Obviously the combination of KDE and the servers on a
notebook are no match for my production environment. 
but I must say, my notebook and the software on it do
all I ever ask them to--school work, web surfing,
large SQL routines, JVM, Tomcat--and a fair bit of
graphics design.  All on open source software.  What a
wonderful world we live in.  (The DVD's I run on XINE,
which I had to build, since XINE is stripped down for
leagal reasons in SuSE 10, but the build installed
great and runs with no problem just by typing xine in
KDE).

Justin
--with more to say than you probably wanted to here

--- John Geiger <[EMAIL PROTECTED]> wrote:

> Hello:
> 
> This is a little intimidating, but I am eager. I
> hope I am in the right
> place.
> 
> I am a DHTML developer‹intermediate level. I¹ve been
> exposed to JSP on an
> iPlanet server, Sun OS 5.8 (but it is my client¹s
> production server, and I¹m
> reluctant to mess around there!)
> 
> I now have my own Tomcat install kind-of-working on
> a Fedora Core 2 box. It
> is Tomcat 5.0.x with Apache 1.3.
> 
> I am studying an APress book called ³JSP 2.0 Novice
> to Professional,² but
> get errors with some of the exercises. (The book is
> great! Makes it sound so
> easy ;-)
> 
> My main question is: Can someone recommend a proven
> Linux, Apache 2 Tomcat
> 5.5 combination‹could be unix, too.
> 
> I figure I should set up a stable development rig
> first‹one that I could
> eventually rely on in a light production
> environment.
> 
> Also: I am interested in finding a tutor/mentor in
> the San Francisco Bay
> Area.
> 
> Any advice would be much appreciated.
> 
> Thanks,
> John G.
> 
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Resizing JPEG Images

2005-09-19 Thread Justin Jaynes
I am accepting JPEG uploads on a website I developed
in JSP and  Java Beans.  It all runs on Tomcat.

I once knew of a Java Bean that would accept a JPEG
and scale and resize the image and save it.  I need my
web-app to resize the images as it accpets them.

That was years ago.  I can't find it any longer.  Does
anyone know how or where I should start?  If writing
my own bean would be easy using some part of the
Enterprise Java SDK, please point me in the right
direction and I'll do the work.

I am using the lates version of the JDK.

Thanks,

Justin



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JNDI DBCP Resources: Pool Leak

2005-09-07 Thread Justin Jaynes
Concerning JNDI Database Connection Pooling Sources, I
have read that if you fail to explicitely close Result
Sets, Statements, or Connections to the DataSource
from WITHIN the web application, a connection in the
pool will be "lost."  (I read this at:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html).

I understand that you can set an option to reclaim
"lost" connections.  That's great.

But to avoid this in the first place, I have a
question.

I have a JSP which sends Statement objects to a Bean
(not a bean by exact definition) which accesses the
database and returns a ResultSet.

The jsp code is like this:

<% com.x.DatabaseInterface web = new
com.x.DatabaseInterface(); %>
<% web.connect(); %>
<% String selectSQL = "SELECT * FROM place;"; %>
<% ResultSet result = web.selectQuery(selectSQL); %>

<% while ( result.next() ) { %>
<%= result.getString("placename") %>
<% } %>

<% web.disconnect(); %>

Of course, there are statement objects and resultset
objects in the code above.  Do I have to explicitely 
close them IN JSP AND also the ones IN THE BEAN or
just  the ones in the BEAN?  I suppose this is a
fundamental principle of Java which I do not fully
understand as the objects .  Can someone please
enlighten me?

The Bean looks like this:

package com.;

import java.sql.*;
import javax.sql.*;
import java.io.*;
import javax.naming.InitialContext;
import javax.naming.Context;

public class DatabaseInterface {

String error;

DataSource ;


Connection database;
ResultSet result;
Statement select;
Statement update;

public DatabaseInterface() { }

public void connect() throws Exception {
try {
InitialContext initContext = new InitialContext();
 = (DataSource)
initContext.lookup("java:comp/env/jdbc/");
database = .getConnection();
} catch (Exception e) {
error = "Data Source Opening Connection Error: " +
e;
throw new Exception(error);
}
}

public void disconnect() throws Exception {
try {

database.close();
} catch (Exception e) {
error = "Data Source Closing Connection Error: " +
e;
throw new Exception(error);
}

}

public ResultSet selectQuery(String webStatement)
throws SQLException, Exception {
try {
if ( database != null) {
select = database.createStatement();
result = select.executeQuery(webStatement);
}
} catch (SQLException sqle) {
error = "SQL Error Disconnecting: " + sqle;
throw new SQLException(error);
} catch (Exception e) {
error = "Error in selectQuery block:" + e;
throw new Exception(e);
}
return result;
}

public void insertQuery(String webStatement) throws
SQLException, Exception {
try {
if ( database != null) {
update = database.createStatement();
update.execute(webStatement);
}
} catch (SQLException sqle) {
error = "SQL Error: " + sqle;
throw new SQLException(error);
} catch (Exception e) {
error = "Error in insertQuery block:" + e;
throw new Exception(e);
}
}
}





__
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using more than one SSL cert in keystore?

2005-08-08 Thread Justin Jaynes
Paul,

Thanks.  I am doing as you have instructed.  I hope to
set up client-side redirects.  Can you please tell me
how?  Does it require javascript, or just HTML?  Where
can I learn about client side re-directs?

Justin Jaynes

--- Paul Singleton <[EMAIL PROTECTED]> wrote:

> Justin Jaynes wrote:
> 
> > ...But now I would like to put up a new
> > site that is completely independant of the others.
>  It
> > needs its own SSL cert and it needs four host
> names to
> > all point to the same place and redirect to just
> one
> > of the domain names so that the SSL cert will be
> > valid, regardless of how the users chose to get to
> my
> > site.
> 
> An SSL cert is for a specific domain name.  If you
> want
> your users to be able to make HTTPS requests to all
> four
> domains without warnings from the browser, I reckon
> you
> need four certificates.
> 
> But if they make non-SSL requests, and you respond
> with
> a client-side redirect to your one true certificated
> site using HTTPS, that may work OK?
> 
> > Is it possible to do Virtual Hosting using IP's on
> a
> > Tomcat standalone installation?
> 
> Yes, I'm doing this now with 5.5.9
> 
> You need e.g. this server.xml stuff for each host:
> 
>Service
>  Connector (HTTP)
>  Connector (HTTPS)
>  Engine
>Host
>  Context
> 
> You can use the default keystore for all hosts, and
> use the (undocumented) keyAlias="myalias" Connector
> attribute
> to offer the appropriate certificate for each host,
> e.g.
> 
>  address="288.104.197.211"
>port="8443"
>scheme="https"
>secure="true"
>sslProtocol="TLS"
>keyAlias="mrk2"
>  />
> 
> (in 5.5.9 you also need sslProtocol="TLS"
> explicitly,
> fixed in later versions)
> 
> Paul Singleton
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.338 / Virus Database: 267.10.0/63 -
> Release Date: 3/Aug/2005
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How bind Tomcat to an IP address?

2005-08-04 Thread Justin Jaynes
Andrea,

Let's say you install tomcat on machine A, (your
server), and your network administrator has given that
machine the address of 192.168.0.7.

You and want to reach the server from a machine B,
your workstation.  All you need to do (assuming they
are on the same network and properly configured, which
are NOT tomcat issues) is sit down at the workstation,
machine B, and open your browser.  Enter the address
of the server (here, 192.168.0.7:8080).  Thats it.

No "address"=xxx.xxx.xxx field is needed.  Ommit them
from your server.xml file unless you plan to have your
server host virtual domains based on IP address. 
"Usually" a machine only has one IP address, but even
so, if you do not set up the address parameter in your
server.xml file, tomcat should listen to all the
network devices on the server and respond to your
requests to each of the IP's.

If this does not answer your question, either I
misunderstood it altogether and you need to be more
specific about what you are trying to do, or you might
try a brief chapter on basic networking in any good
"internet,how it works" type reference book.  Or a
good linux reference book, same chapter.

Justin

--- Andrea Senatore <[EMAIL PROTECTED]> wrote:

> Hi all,
> I have installed jakarta-tomcat-4.1.18-LE-jdk14 on
> my windows 2000.
> I tried it locally typing in my browser
> http://localhost:8080 and all
> works fine.
> As I need to use Tomcat on machine different from
> mine I tried to
> change the address which Tomcat is listening to.
> I read on HOW-TO that you can change the listening
> address through the
> field "address" of Connector in conf/server.xml.
> I tried this advice but nothing happens.
> 
> Any suggestions?
> 
> Thanks in advance,
> Andrea
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: 1 jakarta server + multiple ip's

2005-08-03 Thread Justin Jaynes
My host is not very busy.  The loads on the sites are
minimal.  I want to use two services so that each
virtual host I run can have individual SSL
certificates to match.  SSL prevents Virtual Hosting
using domain name distinguishing.  It must be IP
based.

Justin

--- MC Moisei <[EMAIL PROTECTED]> wrote:

> 
> Quick  question on this one:
> 
> So you have an apache2 that fronts tomcat via jk2
> connector, are there two 
> instances of tomcat or just one ? If there would be
> two I'd see the benefits 
> if one is busy the round robin algorithm
> redistributes the request to the 
> second one. But its only one instance with two jk2
> services how is that 
> helping if the tomcat is busy handling a lot of
> requests ?
> 
> C
> 
> 
> 
> 
> 
> 
> >From: Justin Jaynes <[EMAIL PROTECTED]>
> >Reply-To: "Tomcat Users List"
> 
> >To: Tomcat Users List
> 
> >Subject: RE: 1 jakarta server + multiple ip's
> >Date: Wed, 3 Aug 2005 10:21:29 -0700 (PDT)
> >
> >Peter,
> >
> >I tried the solution you offered (below) about
> >creating more than one service and using the
> >address="xxx" parameter in the Connectors tags.  It
> >works great.  However, what do you mean in your
> >"disclaimer" that it is from the documentation and
> is
> >untested?  Did you mean to say NOT from the
> >documentation?  And if it is untested, but it is
> >working, are there any reasons not to use it in a
> >production server?  Is it safe?
> >
> >Justin
> >
> >--- Peter Crowther <[EMAIL PROTECTED]>
> >wrote:
> >
> > > > From: [EMAIL PROTECTED]
> > > > I'm configuring a tomcat-server and the server
> has
> > > multiple
> > > > ip's. I would like
> > > > to setup virtual hosts based on the
> ip-address. I
> > > wouldn't
> > > > like running
> > > > multiple servers.
> > > >
> > > > What I've done: I have setup aliases for the
> > > possible
> > > > dns-names of the second
> > > > virtual host (the possible names for one of
> the
> > > ip's). I have
> > > > also added the ip
> > > > itself to the aliases link.
> > > > However, I don't know how tomcat filter based
> on
> > > these names.
> > > > The ip-alias seems
> > > > to work, so I'm wondering what tomcat is
> comparing
> > > it with.
> > >
> > > Try this.  Beware, this is from the
> documentation
> > > and is untested!
> > > Based on my 5.0.28 installation.
> > >
> > > In your server.xml for Tomcat, set up two
> different
> > > Services - copy and
> > > paste the existing chunk of XML for the Service,
> its
> > > Engine (and the
> > > bits inside that) and its Connectors.
> > >
> > > Change the appBase of the second Host to the
> place
> > > you want the second
> > > virtual host to find its files.
> > >
> > > In the Connectors of each Service, add:
> > >
> > >   address="ip.of.virtual.host"
> > >
> > > near the port="port" attribute.  THis should
> cause
> > > the Connector to bind
> > > to that IP rather than every IP on the machine.
> > >
> > > Hope this helps.
> > >
> > >   - Peter
> > >
> > >
>
>-
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> > >
> >
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question for Bruno Re: Forwarding Domains

2005-08-03 Thread Justin Jaynes
Hi Bruno,

I am NOT using apache in front of tomcat.  Sorry.  I
really like standalone tomcat.  So I would like to
learn more about the first solution you described
here.  However, I do not understand it at all.  What
exacty do you mean, and where can I read/learn about
it?

Second question--in the discussion thread titled
something like [one tomcat + multiple ip's] I tried
the proposed solution and have asked if it is
suitable/safe for production environment.  Do you have
any input on the question?

Justin

--- Bruno Georges <[EMAIL PROTECTED]> wrote:

> Hi justin
> You can achieve url forwarding/rewriting using a
> simple servlet filter, or better if you have apache
> in the front, use mod-rewrite, which is configurable
> in your httpd.conf.
> If you are using iis, there are few available isapi
> filter which you can use, alternatively you can
> write your own, which reacts on the preprocheaders
> or urlmap notifications.
> 
> Hope this helps.
> 
> Bruno Georges
> Bruno Georges
> 
> Glencore International AG
> Tel. +41 41 709 3204
> Fax +41 41 709 3000
> 
> 
> - Original Message -
> From: Justin Jaynes [EMAIL PROTECTED]
> Sent: 01.08.2005 23:53
> To: tomcat-user@jakarta.apache.org
> Subject: Forwarding Domains
> 
> Is it possible for me to host somedomain.com on my
> tomcat, and as that is my prefered domain name
> format,
> and want all users who go to www.somedomain.com
> (YES,
> I have A records set up for both and they point to
> the
> same tomcat server) to be re-directed to
> somedomain.com, using my tomcat setup?
> 
> In other words, I want to move all my users from the
> domain they enter to a domain I prefer USING my
> tomcat
> setup.  I imagine there is some way to set up my
> server.xml to do it.
> 
> Justin
> 
> Thanks in advance.  I have never had an issue
> unresolved after submitting to this list.  Bravo!
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]> 
> 
> *  
> *  LEGAL DISCLAIMER
> *  This message contains confidential information
> for
> *  the exclusive use of the person mentioned above.
> *
> 
> 
> >
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: 1 jakarta server + multiple ip's

2005-08-03 Thread Justin Jaynes
Peter,

I tried the solution you offered (below) about
creating more than one service and using the
address="xxx" parameter in the Connectors tags.  It
works great.  However, what do you mean in your
"disclaimer" that it is from the documentation and is
untested?  Did you mean to say NOT from the
documentation?  And if it is untested, but it is
working, are there any reasons not to use it in a
production server?  Is it safe?

Justin

--- Peter Crowther <[EMAIL PROTECTED]>
wrote:

> > From: [EMAIL PROTECTED] 
> > I'm configuring a tomcat-server and the server has
> multiple 
> > ip's. I would like
> > to setup virtual hosts based on the ip-address. I
> wouldn't 
> > like running
> > multiple servers.
> > 
> > What I've done: I have setup aliases for the
> possible 
> > dns-names of the second
> > virtual host (the possible names for one of the
> ip's). I have 
> > also added the ip
> > itself to the aliases link.
> > However, I don't know how tomcat filter based on
> these names. 
> > The ip-alias seems
> > to work, so I'm wondering what tomcat is comparing
> it with.
> 
> Try this.  Beware, this is from the documentation
> and is untested!
> Based on my 5.0.28 installation.
> 
> In your server.xml for Tomcat, set up two different
> Services - copy and
> paste the existing chunk of XML for the Service, its
> Engine (and the
> bits inside that) and its Connectors.
> 
> Change the appBase of the second Host to the place
> you want the second
> virtual host to find its files.
> 
> In the Connectors of each Service, add:
> 
>   address="ip.of.virtual.host"
> 
> near the port="port" attribute.  THis should cause
> the Connector to bind
> to that IP rather than every IP on the machine.
> 
> Hope this helps.
> 
>   - Peter
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using more than one SSL cert in keystore?

2005-08-02 Thread Justin Jaynes
Bruno,

I am hosting a few sites on Tomcat standalone and they
all share on SSL certificate because they all use the
same domain name (they are just forwards to different
directories).  But now I would like to put up a new
site that is completely independant of the others.  It
needs its own SSL cert and it needs four host names to
all point to the same place and redirect to just one
of the domain names so that the SSL cert will be
valid, regardless of how the users chose to get to my
site.

Is it possible to do Virtual Hosting using IP's on a
Tomcat standalone installation?  Or will it only do
the  entries that I am already using?

It would solve all my problems if I could.  Then, to
get four addresses redirected to one, I would simply
have to set my default domain name set in server.xml,
enter no other  entries, and all the requests
sent there would shift to the default domain.

I am not sure if this scenario is achieveable.  Tomcat
may not even be set up for IP virtual hosting.  One
other thought--Is this more easily achieved by setting
up a second instance of tomcat on my machine?

Justin
--- Bruno Georges <[EMAIL PROTECTED]> wrote:

> Justin
> 
> In this situation, I would use apache + modrewrite
> If you want some example I can help you
> 
> Bruno
> Bruno Georges
> 
> Glencore International AG
> Tel. +41 41 709 3204
> Fax +41 41 709 3000
> 
> 
> - Original Message -
> From: Justin Jaynes [EMAIL PROTECTED]
> Sent: 02.08.2005 00:54
> To: Tomcat Users List
> 
> Subject: Re: Using more than one SSL cert in
> keystore?
> 
> In the (brief) interim between my asking the
> original
> question below, and now, I have found additional
> information--SSL must occur before HTTP handshake,
> and
> will therefore not work on hosts based on the same
> IP.
> 
> I have more than one IP available from my ISP.  I
> suppose the question would better be this:
> 
> How do I cofigure virtual hosting of more than one
> SSL
> enabled host over ONE interface using multiple IP
> addresses?
> 
> Sorry for the confusion.
> 
> --- Justin Jaynes <[EMAIL PROTECTED]> wrote:
> 
> > If I host more than one domain on my tomcat
> > installation (standalone, not with apache), can I
> > imort an SSL certificate for each domain and will
> > tomcat just know which to use for which hosts?
> >
> > Justin Jaynes
> >
> >
>
-
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]> 
> 
> *  
> *  LEGAL DISCLAIMER
> *  This message contains confidential information
> for
> *  the exclusive use of the person mentioned above.
> *
> 
> 
> >
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using more than one SSL cert in keystore?

2005-08-01 Thread Justin Jaynes
In the (brief) interim between my asking the original
question below, and now, I have found additional
information--SSL must occur before HTTP handshake, and
will therefore not work on hosts based on the same IP.

I have more than one IP available from my ISP.  I
suppose the question would better be this:

How do I cofigure virtual hosting of more than one SSL
enabled host over ONE interface using multiple IP
addresses?

Sorry for the confusion.

--- Justin Jaynes <[EMAIL PROTECTED]> wrote:

> If I host more than one domain on my tomcat
> installation (standalone, not with apache), can I
> imort an SSL certificate for each domain and will
> tomcat just know which to use for which hosts?
> 
> Justin Jaynes
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Forwarding Domains

2005-08-01 Thread Justin Jaynes
Is it possible for me to host somedomain.com on my
tomcat, and as that is my prefered domain name format,
and want all users who go to www.somedomain.com (YES,
I have A records set up for both and they point to the
same tomcat server) to be re-directed to
somedomain.com, using my tomcat setup?

In other words, I want to move all my users from the
domain they enter to a domain I prefer USING my tomcat
setup.  I imagine there is some way to set up my
server.xml to do it.

Justin

Thanks in advance.  I have never had an issue
unresolved after submitting to this list.  Bravo!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using more than one SSL cert in keystore?

2005-08-01 Thread Justin Jaynes
If I host more than one domain on my tomcat
installation (standalone, not with apache), can I
imort an SSL certificate for each domain and will
tomcat just know which to use for which hosts?

Justin Jaynes

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache-like Deny/Allow directives

2005-07-15 Thread Justin Crabtree
[EMAIL PROTECTED] wrote:
> Is there any way, with Tomcat, to block connections from domains and allow 
> only certain ones, just like the Apache directive :
> 
> Order Deny,Allow
> Deny from all
> Allow from .company.com
> 
> I've setup my Apache server to do this, but since all the dynamic content is 
> relayed to tomcat (jsp's), it is still accessible to the internet.
> 
> Luc Boudreau
> Université du Québec
> Canada


Is there a reason you can't use Apache directives on the areas you wish
to restrict?

-- 
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache + Tomcat with Mod_jk

2005-07-08 Thread Justin Crabtree
Shailendra Gatade wrote:
> Hi All,
> 
> I am trying to connect Apache 2 ( Linux ) with Tomcat 5.0 ( Win2K ) using
> mod_jk. I'm facing several problems regarding this ...
> 
> Initially i was using mod_jk2.so which is deprecated and also not recomended
> for Production Environment.
> 
> I am not able to find the proper mod_jk.so for Apache.
> 
>   I downloaded ...
> 
> jakarta-tomcat-connectors-jk-1.2.10-linux-sles8-ppc-apache-2.0.53-prefork.so
> and
> 
> jakarta-tomcat-connectors-jk-1.2.10-linux-sles8-ppc-apache-2.0.53-worker.so
> 
>   Which file should i rename to mod_jk.so ?
> 
>   When i rename the first one and use it, i am getting the following
> error ...
>  Cannot load /usr/local/apache2/lib/mod_jk.so into server:
> /usr/local/apache2/lib/mod_jk.so: ELF file data encoding not little-endian.
> 
>  Can somebody point me to a location where i can find the proper
> mod_jk.so for my setup ?
> 
> Also there is no extensive tutorial available on the same issue ... Is
> anyone aware of a tutorial which guides you step by step in configuring
> Apache 2 + Tomcat 5.0 using mod_jk.so ?
> 
> Thanks in advance ...
> 
> Shailendra
> 


Try here.

http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/win32/

And here for docs.

http://jakarta.apache.org/tomcat/connectors-doc/

-- 
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: choice of JVM

2005-03-16 Thread Justin Crabtree
Elihu Smails wrote:
J2EE is just the enterprise pack for Java. Think of it as an add on to
the JDK.  You need to get, or should get the JDK 1.5.
On Wed, 16 Mar 2005 17:43:12 +0100 (CET), Christoph Kukulies
<[EMAIL PROTECTED]> wrote:
I'm in the process of installing tomcat (5.0.28) under Windows (XP).
Installed apache 1.13.33 and ran tomcat installer.
At this point I was asked for a JVM to choose (with an empty
listbox).
So I downloaded j2eesdk-1_4_01_2005Q1 from java.sun.com and installed it.
Strange install, this Sun environment. Want me to run an application server.
Hell, Tomcat should be my application server. I chose, not to register an
application server.
Anyway, I'm still at a loss to choose a JVM. Where is my JVM?
The directory browser of the tomcat installer only allows me
to choose a directory, not a specific binary.
Help, please.
--
Chris Christoph P. U. Kukulies kuku_at_kukulies.org

Depends on what package you downloaded.  Either way, Elihu is correct 
that the J2EE part doesn't have a JRE.  If you downloaded and installed 
the whole bundle, you should have the J2SE JDK installed somewhere.  If 
not, you need to download it and install it.  Should be installed under 
"C:\Program Files\Java".  HTH.

--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JNDI LDAP Resource

2005-03-08 Thread Justin Crabtree
I am trying to setup a JNDI Resource in my server.xml for a SSL 
connection to a LDAP server.  I have setup and used JDBC resources, but 
I have been unable to find any examples on setting up a LDAP connection.

Is this even possible?  If so, anyone have some good examples of how to 
set it up?  If not, any suggestions on how to get the connection stuff 
out of the Java code and into some sort of config file?

Thanks in advance for any help.
--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Being lost in the mailing list

2005-03-08 Thread Justin Crabtree
Klaus-F. Kaal wrote:
Hi Doug,
sorry, that I had to shout out, but I can see that every specialist gets 
tons of eMails every day. And if he or she does not answer straight away 
to some mails, the others will be dumped in a bin and ... lost.
And nobody answered by mails since days...

Thanks for your reply.
I have aquired a dedicated server with Suse 9.1 preconfigured. It came 
with Apache 2.0.48, which is working well. I installed

- JDK 1.4
- Tomcat 5.0.28
- The latest binary package from mod_JK2
Apache and Tomcat are working well individually. The logs are showing, 
that Tomcat accepts mod_JK2 well and is prepared to communicate on port 
8009. It also creates the /conf/auto/mod_jk.conf, which I show later in 
this text. Apache is not showing anything in the log. It just states 
that it did not find the document in its normal public_html space, when 
I try to call a JSP page.  But, I havn't modified the log-level (by the 
way, where can I do that??).

There are soo many how-to's which are all doing different things. I 
tried to find the essence from several. I must say at this point: I hate 
to compile packages when I can use binaries. So, I did not follow 
how-to's which asked me to do that.

All other infos are given below.
Can you do something with this info? Thanks for any help or hint!
Klaus


- My previous questions

- Apache still seems to ignore my mod_jk.
_In my Tomcat log, I can see:_
INFO: JK2: ajp13 listening on /0.0.0.0:8009
06.03.2005 00:54:10 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=5/43  config=/usr/tomcat/conf/jk2.properties
_I included my automatically created mod_jk.conf into the httpd.conf:_
Include /usr/tomcat/conf/auto/mod_jk.conf
This mod_jk.conf looks like this:

 LoadModule jk_module "/usr/lib/apache2-prefork/mod_jk.so"

JkWorkersFile "/etc/apache2/workers2.properties"
JkLogFile "/usr/tomcat/logs/mod_jk.log"
JkLogLevel emerg
_The workers2.properties is here:_
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[uri:/jsp-examples/*]
worker=ajp13.localhost:8009
[uri:www.technologyserver.com/*.jsp]
worker=ajp13:localhost:8009

At first glance, I don't see any JkMount directives.  You have to 
explicitly define what should be passed to the mod_jk worker with a 
JkMount.

I would ask why you have chosen mod_jk2?  It is no longer being 
developed by Apache.  I would recommend using mod_jk.  There is an 
excellent tutorial on configuration for Apache on Apache's website.

http://jakarta.apache.org/tomcat/connectors-doc/howto/apache.html
--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: display my index.jsp as default

2005-03-03 Thread Justin Crabtree
bhupendra bendale wrote:
I have placed my "directory" under %catalina_home%/webapps/
now i want to configure tomcat to display my index.jsp
page by entering only "http://localhost:8080/"; what 
changes should i make.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

The following will set the default page to display for the web 
application.


index.jsp

As far as mapping the root to your app, you could put a redirect in the 
root index.jsp to the jsp page of your choice.  Not very elegant, but it 
would work.

--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: newbie having problems with MySQL JDBC/JNDI Datasource example

2005-03-01 Thread Justin Crabtree
Parsons Technical Services wrote:
Resource Link
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/globalresources.html
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html#Resource%20Links 

Doug
- Original Message - From: "Darryl Wagoner" 
<[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, March 01, 2005 5:09 PM
Subject: newbie having problems with MySQL JDBC/JNDI Datasource example


Greetings,
Not sure if this made it the first time.  I didn't see it show up on 
the list

I am trying to get the example in the MySQL JDBC/JNDI HOWTO to work 
and I am missing something.

I get this error:  My webapp directory is /DBTest.
What am I missing?
thanks
-darryl
--- Error Page ---
*type* Exception report
*message*
*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._

*exception*
javax.servlet.ServletException: Unable to get connection, DataSource 
invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:845) 

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:778) 

org.apache.jsp.testDB_jsp._jspService(org.apache.jsp.testDB_jsp:81)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
*root cause*
javax.servlet.jsp.JspException: Unable to get connection, DataSource 
invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276) 

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159) 

org.apache.jsp.testDB_jsp._jspx_meth_sql_query_0(org.apache.jsp.testDB_jsp:100) 

org.apache.jsp.testDB_jsp._jspService(org.apache.jsp.testDB_jsp:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Sounds like it can't find the driver.  Do you have the Connector/J jar 
installed in the correct place?  Should be in common/lib.

--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Test

2005-01-15 Thread Justin Stanczak
Yes, someone hit the plug.
Justin Stanczak
812-888-5813
"All that is necessary for the triumph of evil is that good men do 
nothing." Edmund Burke
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Recommendations for connector from Apache to Tomcat

2005-01-12 Thread Justin Crabtree
I am going to soon be attempting to setup an existing Apache web server 
on a Windows Server 2003 machine with a connnector to a new install of 
Tomcat.  Any recommendations on what connector to use?  Problems to 
watch out for?  Any good documentation on how to do this?  Here are my 
specs.

Windows Server 2003
Apache 2.0.50
Tomcat 5.5.4
Java 1.5.0 Update 1
I am a newbie so I need something relatively easy to setup.  Thanks.
--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Java developer friendly Linux distro

2004-12-21 Thread Justin Crabtree
Wade Chandler wrote:
Nat Gross wrote:
Antony Paul wrote:
Hi all,
  Which distro (free) is most friendly for Java development. I need
J2SE 1.4.2 to work on it plus Eclipse 3.x(Linux dont have a good text
editor in which I can run Ant builds).

I use JEDIT for quick simple editing of files, and Eclipse for the 
real stuff. A great combination. I would not advise using JEDIT 
instead of Eclipse but I don't want to start a war now.
Although I am currently using Fedora Core 2, I am looking to upgrade, 
and the folks in various Linux/Unix newsgroups are pushing me towards 
the new Solaris 10, free from Sun. (My main Eclipse work though, for 
now, is still on a WinXP machine.)
fwiw,
-nat

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

I have tried Solaris on intel over the past recent years, and I love 
Sun, but my gripe with Solaris on intel is lack of drivers.  Look at 
CentOS or White Box Linux (www.centos.org and www.whiteboxlinux.org 
respectfully) if you like Red Hat as they are free and use the Red Hat 
source SRPMs with only stripping out the RH branding, so they are 
Advanced and Enterprise RH for free using the same source code.  SuSE is 
also very good.  I am using 9.1 at the moment.  You can purchase SuSE9.2 
Professional for 90.00US and get like 7-8 cd's and a DVD with all kinds 
of nice applications.  I've been happy with all the ones I've mentioned. 
 I run Tomcat on all of them, I use Netbeans 4.0 without issue on all of 
them, and have been developing java on all of them for years.  SuSE has 
been using the 2.6 kernel since their 9.1 release.  I've been pleased 
with it.  I've got some friends who like the Debian based distros.  To 
install a VM on them download the non RPM version of the install.  
That's about it really.

Wade
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

I would say that the most friendly distro will be the one that you are 
comfortable with.  If you are using mainstream tools such as Eclipse, 
the support on most distros will at least be adequate if not friendly. 
The best advice is to try a couple and see what works.

--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] HTTP Sniffers

2004-12-15 Thread Justin Ruthenbeck
Whenever I need to see the actual HTTP messages (which is pretty often, 
as it turns out), I use an HTTP proxy logger to do it.  My favorite, for 
it's simplicity, is zproxy:

http://www.zaval.org/products/proxy/download/
At 12:17 PM 12/15/2004, you wrote:
Considering this is a pretty knowledgable group is there a good free 
HTTP Sniffer application I can use, I need to see what the HTTP headers 
are returning on my site.

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Re: Tomcat mailing list is full of non tomcat topics

2004-12-08 Thread Justin Ruthenbeck
Personally, it seems like truly off-topic messages get tagged pretty 
quickly on this list.  I think that's a reasonable solution to handle 
this problem.

As for the *root* of the problem, the VAST majority of questions come 
from novice users who, predictably, don't know the difference between a 
"Tomcat" question and "Servlet/JSP" question.  For most people, there 
*is* no difference.  From that standpoint, it's artificial to say that 
some questions are "Tomcat" ones and others aren't -- they are all 
"Tomcat-related" and, as such, I feel like this is an appropriate place 
to address them.  IMHO, asking a novice user to take it elsewhere would 
be a fairly cruel thing to do to an already confused and potentially 
frustrated user.

That said, lengthly threads that banter about the merits of various JSRs 
and specs clearly don't belong here and should either be relocated or 
(more likely), marked OT.

justin
At 06:56 PM 12/8/2004, you wrote:
On Wed, 2004-12-08 at 17:41, Roberto Cosenza wrote:
> I'm not talking about moderating but about informing the users that 
this is
> not the right place.
> Many important (and related) question do not get enough attention in 
this
> sea of messages.
> /rob

I think this page:
http://jakarta.apache.org/site/mail.html
does that.
Specifically here:
"Join the lists that are appropriate for your discussion.
Please make sure that you are joining the list that is appropriate for
the topic or product that you would like to discuss. For example, please
do not join the Regexp mailing list and ask questions about Tomcat.
Instead, you should join the Tomcat User list and ask your questions
there."
And here:
http://www.catb.org/~esr/faqs/smart-questions.html
It is also customary on this list, as it is on others, to begin the
subject of your post with [OT] or [OFF TOPIC] for threads, like this
one, that don't deal directly with Tomcat issues.  This allows people
who don't want to wade through off topic discussions to skip right by
them.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Delivering JSPs without source

2004-12-01 Thread Justin Ruthenbeck
At 09:11 PM 11/30/2004, you wrote:
> It would seem that if a web page request comes in for a .jsp page,
Tomcat would have no file to compare the date against in your scheme of
putting the compiled .jsp page in a .jar file only.
This is only done for non-compiled jsp files that are served by the 
JspServlet (mapped to *.jsp in the global web.xml).  When the jsps are 
precompiled, the servlets they become are mapped in your own web.xml, 
meaning they are treated *exactly* like servlets and no date, compiling, 
or other shenanigans are done.

How do most companies deploy their web applications?  Do they include 
the source code for the jsps?  Almost all of the companies I have worked 
for have been very protective of their source code and won't allow it to 
be released.
I'm still not clear as to why you have to put your compiled JSPs in 
common/lib.  I understand that some of your classes much be there, but 
why won't you split your classes into multiple jars?  The "normal" way 
this is done is to precompile the jsps, bundle them into 
/WEB-INF/lib/myapp-jsp-compiled.jar, bundle the majority of your POJO to 
/WEB-INF/lib/myappcore.jar, and bundle your container service 
implementation classes (custom realms, valves, anything the main 
classloader needs) into /common/lib/app-container.jar.  Will this not 
work in your case?

justin

______
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Fedora Core 3

2004-12-01 Thread Justin Crabtree
Allistair Crossley wrote:
i have seen some 5.0.28 installations on fedora core 2 if that helps! if you do 
decide to upgrade to version 3 and get tomcat 5 working, *please* let this list 
know about it so it can be added to the list of supported platforms and help 
others.

-Original Message-
From: Matt Bathje [mailto:[EMAIL PROTECTED]
Sent: 01 December 2004 16:08
To: Tomcat Users List
Subject: Re: Fedora Core 3
I'm using tomcat 5.0 (I think 5.0.25 specifically right now) 
but I was 
more just wondering in general as I've seen no mention of FC3 yet.

If tomcat 5.0.x has problems in FC3 it wouldn't be a huge 
deal, because 
once I upgraded to the new OS I would have to retest the app 
anyway, so 
a Tomcat upgrade wouldn't cause any extra headache.


Matt

Elihu Smails wrote:
what version of tomcat?
--- Matt Bathje <[EMAIL PROTECTED]> wrote:

Hey all -
I searched around on mail-archive and google for a
bit and couldn't find 
anybody mentioning that they upgraded their Tomcat
machines to use 
Fedora Core 3 yet.

Has anybody done so? Any issues with Java or Tomcat
after the upgrade?
Thanks,
Matt


-

Try asking on the fedora mailing list.  They are usually pretty good 
about answering these type of questions.

http://www.redhat.com/mailman/listinfo/fedora-list
--
Justin Crabtree
Java Programmer
Ozarks Technical Community College
447-7533

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Delivering JSPs without source

2004-11-30 Thread Justin Ruthenbeck
Hi Steve,
Hopefully I read your question right.  There is no reason why your app 
wouldn't be able to find classes from a jar in common/lib -- there's 
something else going on here.  Do you have duplicate copies of these 
classes anywhere?  Do these classes rely on other classes found only in 
the /webapp/WEB-INF/lib jars or /webapp/WEB-INF/classes?

This particular issue aside, there's no good reason why you should have 
to place your JSPs in common/lib.  If there are other classes in your jar 
which have to be there (custom realm impl, for example), then break those 
out into a separate jar and keep your compiled JSPs in a separate jar in 
WEB-INF/lib.  ... and if you find that your realm is being somehow 
implemented in the JSP, you know you're really screwed.  :)

justin
At 03:32 PM 11/29/2004, you wrote:
We have a web application that uses jsps.  We want to deliver the 
application to the customer without source for the jsps.  We have done 
this in the past by putting all of the compiled jsps into a jar file.

Recently we had to move the application jar files from 
webapps/appname/WEB-INF/lib to common/lib because we implemented our own 
realm which uses our object repository; since it has to be installed in 
server/lib, the code for the repository cannot be installed under the 
web application directory.

When the application is installed in common/lib it is not able to load 
the compiled jsp files.  They are installed in common/lib/.

Does anyone have an idea about why these classes are not visible?
Thanks,
--Steven
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

______
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Virtual Hosting Questions

2004-11-17 Thread Justin Jaynes
Bill,

I believe I know what you are trying to do.  I have
done the a smiliar thing.  Let me answer your
questions one at a time.

> I need to set up a few virtual hosts for a
> development project, and 
> being new to Tomcat virtual hosts, have a couple of
> questions:

By virtual hosts, I assume you mean multiple domains
all hosted on the same box, like www.firstsite.com,
www.secondsite.com, etc with all different pages being
displayed at each site, with one tomcat server
running.

To do this, you have to get your server.xml
configuration just right, as well as have your hosts
files setup (or DNS entries).  Right now, on my
server, I have four virtual hosts.  I have 4 different
DNS entries all pointing to the same IP.  The
configuration in server.xml makes tomcat point each
address to a different directory with my web content
for each site.

> 1. In development, the clients and tomcat will be on
> an intranet. I plan 
> to use the hosts files of the client and tomcat
> boxes to map domain 
> names to IP addresses, thereby preempting invocation
> of DNS, and thus 
> exposure of our product-specific domain names to the
> Internet at-large, 
> until the site is deployed publicly.
> 

Therefore, without DNS entries, you must put an entry
for each desired virtual host into the hosts file on
each client you wish to have pointing to the server,
with the ip address.

> Question 1: Is this hosts-file approach feasible?

Yes.  Quite feasible.

> Does tomcat care HOW 
> domain names
> are mapped to IP addresses?

Not that I know of.  But I am no expert.

> The following fragment is extracted from
> conf/server.xml of the the 
> tomcat distribution:
> 
>unpackWARs="true" autoDeploy="true"
>   xmlValidation="false"
> xmlNamespaceAware="false">
>  className="org.apache.catalina.logger.FileLogger"
>   directory="logs" 
> prefix="localhost_log." suffix=".txt"
>   timestamp="true"/>
> 
> 

To get each virtual host to direct to its own page,
you must have one whole host entry for each virtual
host where localhost is replaced by the domain that
you desire (e.g. www.firstdomain.com).  Then, within
the host entry, create a context to point to the
proper directory structure.

> Question 2: Why is the host named localhost?

Just a convention of UNIX machines.  You pick any
other name you want for mapping to ip's that you put
in your hosts file or a DNS entry (assuming it is
registered to you).

> I 
> expected that only URL's of the form
> http://localhost:8080/... would be 
> handled by this virtual host, but it seems to handle
> any URL's that map 
> to the IP and port of the real host that tomcat
> serves.

By default (i believe) any name that does not have a
corresponding Host entry in the server.xml file is
routed to the first entry (or something like that) so
your virtual hosts won't split to different pages
until you create a host entry for each one.

> ---
> Question 3: How would one configure a 'local'
> virtual host, i.e. a host 
> visible only on the box that runs tomcat?
> ---

Just put the entry for the desired domain in the hosts
file of only the local machine (the server) and not in
the hosts files on the other machines on the network.

It's that easy.  If I can give any other pointers,
just ask another question.

Good luck,

Justin Jaynes



__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Counting Page Hits

2004-11-11 Thread Justin Jaynes
Thanks!
Justin Jaynes

--- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:

> 
> Hi,
> 
> >Could you give me a quick pointer in
> >the right direction for a good, popular log
> analyzer?
> >Then I can study up.  I would appreciate the help
> so
> >much.
> 
> Easy.  Enable the AccessLogValve in conf/server.xml,
> with pattern
> "common" (the default) or "combined" (for additional
> info).  Use the
> server a bit so that access log has some data.
> 
> Then download Webalizer from
> http://www.mrunix.net/webalizer/ and run it
> on the access log file.  It will generate a set of
> HTML files, including
> an index.html starting point.  Open a web browser,
> go to this
> index.html, and enjoy looking at your site stats. ;)
> 
> There are plenty of other good, free analyzers out
> there in addition to
> webalizer.  I just picked one that I use, but if you
> don't like it or
> want to try something else, they're easy to find
> online.
> 
> Yoav
> 
> 
> 
> This e-mail, including any attachments, is a
> confidential business communication, and may contain
> information that is confidential, proprietary and/or
> privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not
> be saved, copied, printed, disclosed or used by
> anyone else.  If you are not the(an) intended
> recipient, please immediately delete this e-mail
> from your computer system and notify the sender. 
> Thank you.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Counting Page Hits

2004-11-10 Thread Justin Jaynes

> The general
> answer I've seen in the past is that you should use
> log analysis tools

Unfortunatly, I have never been introduced to log
analysis tools.  Could you give me a quick pointer in
the right direction for a good, popular log analyzer? 
Then I can study up.  I would appreciate the help so
much.

And I have not done much research on logging in
Tomcat, so I am reading the texts on the jakarta
website.  However, the tomcat/faq/logging.html page
states that logging previous to 5.5 is provided as a
LOGGER element and in 5.5, as COMMONS-LOGGING.

I am using 5.0.28 on my production server.  Do I have
to wait until 5.5 comes out stable to use
COMMONS-LOGGING?

Justin Jaynes

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Counting Page Hits

2004-11-09 Thread Justin Jaynes
What is the easiest way to monitor hits to resources
(files or pages) on my tomcat 5 server?

Do I write my own ticker into each page I want to
monitor and store the incremented value to a database?

Or is there a much simpler solution already
implimented in some tomcat management software (I have
never used any of the pre-installed software, and have
actually been disabling it.  A book recommended it not
be installed for security purposes on a production
server-- they could be wrong, I know).

Any suggestions?

Justin Jaynes


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Response and file downloads

2004-11-01 Thread Justin Ruthenbeck
At 12:17 PM 11/1/2004, you wrote:
I am not sure what you are refering to as atypical or robustness...
I meant to say that you could approximate the behavior you were asking 
for (dual response), but doing so would be hackish.

How do other sites generate files on the fly (take it out of a database, 
or a report just run), on form submit, and send them down the line and 
not run into this problem?
Like fzlists said, you'll see most sites load a page in response to a 
download request which either provides a link which the user can click on 
to download the binary content (right click, "save as" in IE), or that 
scripts the browser to automatically begin downloading.  This is how 
CNet, Yahoo, and others do this.

I see many people posting many places on the net that they are using the 
response to send a file, a lot of them are getting this IllegalState, 
but I never really found a followup solution that really fit my needs.

Why would the possibility exist to push a file through the response if 
it leaves you with the ability to go nowhere after?
If your browser submits a request and the response is a mp3 (through 
either URL inspection or Content-Disposition header), the browser will 
prompt the user to Save/Open/Run/whatever the file (and won't try to 
display it).  Once the file has been saved, it will leave you at the 
original page from which the file was requested.

Point being that after you push binary content through the response, it 
leaves you with whatever the previous page's options were ... there's 
really no contradiction in doing so.

justin

-----Original Message-
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]
Sent: Monday, November 01, 2004 2:56 PM
To: Tomcat Users List
Subject: Re: Response and file downloads

Luc,
At 11:42 AM 11/1/2004, you wrote:
>I am having a wee problem with using the response.
>
>I have a form on a page, with a submit button to download a file. That
>file is being pulled from a database and pushed to the response.
>The problem I am having, I just used that response to submit the page,
>so I am getting and IllegalStateException, even though it is still
>pushing the file to the browswer
>I also want to be able to send a redirect after the file is downloaded
>(so I can refresh the page so the form submit page is regenerated, 
since
>we are using a string to determine unique submits are only coming from
>the pages we generated, and not the browser address bar)
>
>Can we get a new response from the session variable (the one available
>to jsp writing) to send the file, then get another new response to
>perform a redirect
>Basically I want to be able to do something like
>
>the form submits, and passes to the applications perform methods 
through
>the jsp catching the submit
>response = new Response
>response.sendFile
>response = new Response
>response.sendRedirect
>(yes I know those are not actual methods and classes, just trying to
>explain what I want)

Your understanding of how, exactly, the http protocol works is
incorrect.  Because it is a (single) request, (single) response protocol,
what you're asking for cannot be done.
It seems like what you want is for a user to fill out a form, click
submit, then be presented with a new, fresh, form again ... with the file
download on the side.  If you have determined that you absolutely want
this behavior (it's atypical, so doing it won't be particularly robust),
consider programmatically opening another browser window on form submit
from which the download will happen ... and reload your form in your
"main" browser window.  This will, of course, subject you to any
headaches associated with javascipt window opening.
justin

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Response and file downloads

2004-11-01 Thread Justin Ruthenbeck
Luc,
At 11:42 AM 11/1/2004, you wrote:
I am having a wee problem with using the response.
I have a form on a page, with a submit button to download a file. That 
file is being pulled from a database and pushed to the response.
The problem I am having, I just used that response to submit the page, 
so I am getting and IllegalStateException, even though it is still 
pushing the file to the browswer
I also want to be able to send a redirect after the file is downloaded 
(so I can refresh the page so the form submit page is regenerated, since 
we are using a string to determine unique submits are only coming from 
the pages we generated, and not the browser address bar)

Can we get a new response from the session variable (the one available 
to jsp writing) to send the file, then get another new response to 
perform a redirect
Basically I want to be able to do something like

the form submits, and passes to the applications perform methods through 
the jsp catching the submit
response = new Response
response.sendFile
response = new Response
response.sendRedirect
(yes I know those are not actual methods and classes, just trying to 
explain what I want)
Your understanding of how, exactly, the http protocol works is 
incorrect.  Because it is a (single) request, (single) response protocol, 
what you're asking for cannot be done.

It seems like what you want is for a user to fill out a form, click 
submit, then be presented with a new, fresh, form again ... with the file 
download on the side.  If you have determined that you absolutely want 
this behavior (it's atypical, so doing it won't be particularly robust), 
consider programmatically opening another browser window on form submit 
from which the download will happen ... and reload your form in your 
"main" browser window.  This will, of course, subject you to any 
headaches associated with javascipt window opening.

justin

______
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: how to deny .jsp execution within an upload directory

2004-10-29 Thread Justin Ruthenbeck
For robust installations, this problem is a non-issue due to JSP 
precompilation.  Everyone's situation is different, of course, but it is 
generally much more secure to precompile your JSPs and disable the 
dynamic compilation of new ones.

justin
At 03:25 PM 10/29/2004, you wrote:
The easiest way to do this would be to create a filter on that 
directory. The filter would either deny access - of it would get the 
default servlet via the ServletContext.getNamedDispatcher() and then 
perform a forwards().

-Tim
Chris Lawder wrote:
Hello,
Can somebody please point me to documentaion and examples that describe 
how to disallow the execution of .jsp or any other scripts/binaries 
within a single directory of a webapplication? Part of the web app, is 
being allowed to upload reports which can then be read and downloaded 
by another. At this time I can upload a .jsp file and it will run in 
that directory.
I have found much stuff on SecurityManager and syntax within the 
catalina.policy file but nothing yet that really explains to me what I 
need to do to accomplish what I described above. My attempts so far at 
proper catalina.policy systax have not worked.
This is a pure tomcat environment running Tomcat 4.1.30 at this time.
Other comments regarding the proper use of an upload directory and it's 
security are welcome.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

______
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: request.getSession(false) randomly returns null in servlet

2004-10-12 Thread Justin Ruthenbeck
Mark,
Check the session id that is included in the request 
(getRequestedSessionId) and verify that this sessionid is ALWAYS 
identical to the one used when the session was created.  More than 
likely, you'll find this is not the case.  If you're convinced that the 
sessionid is found at one moment and not at another, try to find a way to 
reproduce it and then post that to the list.

There's a 99% chance something is wrong with your code and/or the 
client's response causing the behavior you're seeing.  The fact that 
you're seeing it with one particular servlet (presumably one type of use 
case) makes it even more likely.

justin
At 09:14 AM 10/12/2004, you wrote:
Hi David,
Thanks for reply but I guess I need something else. All answers to
your suggested situation are negative. Answers included in your
message.
--- David Wall <[EMAIL PROTECTED]> wrote:
> Is it possible that your session has ended (too long between
> requests)?
nope, another servlet get session with no problem. and after few
minutes servlet is null problem just works fine.
> Check how long you have configured sessions to be active (in
> web.xml).  Is
> it possible you are losing the encoded session ids (if cookies are
> not being
> used)? It's easy to miss an encoded URL on a page for get/post and
> thus lose
> the session id on the next request.  Then again, I've seen bugs
> before in
> which cookies are quite reliable, but encoded URLs don't always
> seem to
> work.
I do encode URL just in case, but Cookie is used on client
side(browser). When I look at the source page URL is not encoded.
>
> David
>
Any other ideas?
> - Original Message -
> From: "Mark" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, October 12, 2004 8:36 AM
> Subject: request.getSession(false) randomly returns null in servlet
>
>
> > Hi All,
> > I have unstable behavior in my web application when I try to get
> > HttpSession.
> > The problem is that the following code randomly returns _null_
> for
> > HttpSession.
> >
> > But next http request from different servlet using the same code
> is
> > fine. and when I call servlet with problem I've got null again.
> > Interesting, that if I wait for few minutes, this problem does
> not
> > exists: I'm getting a session object with no problems
> > Here the code:
> >
> > -- cut --
> > public void doPost( HttpServletRequest req, HttpServletResponse
> resp
> > )
> >   throws IOException, ServletException
> >   {
> > String cPath = req.getContextPath();
> > HttpSession ses = req.getSession(false);
> > /* ... ses is null sometimes ;(*/
> > 
> > - end cut 
> >
> >
> > Please note that I use req.getSession(true) in the login servlet
> and
> > DO know that session is created.
> >
> > Tech spec:
> >  Software: tomcat 5.0.24 on Redhat FS2
> >  Hardware: AMD 2700+, 512Mb, 120 GB HDD.
> >
> >
> > Any comments and suggestions are welcome.
> >
> > Thanks,
> > Mark.
> >
> >
> >
> >
> > __
> > Do you Yahoo!?
> > Take Yahoo! Mail with you! Get it on your mobile phone.
> > http://mobile.yahoo.com/maildemo
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
>
-----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>

__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Webapp upgrades and browser caching

2004-10-07 Thread Justin Ruthenbeck
Wade,
Thanks for your comments.
By adding the  expires tag, it sounds like you setting the system 
up to schedule the upgrade.  By this, I mean that you know you're gonna 
upgrade a week from today, so you configure Apache to suggest that all 
content should expire at that time.  Sounds reasonable.

In our situation, we have our webapps installed offsite in clients' 
facilities, so all/most of the upgrade process needs to be fool-proof... 
reconfiguring Apache 1 week (or whatever) before the upgrade isn't really 
an option.  Aside from this, any more idea about how to handle this?

Thanks,
justin

For static web pages you can use a tag like this:

If the browsers still have a problem you might be able to configure 
Apache to output a header will all content called EXPIRES.  I think you 
can if I remember right from some docs I read.  You will have to look at 
Apache for that.  I'm not sure about tomcat being able to handle that or 
not, but the apache bit should prepend the header I believe.  The only 
other way would be to output all images and static pages from a servlet 
of some kind and add the header yourself to the request.  Browsers 
should honor that tag or header for all images down the line from your 
html or jsp pages, but may not.

Some browsers may be able to be set to ignore this all together 
though.  Sometimes it is even worse than that.  I have seen ISP's who 
think they are slick who install a cache in their systems, and they 
basically become a proxy for the users.  If they are ignoring such 
things your users would have to contact them.  I have seen some who do 
this for different protocols even http and https differently.  That one 
irked me pretty good.

Anyways, I use expires in all my jsp and html files.  I haven't ever 
tried the other stuff for the headers from Apache, but think I remember 
reading about it in the Apache docs.  I have output that header from 
servlets and ISAPI dlls before.

Someone else may be able to offer more help.
Wade

At 11:21 AM 10/7/2004, you wrote:
Justin Ruthenbeck wrote:
I'm looking for some advice about how to handle the following situation.
(1) Apache 2.x in front of Tomcat 5.x
(2) Deploy new web application.  Bunch of servlets, bunch of jsps, 
bunch of static content (mainly js, css).
(3) Many users use the application, during which time their browsers 
cache lots of static content
(4) We do a major version upgrade of the webapp, including (almost) all 
new static content, but URLs stay the same (to alleviate 
bookmark-maintenance requirements).
The problem arises when the browsers continue to use their cached 
version of the static content.  Now, the browsers eventually get 
updated, but immediately after deployment there are huge numbers of 
graphical and functional (js files) problems.  It seems like behavior 
in this area is widely different amongst browsers and/or their settings.
I have only come up with the following option:
(1) Play with URLs.  New deployments can be deployed under
a different url domain like:
http://www.server.com/myapp/v1/main.css
http://www.server.com/myapp/v2/main.css
This would force browsers to get new content since the
content appears as totally new content to the browser.
Aside from disabling static content caching, are there any other 
options out there?
Much thanks for the help!
justin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[OT] Webapp upgrades and browser caching

2004-10-07 Thread Justin Ruthenbeck
I'm looking for some advice about how to handle the following situation.
(1) Apache 2.x in front of Tomcat 5.x
(2) Deploy new web application.  Bunch of servlets, bunch of jsps, bunch 
of static content (mainly js, css).
(3) Many users use the application, during which time their browsers 
cache lots of static content
(4) We do a major version upgrade of the webapp, including (almost) all 
new static content, but URLs stay the same (to alleviate 
bookmark-maintenance requirements).

The problem arises when the browsers continue to use their cached version 
of the static content.  Now, the browsers eventually get updated, but 
immediately after deployment there are huge numbers of graphical and 
functional (js files) problems.  It seems like behavior in this area is 
widely different amongst browsers and/or their settings.

I have only come up with the following option:
(1) Play with URLs.  New deployments can be deployed under
a different url domain like:
http://www.server.com/myapp/v1/main.css
http://www.server.com/myapp/v2/main.css
This would force browsers to get new content since the
content appears as totally new content to the browser.
Aside from disabling static content caching, are there any other options 
out there?

Much thanks for the help!
justin

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cluster Pure Tomcat with Hardware Load Balancer

2004-10-04 Thread Justin Ruthenbeck
Mitchell,
Pur Tomcat clustering is most robustly supported in the 5.x branch (a 
backport to 4.1.x was done, but you'll have a harder time getting help 
with that).  Info can be found off of the 5.0.x docs page:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html
justin
At 03:09 PM 10/4/2004, you wrote:
Hello to the group - I am desperately searching for information about
clustering Tomcat 5 in a "pure" environment without Apache in front of 
it. I
have a hardware load balancer in front of two Tomcat servers that I want 
to
join in a cluster in order to avoid/reduce broken shopping cart sessions
experienced by customers coming from so-called megaproxy ISPs like AOL.
Since we can't depend on SSL session ID via the hardware load balancer
(thanks to Microsoft IE5+) we believe that we must make clustering work. 
The
problem is scarce/non-existent web documentation of Tomcat Clustering.

Any help is appreciated.
MitchellT

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

______
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat Question - HELP

2004-10-01 Thread Justin Jaynes
Daniel,

You really SHOULD care.  I just started a web hosting
business on the Linux platform using Tomcat.  I had no
prior experience using the software and I have read as
much as I can in books, but they are always out of
date, even when new.  Press time is always too long. 
Open source just keeps getting better so much faster. 
So an open community forum with the WRITERS of the
software is a MODERN MIRACLE.  This forum, and Yoav,
have been invaluble resources to me.  No propiretary
software provider would EVER be willing to provide
such support.  They aren't smart enough and they don't
care enough.

So if you want, stick with your proprietary solutions
and your "Technical Support Staff" (untrained
teenagers and non-english speakers reading general
answers to your not-so-general questions).  But don't
disreguard the ADVICE my friend Yoav gave you on HOW
TO USE THE RESOURSE he has offered to you FREE OF
CHARGE as a common human courtesy.  Listen to him.  He
knows how to help you help yourself.

Justin Jaynes

--- [EMAIL PROTECTED] wrote:

> I really don't care what your personal views are.  I
> am not a decision 
> maker here. We use apache/tomcat for non-mission
> critical app.
> Actually we don't have a choice because the vendor
> who wrote the code 
> bundled everything with all those open source stuff.
> 
> Why don't we make this forum simple.  If you are
> willing help,  just focus 
> on helping to address specific technical issues and
> not
> express your personal opinions about things that are
> not relevant like 
> attacking somebody's technical know-how, etc.(not
> you but one of those who 
> reply to my posting). Like KISS...keep it simple and
> straight to the 
> point.
> 
> I didn't post the log because I am 99.99 sure that
> will only see a clean 
> startup message and nothing else.  We actually
> replicated the issue and 
> killing a tomcat PID, sometimes does not release the
> port it is listening 
> to/or using. I killed the tomcat PID, clear port
> 8080 and make sure 
> nothing else is using it or holding it and restarted
> tomcat with my rc2.d 
> script that calls catalina.sh and it solved my
> issue. I got that idea from 
> one of the good replies I got for this particular
> issue.
> 
> My 2 cents.
> 
> 
> Daniel Salud
> (310)665-6583
> 
> 
> 
> 
> "Shapira, Yoav" <[EMAIL PROTECTED]>
> 10/01/2004 11:49 AM
> Please respond to "Tomcat Users List"
> 
>  
> To: "Tomcat Users List"
> <[EMAIL PROTECTED]>
> cc: 
> Subject:RE: Tomcat Question - HELP
> 
> 
> 
> Hi,
> Personally, I'd take this support list over any
> commercial support
> organization, hands down.  But that's just my
> personal experience as
> someone who's had to make that decision (commercial
> versus open-source,
> paid support versus community support, dedicated
> support staff versus
> outsourced, etc.), and live with the consequences,
> many times over the
> years, and YMMV ;)
> 
> In this specific case, no commercial support
> organization would be able
> to help you more given the negligible information
> content you posted.
> Instead, you'd be dragged along until you posted
> your logs and/or
> provided steps to reproduce the problem, and be
> charged according to
> your support agreement, so at least you'll have the
> satisfaction of
> knowing your $$$ spent on support aren't being
> completely wasted, only
> mostly wasted.
> 
> If the problem happens again, and you provide more
> details, the
> probability of you getting concrete help is higher
> than with the scant
> details provided in your original post.
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> 
> >-Original Message-
> >From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> >Sent: Friday, October 01, 2004 1:01 PM
> >To: Tomcat Users List
> >Subject: RE: Tomcat Question - HELP
> >
> >I know all those. I already have our web engineer
> looked at it and he
> >found nothing from the log so I wouldn't post the
> log.
> >I guess between you and my web engineer, I will
> trust his judgement.
> >
> >I am hoping that somebody has seen something like
> this before and would
> >share what they did. Have you?
> >That's one of the issues with open source as you
> already know. No
> support
> >so sometimes you have to rely on
> >user forums for open source stuff.
> >
> >Thanks anyway.
> >
> >Daniel Salud
> >(310)665-6583
> >
> >
> >
> >
> >Gerardo Ju

Re: Allowing users of web app to upload files

2004-09-23 Thread Justin Jaynes
No, in fact I didn't see it.  Thank you.  If I have
any specific questions after reading it, I will ask.

Thank you so much.

Justin Jaynes

--- QM <[EMAIL PROTECTED]> wrote:

> On Thu, Sep 23, 2004 at 12:14:18PM -0700, Justin
> Jaynes wrote:
> : So my question:  How do I USE the fileupload
> Commons
> : package?  I don't see any instructions with the
> : COMMONS packages.
> 
> I take it, then, you didn't see this?
>
http://jakarta.apache.org/commons/fileupload/using.html
> 
> If you did read it, then what are your specific
> questions?
> 
> -QM
> 
> -- 
> 
> software  -- http://www.brandxdev.net
> tech news -- http://www.RoarNetworX.com
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Allowing users of web app to upload files

2004-09-23 Thread Justin Jaynes
I just realized I misspelled Yoav's name in my earlier
question.  My appologies Yoav.

So my question:  How do I USE the fileupload Commons
package?  I don't see any instructions with the
COMMONS packages.

Thanks for the quick directions in response to my
problem.  However, I am not familiar with the COMMONS
project.  I admit that I have a difficult time
understanding how to implement other peoples
programming in a way that it works with mine.  I know
how to use my own, because I wrote it.  So I am at the
stage in my programming 'carreer' that I need to learn
how to tie in other work with my own.  If someone
could answer my fileupload Commons question directly,
that would be nice.  Pointing me in the proper
direction to LEARN how to use it would be useful as
well.

Justin Jaynes


--- Tim Funk <[EMAIL PROTECTED]> wrote:

> See http://jakarta.apache.org/commons/fileupload/
> 
> -Tim
> 
> Justin Jaynes wrote:
> > Well,
> > 
> > As Yaov said this list was ok for JSP development,
> > here I go.
> > 
> > I am having a great time using Tomcat on SuSE 9.1
> with
> > SSL and all is working fine.
> > 
> > I would like users of my web applications to be
> able
> > to upload image files to directories that Tomcat
> is
> > serving files out of.  This must happen THROUGH
> the
> > web application.
> > 
> > Therefore I have two questions:
> > 
> > 1.  How would I get a file off a remote users hard
> > drive (which they specify by typing the file name
> and
> > location into a text box in a form) to move to my
> > server and be renamed (using my own file naming
> > convention)?
> > 
> > 2.  How do you open a Browse File dialog box in a
> web
> > browser (I would guess this would be easily done
> using
> > Java Script.  may not be an appropriate question
> here,
> > so only answer if you happen to have the answer on
> > hand)  If possible, pointing me to a location on
> the
> > web where this is done and the script is readily
> > apparent, would be a fine answer.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Allowing users of web app to upload files

2004-09-21 Thread Justin Jaynes
Well,

As Yaov said this list was ok for JSP development,
here I go.

I am having a great time using Tomcat on SuSE 9.1 with
SSL and all is working fine.

I would like users of my web applications to be able
to upload image files to directories that Tomcat is
serving files out of.  This must happen THROUGH the
web application.

Therefore I have two questions:

1.  How would I get a file off a remote users hard
drive (which they specify by typing the file name and
location into a text box in a form) to move to my
server and be renamed (using my own file naming
convention)?

2.  How do you open a Browse File dialog box in a web
browser (I would guess this would be easily done using
Java Script.  may not be an appropriate question here,
so only answer if you happen to have the answer on
hand)  If possible, pointing me to a location on the
web where this is done and the script is readily
apparent, would be a fine answer.





__
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Know of a group for JSP development?

2004-09-20 Thread Justin Jaynes
I realize this group is NOT for JSP development
questions.  Does anyone know of such a group?

I have exhausted my books in looking for answers and
would like to chat with other JSP developers.

My appreciation for all this list has already done for
me.

Justin Jaynes



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Question about creating new HttpSessions

2004-09-16 Thread Justin Ruthenbeck
At 12:24 PM 9/16/2004, you wrote:
Shapira, Yoav said:
>
> Hi,
> Why don't you want to invalidate the old one?
Mainly because the case that brought up this problem is the tester
using the File->New->New window command, then browsing to a
bookmarked URL for the login page.  They need to be able to
continue using the old session in the old window, and the new
session in the new window.
Note that most browsers use the same cookie-set if you do a 
"File->New->New Window" command, but use a new cookie-set if you simply 
start them in another process (for Windows that means clicking on the 
icon again to launch a new browser instance).

Try it with whatever browser you're using to test (varies by browser, but 
all that I've used have a similar way to accomplish this), but solving 
the problem this way would be much, much, much easier than asking your 
app to do something it's not "supposed" to do.

justin

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: porting to tomcat 5

2004-09-14 Thread Justin Kennedy
Please note, these jsps and tag library were written on the servlet/jsp
2.2/1.1 spec, so I don't think this stuff was available at that time (I
maybe be wrong though).

Anyway, about the storevalue tag: it takes the value of the column in
the sql resultset identified by "transactId" and writes it to the output
stream. But this doesn't really matter, because if you look at the JSP
then see what tomcat generates, there's obviously an error in the way
Tomcat is handling this case. 

In fact I changed the storeValue tag to our storeRowCount, which creates
a variable like storeValue except it stores the row count for the
results from a particular sql transaction. However I still had the same
result... Tomcat doesn't define the variable in the second if block.

Thanks for the help.

-Original Message-
From: Big Chiz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 14, 2004 9:17 PM
To: Tomcat Users List
Subject: Re: porting to tomcat 5

although i didnt understand what the 

   



   


On Tue, 14 Sep 2004 13:41:13 -0400, Shapira, Yoav <[EMAIL PROTECTED]>
wrote:
> 
> Hi,
> No, your question is fine.  Perhaps no one knows or all the people who
> know the answer don't have time today.  That happens occasionally...
> 
> Yoav Shapira
> Millennium Research Informatics
> 
> 
> 
> 
> >-Original Message-
> >From: Justin Kennedy [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, September 14, 2004 1:38 PM
> >To: 'Tomcat Users List'
> >Subject: RE: porting to tomcat 5
> >
> >Hi,
> >
> >I'm new to this mailing list, so I'm thinking I didn't ask this
> question
> >properly or did something wrong because I never had a response. Maybe
I
> >posted too much code?
> >
> >Thanks,
> >-Justin
> >
> >-Original Message-
> >From: Justin Kennedy [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, September 14, 2004 1:31 AM
> >To: [EMAIL PROTECTED]
> >Subject: porting to tomcat 5
> >
> >Hi,
> >
> >
> >
> >The following JSP/Tag snippet used to work on the 2.2 spec for Resin
> and
> >I believe Tomcat as well. Note: the storeValue tag creates a new
string
> >variable for the id attribute from the sql result set specified in
> >transactId and column:
> >
> >
> >
> ><% if ((request.getParameter("mode").equals("SearchContacts"))){
%>
> >
> > >transactId="accountSearchPersonal"/>
> >
> ><% } else
> if(request.getParameter("mode").equals("SelectPersonal")){
> >%>
> >
> > >transactId="accountSelectPersonal"/>
> >
> ><% } %>
> >
> >
> >
> >The error points to the second storevalue tag and claims the
"tmpEmail"
> >is an "unresolved symbol". I looked at the code generated by Tomcat
and
> >I see the following. Notice the tmpEmail variable isn't defined in
the
> >second block:
> >
> >
> >
> >Here's the code produced in the Tomcat version:
> >
> > if ((request.getParameter("mode").equals("SearchContacts"))){
> >
> >  //  trans:storeValue
> >
> >  java.lang.String tmpEmail = null;
> >
> >  quicksetit.tags.transaction.StoreValueTag
> >_jspx_th_trans_storeValue_0 = new
> >quicksetit.tags.transaction.StoreValueTag();
> >
> >
> >_jspx_th_trans_storeValue_0.setPageContext(_jspx_page_context);
> >
> >
> >_jspx_th_trans_storeValue_0.setParent((javax.servlet.jsp.tagext.Tag)
> >_jspx_th_logic_exists_0);
> >
> >  _jspx_th_trans_storeValue_0.setId("tmpEmail");
> >
> >  _jspx_th_trans_storeValue_0.setColumn("cont_email");
> >
> >
> >_jspx_th_trans_storeValue_0.setTransactId("accountSearchPersonal");
> >
> >  int _jspx_eval_trans_storeValue_0 =
> >_jspx_th_trans_storeValue_0.doStartTag();
> >
> >  tmpEmail = (java.lang.String)
> >_jspx_page_context.findAttribute("tmpEmail");
> >
> >  if (_jspx_th_trans_storeValue_0.doEndTag() ==
> >javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
> >
> >return;
> >
> >  tmpEmail = (java.lang.String)
> >_jspx_page_context.findAttribute("tmpEmail");
> >
> >} else if(request.getParameter("mode").equals("SelectPersonal")){
> >
> >  //  trans:storeValue
> >
> >  quicksetit.tags.transaction.StoreValueTag
&

RE: porting to tomcat 5

2004-09-14 Thread Justin Kennedy
Hi,

I'm new to this mailing list, so I'm thinking I didn't ask this question
properly or did something wrong because I never had a response. Maybe I
posted too much code?

Thanks,
-Justin

-Original Message-----
From: Justin Kennedy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 14, 2004 1:31 AM
To: [EMAIL PROTECTED]
Subject: porting to tomcat 5

Hi,

 

The following JSP/Tag snippet used to work on the 2.2 spec for Resin and
I believe Tomcat as well. Note: the storeValue tag creates a new string
variable for the id attribute from the sql result set specified in
transactId and column:

 

<% if ((request.getParameter("mode").equals("SearchContacts"))){ %>



<% } else if(request.getParameter("mode").equals("SelectPersonal")){
%>



<% } %>

 

The error points to the second storevalue tag and claims the "tmpEmail"
is an "unresolved symbol". I looked at the code generated by Tomcat and
I see the following. Notice the tmpEmail variable isn't defined in the
second block:

 

Here's the code produced in the Tomcat version:

 if ((request.getParameter("mode").equals("SearchContacts"))){

  //  trans:storeValue

  java.lang.String tmpEmail = null;

  quicksetit.tags.transaction.StoreValueTag
_jspx_th_trans_storeValue_0 = new
quicksetit.tags.transaction.StoreValueTag();

 
_jspx_th_trans_storeValue_0.setPageContext(_jspx_page_context);

 
_jspx_th_trans_storeValue_0.setParent((javax.servlet.jsp.tagext.Tag)
_jspx_th_logic_exists_0);

  _jspx_th_trans_storeValue_0.setId("tmpEmail");

  _jspx_th_trans_storeValue_0.setColumn("cont_email");

 
_jspx_th_trans_storeValue_0.setTransactId("accountSearchPersonal");

  int _jspx_eval_trans_storeValue_0 =
_jspx_th_trans_storeValue_0.doStartTag();

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

  if (_jspx_th_trans_storeValue_0.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

return;

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

} else if(request.getParameter("mode").equals("SelectPersonal")){

  //  trans:storeValue

  quicksetit.tags.transaction.StoreValueTag
_jspx_th_trans_storeValue_1 = new
quicksetit.tags.transaction.StoreValueTag();

 
_jspx_th_trans_storeValue_1.setPageContext(_jspx_page_context);

 
_jspx_th_trans_storeValue_1.setParent((javax.servlet.jsp.tagext.Tag)
_jspx_th_logic_exists_0);

  _jspx_th_trans_storeValue_1.setId("tmpEmail");

  _jspx_th_trans_storeValue_1.setColumn("cont_email");

 
_jspx_th_trans_storeValue_1.setTransactId("accountSelectPersonal");

  int _jspx_eval_trans_storeValue_1 =
_jspx_th_trans_storeValue_1.doStartTag();

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

  if (_jspx_th_trans_storeValue_1.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

return;

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

}

 

Thanks for the help!!

 

-Justin

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



porting to tomcat 5

2004-09-13 Thread Justin Kennedy
Hi,

 

The following JSP/Tag snippet used to work on the 2.2 spec for Resin and
I believe Tomcat as well. Note: the storeValue tag creates a new string
variable for the id attribute from the sql result set specified in
transactId and column:

 

<% if ((request.getParameter("mode").equals("SearchContacts"))){ %>



<% } else if(request.getParameter("mode").equals("SelectPersonal")){
%>



<% } %>

 

The error points to the second storevalue tag and claims the "tmpEmail"
is an "unresolved symbol". I looked at the code generated by Tomcat and
I see the following. Notice the tmpEmail variable isn't defined in the
second block:

 

Here's the code produced in the Tomcat version:

 if ((request.getParameter("mode").equals("SearchContacts"))){

  //  trans:storeValue

  java.lang.String tmpEmail = null;

  quicksetit.tags.transaction.StoreValueTag
_jspx_th_trans_storeValue_0 = new
quicksetit.tags.transaction.StoreValueTag();

 
_jspx_th_trans_storeValue_0.setPageContext(_jspx_page_context);

 
_jspx_th_trans_storeValue_0.setParent((javax.servlet.jsp.tagext.Tag)
_jspx_th_logic_exists_0);

  _jspx_th_trans_storeValue_0.setId("tmpEmail");

  _jspx_th_trans_storeValue_0.setColumn("cont_email");

 
_jspx_th_trans_storeValue_0.setTransactId("accountSearchPersonal");

  int _jspx_eval_trans_storeValue_0 =
_jspx_th_trans_storeValue_0.doStartTag();

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

  if (_jspx_th_trans_storeValue_0.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

return;

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

} else if(request.getParameter("mode").equals("SelectPersonal")){

  //  trans:storeValue

  quicksetit.tags.transaction.StoreValueTag
_jspx_th_trans_storeValue_1 = new
quicksetit.tags.transaction.StoreValueTag();

 
_jspx_th_trans_storeValue_1.setPageContext(_jspx_page_context);

 
_jspx_th_trans_storeValue_1.setParent((javax.servlet.jsp.tagext.Tag)
_jspx_th_logic_exists_0);

  _jspx_th_trans_storeValue_1.setId("tmpEmail");

  _jspx_th_trans_storeValue_1.setColumn("cont_email");

 
_jspx_th_trans_storeValue_1.setTransactId("accountSelectPersonal");

  int _jspx_eval_trans_storeValue_1 =
_jspx_th_trans_storeValue_1.doStartTag();

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

  if (_jspx_th_trans_storeValue_1.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)

return;

  tmpEmail = (java.lang.String)
_jspx_page_context.findAttribute("tmpEmail");

}

 

Thanks for the help!!

 

-Justin

 



RE: tag reuse, setParent and findAncestorWithClass

2004-09-07 Thread Justin Kennedy
Thanks Tim, I got it working!

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 10:07 AM
To: Tomcat Users List
Subject: Re: tag reuse, setParent and findAncestorWithClass

Turn off tag pooling.

-Tim

Justin Kennedy wrote:

> Hi Tim,
> 
> I read through the link you posted but I don't see any references to
> setParent. I understand that setParent is only called once when the
> attributes for a tag are the same (because it's reused), so how should
I
> go about developing the inner tag so the parent will always be set? I
> read up on SimpleTag and that could be the answer, but I'm worried
about
> performance with this because the writevalue tag is called many many
> times on one page.
> 
> Thanksk
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 07, 2004 7:59 AM
> To: Tomcat Users List
> Subject: Re: tag reuse, setParent and findAncestorWithClass
> 
> http://jakarta.apache.org/tomcat/faq/misc.html#tagbroken
> 
> -tim
> 
> Justin Kennedy wrote:
> 
>>Hi,
>>
>> 
>>
>>I'm upgrading our tag library to Tomcat 5 and having problems. Note
> 
> that
> 
>>they were written back in JSP 1.1 and haven't changed for a few years.
>>
>> 
>>
>>The problem looks like the tags are being cached and the setParent
> 
> isn't
> 
>>being called for each new "reuse". As a result the wrong tag is
> 
> returned
> 
>>from findAncestorWithClass when the WriteValueTag is re-used in a
>>different nested block. Maybe this is how the spec was designed and I
>>just don't know the right way to code the tags. Anyway here's what the
>>JSP page looks like (note: transacttag issues a call to the database.
>>Writevaluetag writes the value of a column from the data returned from
>>transacttag. If 'transactId' isn't passed to WriteValueTag, it will
> 
> use
> 
>>the findAncestorWithClass to find the enclosing IterateTag to
> 
> determine
> 
>>the transactId):
>>
>> 
>>
>>
>>
>>
>>
>>  
>>
>>a - 
>>
>>
>>
>> 
> value='<%=
> 
>>tmpuiid %>'/>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>#1 - 
>>
>>#2 - >column="FORM_NAME"/>
>>
>>#3 - 
>>
>>
>>
>>
>>
>>  
>>
>>
>>
>> 
>>
>> 
>>
>>The problems:
>>
>>1.UI_NAME in #1 is a column from the first "uis" transactTag. The
>>writeValueTag prints out the value of this column but it shouldn't
>>behave this way because it's enclosed IterateTag has a different
>>"transactId". I put this here to demonstrate the problem
>>2.FORM_NAME in #3 is a column in the second transactTag of "ui".
>>This column value SHOULD be output (like it has always done) because
> 
> the
> 
>>enclosed iterateTag specifies the proper transactId, but this value is
>>not output because it's parent is set to the first IterateTag and not
>>the second, hence the different transactIds.
>>
>> 
>>
>>#2 works only because I'm explicitly setting the transactId. 
>>
>> 
>>
>>The WriteValueTag extends the TagSupport class and everything is done
> 
> in
> 
>>the doStartTag event.
>>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tag reuse, setParent and findAncestorWithClass

2004-09-07 Thread Justin Kennedy
Tim,

I added this to my tomcat_home/conf/web.xml:


jsp
 
org.apache.jasper.servlet.JspServlet

enablePooling
false



I put it right after:


But I still see the same behavior. Note: This setting is not overridden
in the web.xml for my webapp... I tried putting it there too but no
luck.

Thanks

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 10:07 AM
To: Tomcat Users List
Subject: Re: tag reuse, setParent and findAncestorWithClass

Turn off tag pooling.

-Tim

Justin Kennedy wrote:

> Hi Tim,
> 
> I read through the link you posted but I don't see any references to
> setParent. I understand that setParent is only called once when the
> attributes for a tag are the same (because it's reused), so how should
I
> go about developing the inner tag so the parent will always be set? I
> read up on SimpleTag and that could be the answer, but I'm worried
about
> performance with this because the writevalue tag is called many many
> times on one page.
> 
> Thanksk
> 
> -Original Message-
> From: Tim Funk [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 07, 2004 7:59 AM
> To: Tomcat Users List
> Subject: Re: tag reuse, setParent and findAncestorWithClass
> 
> http://jakarta.apache.org/tomcat/faq/misc.html#tagbroken
> 
> -tim
> 
> Justin Kennedy wrote:
> 
>>Hi,
>>
>> 
>>
>>I'm upgrading our tag library to Tomcat 5 and having problems. Note
> 
> that
> 
>>they were written back in JSP 1.1 and haven't changed for a few years.
>>
>> 
>>
>>The problem looks like the tags are being cached and the setParent
> 
> isn't
> 
>>being called for each new "reuse". As a result the wrong tag is
> 
> returned
> 
>>from findAncestorWithClass when the WriteValueTag is re-used in a
>>different nested block. Maybe this is how the spec was designed and I
>>just don't know the right way to code the tags. Anyway here's what the
>>JSP page looks like (note: transacttag issues a call to the database.
>>Writevaluetag writes the value of a column from the data returned from
>>transacttag. If 'transactId' isn't passed to WriteValueTag, it will
> 
> use
> 
>>the findAncestorWithClass to find the enclosing IterateTag to
> 
> determine
> 
>>the transactId):
>>
>> 
>>
>>
>>
>>
>>
>>  
>>
>>a - 
>>
>>
>>
>> 
> value='<%=
> 
>>tmpuiid %>'/>
>>
>>
>>
>> 
>>
>>
>>
>>
>>
>>#1 - 
>>
>>#2 - >column="FORM_NAME"/>
>>
>>#3 - 
>>
>>
>>
>>
>>
>>  
>>
>>
>>
>> 
>>
>> 
>>
>>The problems:
>>
>>1.UI_NAME in #1 is a column from the first "uis" transactTag. The
>>writeValueTag prints out the value of this column but it shouldn't
>>behave this way because it's enclosed IterateTag has a different
>>"transactId". I put this here to demonstrate the problem
>>2.FORM_NAME in #3 is a column in the second transactTag of "ui".
>>This column value SHOULD be output (like it has always done) because
> 
> the
> 
>>enclosed iterateTag specifies the proper transactId, but this value is
>>not output because it's parent is set to the first IterateTag and not
>>the second, hence the different transactIds.
>>
>> 
>>
>>#2 works only because I'm explicitly setting the transactId. 
>>
>> 
>>
>>The WriteValueTag extends the TagSupport class and everything is done
> 
> in
> 
>>the doStartTag event.
>>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: tag reuse, setParent and findAncestorWithClass

2004-09-07 Thread Justin Kennedy
Hi Tim,

I read through the link you posted but I don't see any references to
setParent. I understand that setParent is only called once when the
attributes for a tag are the same (because it's reused), so how should I
go about developing the inner tag so the parent will always be set? I
read up on SimpleTag and that could be the answer, but I'm worried about
performance with this because the writevalue tag is called many many
times on one page.

Thanksk

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 07, 2004 7:59 AM
To: Tomcat Users List
Subject: Re: tag reuse, setParent and findAncestorWithClass

http://jakarta.apache.org/tomcat/faq/misc.html#tagbroken

-tim

Justin Kennedy wrote:
> Hi,
> 
>  
> 
> I'm upgrading our tag library to Tomcat 5 and having problems. Note
that
> they were written back in JSP 1.1 and haven't changed for a few years.
> 
>  
> 
> The problem looks like the tags are being cached and the setParent
isn't
> being called for each new "reuse". As a result the wrong tag is
returned
> from findAncestorWithClass when the WriteValueTag is re-used in a
> different nested block. Maybe this is how the spec was designed and I
> just don't know the right way to code the tags. Anyway here's what the
> JSP page looks like (note: transacttag issues a call to the database.
> Writevaluetag writes the value of a column from the data returned from
> transacttag. If 'transactId' isn't passed to WriteValueTag, it will
use
> the findAncestorWithClass to find the enclosing IterateTag to
determine
> the transactId):
> 
>  
> 
> 
> 
> 
> 
>   
> 
> a - 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> 
> 
> 
> #1 - 
> 
> #2 -  column="FORM_NAME"/>
> 
> #3 - 
> 
> 
> 
> 
> 
>   
> 
> 
> 
>  
> 
>  
> 
> The problems:
> 
> 1.UI_NAME in #1 is a column from the first "uis" transactTag. The
> writeValueTag prints out the value of this column but it shouldn't
> behave this way because it's enclosed IterateTag has a different
> "transactId". I put this here to demonstrate the problem
> 2.FORM_NAME in #3 is a column in the second transactTag of "ui".
> This column value SHOULD be output (like it has always done) because
the
> enclosed iterateTag specifies the proper transactId, but this value is
> not output because it's parent is set to the first IterateTag and not
> the second, hence the different transactIds.
> 
>  
> 
> #2 works only because I'm explicitly setting the transactId. 
> 
>  
> 
> The WriteValueTag extends the TagSupport class and everything is done
in
> the doStartTag event.
> 
>  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tag reuse, setParent and findAncestorWithClass

2004-09-06 Thread Justin Kennedy
Hi,

 

I'm upgrading our tag library to Tomcat 5 and having problems. Note that
they were written back in JSP 1.1 and haven't changed for a few years.

 

The problem looks like the tags are being cached and the setParent isn't
being called for each new "reuse". As a result the wrong tag is returned
from findAncestorWithClass when the WriteValueTag is re-used in a
different nested block. Maybe this is how the spec was designed and I
just don't know the right way to code the tags. Anyway here's what the
JSP page looks like (note: transacttag issues a call to the database.
Writevaluetag writes the value of a column from the data returned from
transacttag. If 'transactId' isn't passed to WriteValueTag, it will use
the findAncestorWithClass to find the enclosing IterateTag to determine
the transactId):

 





  

a - 







 





#1 - 

#2 - 

#3 - 





  



 

 

The problems:

1.  UI_NAME in #1 is a column from the first "uis" transactTag. The
writeValueTag prints out the value of this column but it shouldn't
behave this way because it's enclosed IterateTag has a different
"transactId". I put this here to demonstrate the problem
2.  FORM_NAME in #3 is a column in the second transactTag of "ui".
This column value SHOULD be output (like it has always done) because the
enclosed iterateTag specifies the proper transactId, but this value is
not output because it's parent is set to the first IterateTag and not
the second, hence the different transactIds.

 

#2 works only because I'm explicitly setting the transactId. 

 

The WriteValueTag extends the TagSupport class and everything is done in
the doStartTag event.

 

Please advise,

-Justin

 



Re: Configuring Tomcat 5 to not display null value as word null

2004-08-20 Thread Justin Ruthenbeck
There is no Tomcat magic configuration parameter to make this 
happen.  Instead, take a look at HttpServletRequestWrapper.  You can 
combine that with a Filter to override the behavior of getParameter() for 
the pages that need it such that it returns "" instead of "null" when no 
such parameter value exists.

If you're unfamiliar with the above concepts, check Google, so see:
http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters-p4.html
Good luck,
justin
At 04:54 PM 8/20/2004, you wrote:
Hi,
I have the following JSP fragment:

case 1 = <%=request.getParameter("no_such_thing")%>
case 2 = ${requestScope["no_such_thing"]}

The output of the page is
...
case 1 = null
case 2 =
...
Is there any way that Tomcat can be configured to not display the word 
"null" if the value is null?  It is easy to replace the above example in 
case 1 by case 2, but in my case it is not easy to make such change to 
my existing code base (which I am migrating from another servlet engine 
that outputs null as "").  I have pages with the  
elements displaying the string "null" when there is no default value.

Thanks,
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to keep a single user session from having multiple threads?

2004-08-19 Thread Justin Ruthenbeck
I'll answer your specific question, but first let me say: In the 
situation you are describing here, the root problem is not that the same 
JSP is being run concurrently for a particular session -- it's that your 
application has been designed such that you care.  Mainstream jsp/servlet 
applications should be coded in a thread-safe manner such that data 
protection, locking, etc is provided in an appropriate way outside your 
jsp/servlet.

Now, to answer your question:
You cannot configure Tomcat to limit a session to one thread.  What you 
really need to do is limit a single client (in a given session) from 
making two requests to the same JSP.  Code your client this way, then add 
logic (in a filter, I'd suggest) to enforce the restriction.  Doing this 
will work, but you'll find that you're swimming upstream against the 
spirit of the servlet spec, so keep that in mind.

If your only concern is one of resource usage (that's what your email 
seems to imply), then you'd be better off trying to find out why your 
clients are making two simultaneous requests or (if it's a configuration 
problem), why you've got Tomcat configured to make that happen.  If you 
want help with that, feel free to reply with more info to the list.

Good luck!
justin
At 06:04 PM 8/19/2004, you wrote:
Hello folks,
I have a situation in which 2 threads are being started in the same user
session.
Now, that in itelf is not necessarily a problem - the problem it that both
threads are executing the same JSP pages.
This still does not hurt anything as yet,(The JSPs use session variables 
so
that different users don't interfere with each other)
but in the logs (using log4j) I can see the same JSP being executed by
multiple threads simultaneously.

There is definitely no need for this.
I'd like to configure Tomcat such that it only runs one JSP at a time per
user session.
However, I am fine with having each user session start its own thread.
Can this be configured in Tomcat (one session = one thread) or is this
outside of Tomcat?
Here is an example - notice the interleaving of the threads, as they 
execute
the same JSP (ClothingBuyer.jsp)
such that Thread 10 finishes while Thread 8 is still in the middle of
working,
and remember, these are from one user session - not two users.
[Thread-10]2004-08-19 11:16:01,494 DEBUG FitMe.site.ClothingBuyer  -
Self=user1
[Thread-10]2004-08-19 11:16:01,494 DEBUG FitMe.site.ClothingBuyer  - 
Result
from query is not null, continuing
[Thread-10]2004-08-19 11:16:01,508 DEBUG FitMe.site.ClothingBuyer  - A 
user
name found: user2
[Thread-8]2004-08-19 11:16:01,516 DEBUG FitMe.site.ClothingBuyer  -
Self=user1
[Thread-8]2004-08-19 11:16:01,516 DEBUG FitMe.site.ClothingBuyer  - Result
from query is not null, continuing
[Thread-10]2004-08-19 11:16:01,519 DEBUG FitMe.site.ClothingBuyer  - A 
user
name found: userx
[Thread-8]2004-08-19 11:16:01,529 DEBUG FitMe.site.ClothingBuyer  - A user
name found: user2
[Thread-10]2004-08-19 11:16:01,530 DEBUG FitMe.site.ClothingBuyer  - A 
user
name found: user3
[Thread-10]2004-08-19 11:16:01,537 DEBUG FitMe.site.ClothingBuyer  - A 
user
name found: user4
[Thread-10]2004-08-19 11:16:01,539 DEBUG FitMe.site.ClothingBuyer  -
Finished with user list.
[Thread-8]2004-08-19 11:16:01,544 DEBUG FitMe.site.ClothingBuyer  - A user
name found: userx
[Thread-8]2004-08-19 11:16:01,550 DEBUG FitMe.site.ClothingBuyer  - A user
name found: user3
[Thread-8]2004-08-19 11:16:01,556 DEBUG FitMe.site.ClothingBuyer  - A user
name found: user4
[Thread-8]2004-08-19 11:16:01,557 DEBUG FitMe.site.ClothingBuyer  - 
Finished
with user list.

Once again, here is my goal:
I'd like to configure Tomcat such that it only runs one JSP at a time per
user session.
I am fine with having each user session start its own thread.
Can this be configured in Tomcat (one session = one thread) or is this
outside of Tomcat?
Bill Bruns
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Lead Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How can I display number of requests over the past n seconds?

2004-08-02 Thread Justin Ruthenbeck
More academic exercise than recommendation, but...
Write your own implementation of a Map/HashMap
specific to java.util.Date objects.
Identify your smallest time increment (5 seconds in your email).
Identify largest time increment (60 seconds)
Create (60/5)+1 buckets for your hash function
Write your hash function such that each date object -- representing one 
request each -- gets placed in the right bucket.  If the bucket contains 
"aged" dates, which you should know by simple counting (not comparison), 
empty it before placing a new one in.

To display results, simply add up the content size of the appropriate 
buckets and return.

This implementation is more lightweight than others suggested because the 
process of pruning is built into your implementation (instead of using 
external threads or comparisons each time you insert)... you're trading 
memory usage for decreased processing time.  On the other hand, it 
doesn't *strictly* tell you how many requests came in the last X seconds 
-- only how many came since the last time unit started.  It's also only 
reasonable for numbers like you suggested -- Tim or Yoav's suggestions 
would be better if your range is 5 seconds to 60 minutes, for example.

justin
At 07:10 AM 7/29/2004, you wrote:
I need to display on a .jsp page the number of requests for Tomcat in 
the past 5 / 10 / 15/ 30 / 45 / 60 seconds.  I've already implement a 
Filter will count the total number of requests.  I did this with a 
static int, which is incremented everytime a request comes in.  But what 
should I do so that I can show number of request over past time 
intervals?  Since the present time is always changing, "the past n 
seconds" is constantly changing also.
Thanks in advance,
Tom

______
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Is there such a beast ? (virtual directories)

2004-07-13 Thread Justin Ruthenbeck
At 12:13 PM 7/13/2004, you wrote:
One option is to use a servlet that serves static files from directories 
and map that servlet in your web application's web.xml.  This is nowhere 
near as robust or secure as putting httpd infront of your servlet 
containers.  Again since this _could_ point outside the application 
directory it's a poor solution.
This approach is what we've done to use shared resources (static content) 
amongst multiple apps.  In some deployment environments, running Apache 
in front of Tomcat is a no-go for our customers, so implementing this way 
allows us to *optionally* use Apache:

If Apache present, image is at http://www.site.com/images/a.gif
and physically at /.../images/a.gif
If Apache is not present, image is at 
http://www.site.com/webAppA/static?a.gif
and physically at /.../images/a.gif

Point being, implementing the serving as a separate servlet can give you 
additional flexibility at deployment time.  The assertion that this 
diminishes robustness and/or security must be taken in context -- in many 
situations, this can be preferable to running with Apache in front.  As 
always, YMMV.

justin

Otherwise (as in Carl's suggestion): You can "overlap" URI mappings to 
contexts.

So you can map:
/app1  ->   fooApplication.war
/app1/images  -> /usr/home/tomcat/images
as long as your images directory is a deployable web application.
Original Message Follows
From: "Mike Curwen" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Is there such a beast ?  (virtual directories)
Date: Tue, 13 Jul 2004 10:12:56 -0500
Hello all,
I had a friend ask me on the phone a couple days ago, and now a question
has popped up at javaranch. I've looked in the docs and googled, but
haven't found a definitive 'no' answer (shouldn't life be that simple?).
Thought I'd ask here.
Is there such a thing as directory aliasing / virtual directories (like
you get in Apache), available in Tomcat?
so you'd specify that /images is *really* over here at
/usr/local/some/funky/place/images
I like to tell people they don't need Apache, unless they're doing
"special" stuff.  Would this be one of those "special" things ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: will ROOT (/) context, folder "hello" interfere with context (hello) ?

2004-07-09 Thread Justin Ruthenbeck
It's genally a good idea to use the ROOT context as merely a redirection 
feature, _especially_ if you've got any possibility of naming conflicts 
(like you're suggesting).  By this, I mean make your ROOT context simply 
do a redirect (either an HTTP redirect or a JSP/Servlet redirect, 
depending on what you need to accomplish) to your "real" default web 
application.  It will eliminate problems like this -- naming and 
implementation/function should be independent.

As for your question, you can't practically get to ROOT/hello in the case 
you're describing.

justin
At 12:47 PM 7/9/2004, you wrote:
Then what about ROOT/hello ? How do you get to there?
> -Original Message-
> From: Mike Curwen [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 09, 2004 8:19 AM
> To: 'Tomcat Users List'
> Subject: RE: will ROOT (/) context, folder "hello" interfere with 
context
> (hello) ?
>
> You'd get the hello context.
>
> -Original Message-
> From: Ivan Jouikov [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 09, 2004 3:37 AM
> To: 'Tomcat Users List'
> Subject: will ROOT (/) context, folder "hello" interfere with context
> (hello) ?
>
>
>
> Something just popped in my mind.
>
> If you have a ROOT context which has a folder named hello,
>
> And you have a context named hello
>
> When you request localhost:8080/hello/
>
> Which one are you gonna get?  The ROOT context or the hello context?  I
> will try this out tomorrow, but I wonder how tomcat handles this?
>
>
>   _
>
>
> Best Regards,
>
> Ivan V. Jouikov
> (206) 228-6670
>  <http://www.ablogic.net/>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.2004
>
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.2004
>

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.2004

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Limit time for Database connection

2004-07-08 Thread Justin Ruthenbeck
See my previous post on the thread.
Combined with "testOnBorrow" and/or "testWhileIdle", it could certainly 
help.

justin
At 05:56 PM 7/8/2004, you wrote:
Could be, anyone know for sure?
Eric Noel wrote:
I thought it would be just as simple as setting the parameter in the 
DBCP???


  maxWait
  1

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 7/9/2004 8:11 AM, Robert F. Hall wrote:
Elisabeth,
Nobody has responded to your question (that I've seen), so I'll "take 
a shot".

This sounds like a network issue, and network connection failures have 
to "time out"
before they fail.  Using a timed separate thread to obtain the 
connections for the pool
occurs to me; if the connection thread doesn't return in a certain 
amount of time the
parent thread could throw an Exception.

Has anybody tired something along these lines?  Is this suggestion way 
off base?

Regards,
Robert
Bachler, Elisabeth (Elisabeth) wrote:
Hello,
I defined a database connection that uses a pool connection. 
Everything is
working well.
Now I had a routing problem that prevented any database connection 
(with a
SQPNestedException fired). The exception fired after a long time is
there a way of setting the connection limit, so it does not take so 
long
before firing the exception?

Thanks
Elisabeth
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Limit time for Database connection

2004-07-08 Thread Justin Ruthenbeck
Elisabeth,
Robert's suggestion should work, depending on the particulars of your 
situation.  Additional comments...

If the problem is happening at connection creation time (ie 
initialization of the webapp), you're much better off.  In this case, the 
network timeout isn't usually such a critical issue since someone is 
presumably monitoring the restart.

If, however, your pooled connection is bombing out during normal runtime, 
you've got more of a problem.  This situation is generally handled by the 
pool -- depending on which pool impl you're using, there will likely be a 
refresh rate which is the rate at which connections are tested for 
validity by the pool (seems like most people are using DBCP with Tomcat: 
see "testOnBorrow" and "testWhileIdle" parameters combined with 
"maxWait").  If you're concerned about requests to your app taking a long 
time because connections are no longer valid, this should significantly 
help and/or solve the problem.

If that's still not enough and you feel you still need a shorter timeout, 
remember that there are tradeoffs to shortening the timeout (it's there 
for a reason, after all).  That's going to be highly dependent on your 
pool impl and/or your database driver, depending on what you're 
using.  Change your timeout settings there. Either way I'd advise only 
going as low at the DB driver and not messing with OS networking settings 
if possible.

justin
At 05:11 PM 7/8/2004, you wrote:
Elisabeth,
Nobody has responded to your question (that I've seen), so I'll "take a 
shot".

This sounds like a network issue, and network connection failures have 
to "time out"
before they fail.  Using a timed separate thread to obtain the 
connections for the pool
occurs to me; if the connection thread doesn't return in a certain 
amount of time the
parent thread could throw an Exception.

Has anybody tired something along these lines?  Is this suggestion way 
off base?

Regards,
Robert
Bachler, Elisabeth (Elisabeth) wrote:
Hello,
I defined a database connection that uses a pool connection. Everything 
is
working well.
Now I had a routing problem that prevented any database connection 
(with a
SQPNestedException fired). The exception fired after a long time is
there a way of setting the connection limit, so it does not take so long
before firing the exception?

Thanks
Elisabeth
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: jspc

2004-06-24 Thread Justin Ruthenbeck
There are a number of compelling reasons that pre-compiling JSPs are a 
good idea.  Among the short list are:

(+) Safety: If you precompile a JSP, you *know* before putting it in 
production that it will compile without problems.  Why do we compile 
.java files into .class files before releasing a product?  Because we 
want to make as sure as we can that the application will run as intended.

(+) Source Code Privacy: Likewise, would your company release 
non-compiled source code for others to see?  Why would you release 
uncompiled jsp source code for the world to see?

(+) Speed: The first time a jsp is accessed, it must be 
compiled.  Obviously, this delay degrades the user experience.

(+) Security: Setting up your JVM to allow both execute and write access 
is a potential security hole.

(+) Resource Usage: There is inherent overhead caused by the process of 
translating a jsp request to a servlet request (which all jsp requests 
become).  To see this, look at a stack trace for a request that came 
through a JSP, then compare that to one from a Servlet.  If you can avoid 
the overhead, why not?

(+) Pre-compiling is a Deployment-time activity: Pre compiling doesn't 
affect developers -- it happens only at deployment time.  Unless you 
change JSPs frequently (which won't happen is a best-practice production 
environment), there is no penalty to be paid by pre-compiling.

If you care about these issues, pre-compile your JSPs.  If you don't 
care, don't spend the 30 minutes it takes to figure it out.  :)

justin
At 06:38 PM 6/24/2004, you wrote:
Hi,
Yes..that is what I thought, but I learned from a 'reliable'
source I could accomplish this on saving overhead. So rather than
looking into the whys and whats, I looked into how to do it, and look
into the performance benefits later. I will provide the list with my
sources reasoning, when it becomes available!
A thought..and to answer a question with a question (Why would
you precompile jsp files?), why is jspc there? If only to increase
performance on the first hit?
Thanks
Paul.
It will increase speed on the first viewing of the jsp, but after that I
can't see how there will be any difference.  How much memory can you
save
if any?  And how would that work?
Thanks
On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace <[EMAIL PROTECTED]>
wrote:
> In an effort to increase speed/free up memory that otherwise might be
> consumed by Tomcat otherwise
>
> Why would you precompile jsp files?
>
> On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace <[EMAIL PROTECTED]>
> wrote:
>
>> (sorry, wrong key!)
>>
>> Hi Jason,
>>  Thanks for that. Yes, it does make sense. A couple of things
>> though, I just ran it with -compile - great. But my query about the
> work
>> directory and was more towards what I am being 'encouraged' to do
from
>> the powers that be. I.e not WAR the app., but put it in the work
>> directory. Is this ill-advised/poor practice?
>>  To accomplish this, is it as simple as dragging the compiled
>> source under my work directory, and modifying my web.xml as advised?
>>  Why does -compile work, but not appear in the usage?!
>>  Also, can I specify a path for the compilation, rather than the
>> classes be placed in the same dirs as the source? (I tried adding a
> path
>> after the -compile switch, but it constructed and compiled a file
with
>> the same name as the class directory destination).
>>
>> Do I make sense?!
>>
>> Paul.
>>
>> Paul,
>>
>> I just use the -compile option and have jspc do the
>> compilation from .java to .class for me.  It seems to
>> work fairly well.  Once all the fully compiled (ie
>> .class) files are placed in you applications
>> WEB-INF/classes directory you just need to place the
>> generated web.xml file in WEB-INF.  There is an option
>> to create a complete web.xml file that you can place
>> in WEB-INF or, if you already have a web.xml file you
>> want to keep, you can have jspc create an xml fragment
>> that just contains the servlet definitions and
>> mappings that you then add (in the appropriate place)
>> to your existing web.xml.  Then just war up you
>> application directory in the normal way (you can even
>> delete the jsps once your certain the servlet mappings
>> are working).
>>If you try to put the generated files in your
>> working directory you won't be able to war them up and
>> deploy them in the normal "put war file under webapps
>> directory and tomcat will expand it when it starts"
>> way.  You'd have to ship a complete tomcat directory
>> structure with the work directory already filled in
>> with your compiled jsps.  Does th

Re: Design question ..

2004-06-21 Thread Justin Ruthenbeck
At 04:12 PM 6/21/2004, Frank Zammetti wrote:
The first point is a very good one, I wouldn't have thought of it!
The second point is certainly arguable.  I see where your coming from, 
but if it's a business rule, it by definition belongs in the model layer.
Remember, view is easy, the controller interfaces the two, and business 
logic of an application is the model layer.
If you define the controller as the portion that *merely* interfaces the 
view with the actual working objects (ie a Command servlet), then 
yes.  What I was trying to get at is that a DAO should be responsible for 
exactly that -- accessing the data.  It is, IMO, ill conceived to use the 
DAO to determine whether a row is locked and therefore whether an item is 
available.

That aside, I really do like your idea about kind of putting "a hold" on 
the class.  I think that's a very good suggestion and a good model to 
follow.
but in the end Justin, you would do well, I think, to do this in the 
database, i.e., have a "locked" field as write to it.  The complication 
there is you'll need some method to unlock "abandoned" items periodically.
I suppose my objection to handling in the database is not so much with 
the locks, but more with the combination of browsing behavior and 
inventory in a single table.  Storing information about a user's cart in 
the database has its advantages -- namely sharing amongst machines in a 
cluster and persistence across restarts -- but anytime you have multiple 
hands (from multiple logical processes) in the cookie jar, I get nervous 
about maintaining integrity.

Ultimately, I like Eric Earle's dual-table suggestion as it accomplishes 
both accurate, fail-fast inventory reporting for buyers, and separation 
of the browsing and buying data... along with the persistence and locking 
benefits of doing it in the DB.

Good luck on your impl, Mufaddal...
justin
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Design question ..

2004-06-21 Thread Justin Ruthenbeck
Since everyone else seems to have an opinion on this, I figure that I 
might as well share mine.  :)

A couple things to keep in mind:
(*) Depending on your geographic location, you may have a legal 
responsibility to make sure that an item listed as available is, indeed, 
available.  In other words, you can't tell a user that an item is 
available, let them put into their cart, then tell them it's not 
available when they try to pay for it.  This is municipality-specific, 
but something to keep in mind for those doing cross-border sales.

(*) The requirement you have described is a business-process 
requirement.  It is not technical and therefore, IMHO, should not be 
satisfied with row locking, transaction manipulation, etc.  Satisfy it on 
the controller level and avoid polluting your model with stuff like this.

My personal inclination (which could change depending on the situation) 
would be to give users an X minute (logical) lock once something has been 
put in their cart.  If they don't buy it (or indicate they want to keep 
it) after that time is up, it goes back on the shelf.  In other words, 
treat everything in your inventory like a real object ... if a consumer 
wants to buy it, give them a pickup-ticket that they can take to the 
cashier.  Ensure that the number of pickup-tickets equals the number of 
real items in inventory.  The primary benefit here is that you'll fail 
fast instead of promising something that you can't deliver.

(This isn't my idea, BTW ... take a look at TicketMaster when a hot 
concert goes on sale to see this in action)

justin

At 12:37 PM 6/21/2004, you wrote:
Hi,
I am in the process of writing a webapp that allows users to make a 
payment and register for a course. Using Apache -- Tomcat --- MySQL.

The question is a design question i guess, unless there is something in 
Tomcat that I can leverage, which i might not know.  I know that this is 
a design question , but since I am using Tomcat as my JSP/Servlet 
container and since the participants here are experts in this field , I 
thought that I might get some good pointers here.

Lets take this scenario:
User 1 and User 2 are trying to register for a course called 
"Taekwando". The fee for registering is X amount. Also there is another 
course called "Majagutamba" and it costs Y amount. Both theses courses 
have exactly 1 seat remaining.

Now lets say user 1 adds both these courses in his shopping cart, and 
user 2 does the same, since user 1 has not completed his transaction and 
paid the enrollment table wont have an entry for user1. (The Enrollment 
table keeps track of which user is enrolled in which course). Therefore 
both users have both those courses in their shopping carts. Now both of 
them proceed to checkout. They enter their credit card information and 
say submit. Both those users make payments and get enrolled for both 
those courses!!! Which is wrong , since both those courses could only 
enroll 1 more person, instead two new users were just added.

To avoid the above problem one could implement a singleton synchronized 
Transaction object that would process shopping cart checkout in a queue. 
The problem with this approach are:
1. If anything goes wrong with any one transaction, it would hold up the 
entire queue. (Well we can have some sort of timeouts and take care of 
that.)
2. Since this is a syncrhonized singleton and if the traffic for 
registering for the courses is high, this would be a slow process for 
which the user will have to wait.

Is there a better solution, algorithm, to do this ? Any help is 
appreciated.

Thanks,
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

______
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Reading the servlet input stream twice

2004-06-18 Thread Justin Ruthenbeck
The cleanest, most standards-compliant way of doing what you're asking is 
through the HttpServletRequestWrapper.

Make sure you've duely considered QM's comments about the getParameter() 
methods.

justin
At 01:41 PM 6/18/2004, you wrote:
Dear All,
I use Tomcat 4.1.xx
I am implementing page tracking on a project.
I am coming across a problem, when I want to write a copy of the 
parameters
or contents of a POST request to the database.
I have tried using HttpServletRequest.getInputStream () but this cleans 
out
the input stream and means that no parameters
or content is available to be passed on to the logic that processes the
parameters or post content.

Is there anyway of getting a copy of a POST request content without
cleaning out the input stream and stuffing up the suceeding logic?
Regards,
Phil Hewitt

mail2web - Check your email from the web at
http://mail2web.com/ .

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: three problems

2004-06-17 Thread Justin Ruthenbeck
At 05:23 PM 6/17/2004, you wrote:
Thanks for your prompt answer,
Could you be more specific on the address attr?
I have the following in the Connector element on my server.xml:

To add to QM's comments:
You're accessing it locally by hitting http://localhost:8080, right?  If 
you're access it remotely with http://www.x.com/myapp, can you access it 
locally with http://www.x.com/myapp?

Try accessing it remotely with http://

In any case, this should be a networking issue...
justin 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Is tomcat a suitable server for our application ?

2004-06-15 Thread Justin Ruthenbeck
Can Tomcat handle 3000 concurrent sessions?  Yes.  The bottleneck will 
not be Tomcat, per se, but rather either hardware resources (memory on 
the heap) or database connections.  What you really need to figure out is 
how *active* those 3000 users will be -- 3000 users actively querying 
financial data reports is VERY different than 3000 users reading today's 
news reports.

Point being that the question to ask is not whether Tomcat will support 
3000 concurrent users.  This is a question of resource availability.  The 
question should be: can my one machine running with MY APPLICATION, 
Tomcat and the hardware specs you gave support 'X' simultaneous requests 
with a minimum/average request processing time of 'Y' milliseconds?

No one here will have the answer to that, of course.
justin
At 10:43 PM 6/14/2004, you wrote:
> Hi,
>   We are planning to host a web application which is estimated to have
> around 3000 concurrent users. We are using SQL Server 2000 as 
database and
> Struts 1.1 framework.
>
>   Our production server (i.e. web server. We're having a different
> database server.) has the foll. configuration:
> 4GB Ram
> Xenon P4 processors - 2 nos.
> Windows 2000 Professional OS
> 72 GB HDD
>
>   Do you think that Tomcat is a suitable web server for our
> application?
>
> Thanks & Regards,
> Paresh Mondkar.
>

Confidential:  This electronic message and all contents contain 
information
from Syntel, Inc. which may be privileged, confidential or otherwise
protected from disclosure. The information is intended to be for the
addressee only. If you are not the addressee, any disclosure, copy,
distribution or use of the contents of this message is prohibited.  If you
have received this electronic message in error, please notify the sender
immediately and destroy the original message and all copies.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Failing due to Multiple browser windows sharing the same session

2004-06-03 Thread Justin Ruthenbeck
At 03:06 PM 6/3/2004, you wrote:
How to duplicate:
1) Go to sid.jsp in the webapp.
2) Use Ctrl+N to open a new browser window.
3) Go to sid.jsp with the new browser window created in step #2.
4) Session ID's are the same.
I don't see any options in Netscape to force the new browser window to 
be in a new session. I havn't looked at IE yet.

Is this a problem with tomcat, the browser, or the webapp?
The behavior you're seeing is expected and intentional.  I don't know 
about all operating systems and browsers, but IN GENERAL opening a new 
browser *window* with Ctrl+N will share sessions ... opening a new 
browser *instance* via starting a new process will not share sessions.

This can cause problems if you have two browser windows sharing the same 
session, both doing time-consuming work on the same data set.  This 
doesn't happen very often and usually when it does it's more a sign of 
problematic design than anything else.

As for your particular solution, that's a complex discussion to figure 
out what exactly would work best -- basically either accept that you'll 
have multiple threads modifying the same session data (and synchronize 
data access) or change the way your're storing data to make it immune to 
this situation.

justin
______
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Maintaining Sessions

2004-06-02 Thread Justin Ruthenbeck
At 04:22 PM 6/2/2004, you wrote:
There is a web.xml file in my catalinahome/conf
directory.  I have read that according to some
specifications somewhere, I should also have a web.xml
in every WEB-INF directory for each application.  Does
the main web.xml file apply to all applications, and
the WEB-INF web.xml just add settings to the specific
applications, or does it OVERRIDE the main web.xml (so
I would need to include ALL the entries found in the
main file in ALL of the application level web.xml
files)?
The app-specific web.xml extends the global one (information
defined in the app-specific one overrides the global one, but
any information not overridden is inherited).
And what would an entry look like to force one
specific file to re-direct to the secure port?  I can
only find very vague examples that secure entire
applications.
This is a Servlet spec thing -- see SRV.12.8 (Servlet2.3).
It's basically something like this in your web.xml (no
guarantees for code correctness here, but it should get you
started):

  
/secure/*
  
  
CONFIDENTIAL
  

Thanks for the help thus far,
Justin Jaynes
No problem.  Good luck.
justin


--- Justin Ruthenbeck <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Square peg, round hole.
>
> It seems like the only reason you've split these
> into multiple hosts is
> to differentiate between secure and non-secure
> communication -- that's a
> bad idea.  From what you've said, the best approach
> is to put all of the
> JSPs for (A) and (C) in the same webapp, but set
> s
> for those resources (C) that require https.
>
> See:
>
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html
>
> What you're describing here is a deployment-time
> problem -- it shouldn't
> impact your code in a major way like distributed
> sessions would cause.
>
> justin
>
>
> At 02:56 PM 6/2/2004, you wrote:
> >Hello,
> >
> >I am running Tomcat 5.0.25 on SuSE Linux 9.1.  I am
> >running ONE Tomcat server with two services:
> >
> >1.  Standalone on port 80, with two hosts:
> > A.  A basic shopping site with a CartBean.java
> > that I set scope=session when I call it
> from
> > JSP's.
> > B.  Another not related host.
> >
> >2.  Standalone SECURE on port 443, with two hosts:
> > C.  The secure checkout site for host A
> (above)
> > B.  Another secure, but not related, host.
> >
> >My cart.jsp on host A uses checkout.jsp on host C
> to
> >process the request.  However, the session with
> >CartBean objects does not carry over.  How do I
> keep
> >my session alive from host to host on the same
> server?
> >  And what if I decide to move the host C to
> another
> >server on another machine?  Then what?
> >
> >Or is this the wrong approach?  Is there a way to
> have
> >SOME secure jsp's on the same host as some
> non-secure
> >jsp's?
> >
> >And do I HAVE to have a WEB-INF directory for both
> >hosts, or could they somehow share a WEB-INF
> directory
> >so I only have to maintain ONE set of classes?  I
> >tried using symbolic-link WEB-INF's to one big
> WEB-INF
> >directory, but it did NOT work.
> >
> >Justin Jaynes
> >
> >
> >
> >
> >__
> >Do you Yahoo!?
> >Friends.  Fun.  Try the all-new Yahoo! Messenger.
> >http://messenger.yahoo.com/
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
> __
> Justin Ruthenbeck
> Software Engineer, NextEngine Inc.
> justinr - AT - nextengine DOT com
> Confidential. See:
> http://www.nextengine.com/confidentiality.php
> __
>
>
>
-----
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>


__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Maintaining Sessions

2004-06-02 Thread Justin Jaynes
That makes sense.  I did some reading since you
replied and I realize now that I can have more than
one connector per engine containing multiple hosts. 
That also explians the mysterious redirect port
parameter that I couln't make heads nor tails of till
now.

But a few web.xml questions.

There is a web.xml file in my catalinahome/conf
directory.  I have read that according to some
specifications somewhere, I should also have a web.xml
in every WEB-INF directory for each application.  Does
the main web.xml file apply to all applications, and
the WEB-INF web.xml just add settings to the specific
applications, or does it OVERRIDE the main web.xml (so
I would need to include ALL the entries found in the
main file in ALL of the application level web.xml
files)?

And what would an entry look like to force one
specific file to re-direct to the secure port?  I can
only find very vague examples that secure entire
applications.

Thanks for the help thus far,

Justin Jaynes

--- Justin Ruthenbeck <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> Square peg, round hole.
> 
> It seems like the only reason you've split these
> into multiple hosts is 
> to differentiate between secure and non-secure
> communication -- that's a 
> bad idea.  From what you've said, the best approach
> is to put all of the 
> JSPs for (A) and (C) in the same webapp, but set
> s 
> for those resources (C) that require https.
> 
> See:
>
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html
> 
> What you're describing here is a deployment-time
> problem -- it shouldn't 
> impact your code in a major way like distributed
> sessions would cause.
> 
> justin
> 
> 
> At 02:56 PM 6/2/2004, you wrote:
> >Hello,
> >
> >I am running Tomcat 5.0.25 on SuSE Linux 9.1.  I am
> >running ONE Tomcat server with two services:
> >
> >1.  Standalone on port 80, with two hosts:
> > A.  A basic shopping site with a CartBean.java
> > that I set scope=session when I call it
> from
> > JSP's.
> > B.  Another not related host.
> >
> >2.  Standalone SECURE on port 443, with two hosts:
> > C.  The secure checkout site for host A
> (above)
> > B.  Another secure, but not related, host.
> >
> >My cart.jsp on host A uses checkout.jsp on host C
> to
> >process the request.  However, the session with
> >CartBean objects does not carry over.  How do I
> keep
> >my session alive from host to host on the same
> server?
> >  And what if I decide to move the host C to
> another
> >server on another machine?  Then what?
> >
> >Or is this the wrong approach?  Is there a way to
> have
> >SOME secure jsp's on the same host as some
> non-secure
> >jsp's?
> >
> >And do I HAVE to have a WEB-INF directory for both
> >hosts, or could they somehow share a WEB-INF
> directory
> >so I only have to maintain ONE set of classes?  I
> >tried using symbolic-link WEB-INF's to one big
> WEB-INF
> >directory, but it did NOT work.
> >
> >Justin Jaynes
> >
> >
> >
> >
> >__
> >Do you Yahoo!?
> >Friends.  Fun.  Try the all-new Yahoo! Messenger.
> >http://messenger.yahoo.com/
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> __
> Justin Ruthenbeck
> Software Engineer, NextEngine Inc.
> justinr - AT - nextengine DOT com
> Confidential. See:
> http://www.nextengine.com/confidentiality.php
> __
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maintaining Sessions

2004-06-02 Thread Justin Ruthenbeck
Hi,
Square peg, round hole.
It seems like the only reason you've split these into multiple hosts is 
to differentiate between secure and non-secure communication -- that's a 
bad idea.  From what you've said, the best approach is to put all of the 
JSPs for (A) and (C) in the same webapp, but set s 
for those resources (C) that require https.

See: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/ssl-howto.html
What you're describing here is a deployment-time problem -- it shouldn't 
impact your code in a major way like distributed sessions would cause.

justin
At 02:56 PM 6/2/2004, you wrote:
Hello,
I am running Tomcat 5.0.25 on SuSE Linux 9.1.  I am
running ONE Tomcat server with two services:
1.  Standalone on port 80, with two hosts:
A.  A basic shopping site with a CartBean.java
that I set scope=session when I call it from
JSP's.
B.  Another not related host.
2.  Standalone SECURE on port 443, with two hosts:
C.  The secure checkout site for host A (above)
B.  Another secure, but not related, host.
My cart.jsp on host A uses checkout.jsp on host C to
process the request.  However, the session with
CartBean objects does not carry over.  How do I keep
my session alive from host to host on the same server?
 And what if I decide to move the host C to another
server on another machine?  Then what?
Or is this the wrong approach?  Is there a way to have
SOME secure jsp's on the same host as some non-secure
jsp's?
And do I HAVE to have a WEB-INF directory for both
hosts, or could they somehow share a WEB-INF directory
so I only have to maintain ONE set of classes?  I
tried using symbolic-link WEB-INF's to one big WEB-INF
directory, but it did NOT work.
Justin Jaynes

__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

______
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Maintaining Sessions

2004-06-02 Thread Justin Jaynes
Hello,

I am running Tomcat 5.0.25 on SuSE Linux 9.1.  I am
running ONE Tomcat server with two services:

1.  Standalone on port 80, with two hosts:
A.  A basic shopping site with a CartBean.java
that I set scope=session when I call it from
JSP's.
B.  Another not related host.

2.  Standalone SECURE on port 443, with two hosts:
C.  The secure checkout site for host A (above)
B.  Another secure, but not related, host.

My cart.jsp on host A uses checkout.jsp on host C to
process the request.  However, the session with
CartBean objects does not carry over.  How do I keep
my session alive from host to host on the same server?
 And what if I decide to move the host C to another
server on another machine?  Then what?

Or is this the wrong approach?  Is there a way to have
SOME secure jsp's on the same host as some non-secure
jsp's?

And do I HAVE to have a WEB-INF directory for both
hosts, or could they somehow share a WEB-INF directory
so I only have to maintain ONE set of classes?  I
tried using symbolic-link WEB-INF's to one big WEB-INF
directory, but it did NOT work.

Justin Jaynes




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSVC to run tomcat?

2004-05-28 Thread Justin Jaynes
I rechecked my configuration file, and I was using to
JSVC script for tomcat 4 which loads a different class
than the tomcat 5 script.  I corrected the class and
it works flawlessly.

There are always TWO JSVC processes running.  Is that
normal?  And can somebody please explain exactly what
is happening with JSVC and tomcat.  How do I know the
process is actually running with the underprivelaged
user account?  If JSVC runs tomcat as a Daemon, does
it shut off when no services are requested from it and
start up again when a service is requested?  Will this
slow down my system?  

How does JSVC work and does it affect performance?

Justin

--- Bob White <[EMAIL PROTECTED]> wrote:
> My guess is that jsvc is failing.  Is there an error
> in your output file or
> error file? (ie. ../logs/catalina.out &
> ../logs/catalina.err).
> 
> As for why it was failing, I found it was so
> unreliable on my system that I
> eventually ditched it (but then I don't need port
> 80).  All in all, it's easier
> to run Apache http server and bridge to Tomcat than
> to try to get Tomcat
> running using jsvc, imo.
> 
> ..Bob.
> 
> --- Eric Noel <[EMAIL PROTECTED]> wrote:
> > On 5/28/2004 12:02 PM, Justin Jaynes wrote:
> > 
> > > I am very impressed with the responsiveness of
> this
> > > list.  I appreciate all the help everyone has
> given me
> > > in learning about JSVC for running tomcat as an
> > > underpriviledged user on ports 80 and 443.
> > > 
> > > However, I am still running into a problem.
> > > 
> > > I created a tomcat user and group and all tomcat
> files
> > > and web application files are owned by tomcat.
> > > 
> > > I compiled the jsvc and set my scripts to run
> jsvc
> > > with the proper options (I believe), and when I
> run
> > > the script, I get nothing but my prompt back.  I
> run
> > > ps -ax and jsvc is NOT a running process.  What
> am I
> > > doing wrong?
> > > 
> > > I run the command from my /tomcat/bin:
> > > 
> > > jsvc -Djava.endorsed.dirs=../common/endorsed -cp
> > > ./bin/bootstrap.jar -outfile
> ../logs/catalina.out
> > > -errfile ../logs/catalina.err
> > > org.apache.catalina.startup.Bootstrap
> > > 
> > > nothing
> > > 
> > > I run the command with the user option, (as in
> the
> > > scripts)  again. nothing.  No errors, no
> process.  Any
> > > help would be greatly apreciated.
> > > 
> > > Justin
> > > 
> > > 
> > >   
> > >   
> > > __
> > > Do you Yahoo!?
> > > Friends.  Fun.  Try the all-new Yahoo!
> Messenger.
> > > http://messenger.yahoo.com/ 
> > > 
> > >
>
-
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > 
> > > 
> > try checking the tomcat5.sh script in the
> jsvc.tar.gz to see the 
> > parameters passed.
> > 
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > 
> 
> 
> =
> --Bob White-- home:727-490-7363, cell:727-463-6061
> New (popup free!) photos of Polina:
> http://polina.70kg.com/
> 
> Everything that irritates us about others can lead
> us to an understanding of ourselves. - Carl Jung
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JSVC to run tomcat?

2004-05-27 Thread Justin Jaynes
I am very impressed with the responsiveness of this
list.  I appreciate all the help everyone has given me
in learning about JSVC for running tomcat as an
underpriviledged user on ports 80 and 443.

However, I am still running into a problem.

I created a tomcat user and group and all tomcat files
and web application files are owned by tomcat.

I compiled the jsvc and set my scripts to run jsvc
with the proper options (I believe), and when I run
the script, I get nothing but my prompt back.  I run
ps -ax and jsvc is NOT a running process.  What am I
doing wrong?

I run the command from my /tomcat/bin:

jsvc -Djava.endorsed.dirs=../common/endorsed -cp
./bin/bootstrap.jar -outfile ../logs/catalina.out
-errfile ../logs/catalina.err
org.apache.catalina.startup.Bootstrap

nothing

I run the command with the user option, (as in the
scripts)  again. nothing.  No errors, no process.  Any
help would be greatly apreciated.

Justin




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: API for authenticating user

2004-05-27 Thread Justin Ruthenbeck
Koji,
(1) Make sure you understand the implications of directly using any of 
Tomcat's internal classes (such as o.a.coyote.tomcat5.CoyoteRequest) -- 
especially to circumvent intended security.  It is rarely advisable.

If you still want to use it, move the class and/or jar into the 
$TOMCAT_HOME/common/classes or $TOMCAT_HOME/common/lib directory.  It 
will be accessible to both Tomcat and your webapps in this case.

Repeat (1).
justin
At 08:15 PM 5/27/2004, you wrote:
Hi again,
I found org.apache.coyote.tomcat5.CoyoteRequest class has a method
setUserPrincipal which seems to be used to memorize authenticated user's
principal into session. So I think I can call this method to authenticate
users as soon as they register. But at runtime, when a user register
himself and a regiter program (struts action) trys to call the method,
the following exception occured:
java.lang.NoClassDefFoundError: org/apache/coyote/tomcat5/CoyoteRequest
sample.action.SubscribeAction.execute(SubscribeAction.java:34)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
This is because of Tomcat class loader problem. The Tomcat document says,
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html
"Catalina - This class loader is initialized to include all classes and
resources
required to implement Tomcat 5 itself. These classes and resources are
TOTALLY
invisible to web applications."
So, I think I cannot call CoyoteRequest.setUserPrincipal().
Any idears?
regards,
Koji
> -Original Message-
> From: Koji Sekiguchi [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 26, 2004 11:58 AM
> To: Tomcat Users List
> Subject: RE: API for authenticating user
>
>
> Redirecting to j_security_check is a nice idea.
> Yes, I know Servlet specification doesn't have such API.
> But Tomcat must implement a mechanism that associates
> user principal with http session so that servlets can get
> user principal by calling HttpServletRequest.getUserPrincipal().
> So I'll check Tomcat implementation of the API (getUserPrincipal())
> to see how Tomcat memorizes user principal.
>
> Koji
>
> > -Original Message-
> > From: Matt Raible [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, May 26, 2004 11:26 AM
> > To: Tomcat Users List
> > Subject: Re: API for authenticating user
> >
> >
> > Unfortunately, there is not an API for this in J2EE or
> > container-managed authentication.  I accomplish this in an example 
app
> > that I wrote - using cookies and a redirect to 
j_security_check.  For a
> > demo, see http://demo.raibledesigns.com/appfuse.
> >
> > Matt
> >
> > On May 25, 2004, at 7:51 PM, Koji Sekiguchi wrote:
> >
> > > Yes, my question was "how to authenticate users as soon as they
> > > register".
> > > I think there must be API for it.
> > > Sorry for posting not clear question.
> > >
> > > Any ideas?
> > >
> > > Koji
> > >
> > >> -Original Message-
> > >> From: Patrick Willart [mailto:[EMAIL PROTECTED]
> > >> Sent: Wednesday, May 26, 2004 5:53 AM
> > >> To: Tomcat Users List
> > >> Subject: RE: API for authenticating user
> > >>
> > >>
> > >> I believe Koji wants to authenticate users as soon as they
> > >> register. I agree
> > >> with him that it's kind of silly to have the user first fill out 
all
> > >> his
> > >> user profile information to register as a new user to the site,
> > >> and then ask
> > >> him to log on. It would be nice if one is able to log on the user
> > >> automatically after registration.
> > >>
> > >> grts.
> > >>
> > >> Patrick
> > >>
> > >> -Original Message-
> > >> From: Yansheng Lin [mailto:[EMAIL PROTECTED]
> > >> Sent: Tuesday, May 25, 2004 1:15 PM
> > >> To: 'Tomcat Users List'
> > >> Subject: RE: API for authenticating user
> > >>
> > >>
> > >> Hi,
> > >>
> > >> Sorry, I might've misunderstood you.  Are you saying that even
> > >> after a user
> > >> has loged in, they will still be prompted for log in information
> > 

RE: standalone production?

2004-05-27 Thread Justin Jaynes
I am intending to run in a fully internet exposed
environment and I only have ONE physical machine to
use for deployment.  It will be directly connected to
the internet at co-location service provider.  So ...

In a conversation from yesterday, it appears another
user had a similar question.  How to run on port 80,
securly.

Is it possible to run tomcat with a non-priviliged
user?  What is this JSVC approach they referred to,
and what is the solution that was given?  Where can I
go to read more?

OK, I've been running tomcat behind apache for ages,
and
>> >now I want to go with Yoav's oft-stated advice to
just
>> >use tomcat (5.0.24) alone.  And I want it on port
80.
>> >
>> >So, I try to use the jsvc approach, telling it to
go to
>> >the nonprivileged tomcat user by (from the tomcat
site):
>> >
>> >./bin/jsvc -Djava.endorsed.dirs=./common/endorsed
-cp
>>./bin/bootstrap.jar \
>> > -outfile ./logs/catalina.out -errfile
./logs/catalina.err \
>> > org.apache.catalina.startup.Bootstrap
-user tomcat
>> >
>> >However, that chokes as follows, as it apparently
can't use port
>> >80 as I'm wanting it to.
>> >
>> >I'm sure this must be trivial, but all help would
be
>> >appreciated!





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



standalone production?

2004-05-26 Thread Justin Jaynes
Is it considered safe to run tomcat as a stand-alone
production server on ports 80 and 443?  This requires
tomcat to run as root (or so I have read) and it is
therefore "not recommended".  Using apache forks child
processes that run as nobody.  But I don' want to use
apache.  Again, is it safe to run tomcat as a
stand-alone production server on port 80 and 443 as
root?  Or is there some way to deny root permissions
and still use these ports?




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Verifying signatures

2004-05-26 Thread Justin Jaynes
I recently downloaded TOMCAT 5 and I read that I am
responsible to verify the integrity of the download
from the mirror using some key or signature.  How do I
do that?  I am running SuSE linux 9.1.

Please be specific.  What key's or signatures or
checksums do I download?  Where do I place them?  What
commands do I type?

I hope this is not a stupid question.




__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: forwarding across contexts?

2004-05-11 Thread Justin Ruthenbeck
At 01:04 PM 5/11/2004, you wrote:
Justin,

Thanks again for taking the time to think about this with me.

Alas, my customer's deployment platform is windows. So
no symlinks. No Apache (they use IIS). Complicated security
model for everything on the site except for decorative gifs.
So Tomcat does it all!
In that case, I would personally either extend or implement
the DefaultServlet to read resources from a designated local
location (given by a servlet init param).  It seems silly
to add a webApp that consists only of static content in this
case ... but you know how to do it if you deem that best.
Once you decide what you're going to do and implement it, I'd be
curious to get your feedback and/or comments on your method.
If you remember this conversation when you're done, shoot
me/us an email with any observations.
Good luck,
justin
At 03:13 PM 5/11/2004, you wrote:

Fred,

Thanks for the additional info about your app ... it makes it much
easier to talk about these things.  :)  There are many (valid) ways
to proceed, many of which vary in the amount of "standards" they
adhere to (how much you want to align yourself with Tomcat).
I'll just give you my thoughts.
At 09:02 AM 5/11/2004, you wrote:
Let me describe a bit about our application, just in case you
(or anyone else) have some specific advice.
My client is a publisher, and the bulk of the site will be many
thousands of published articles and associated content such
as figure, tables, etc.
The HTML content, however, will be served by tomcat, since
it has some dynamic components.
The biggest question, then, has to do with your security requirements.
Specifically, does this content need to be protected or can it just
sit out there for anyone to grab?
If it need not be protected, this is, IMHO, a textbook example of when
to use Apache.  You've got a large collection of static data and a
relatively small web application associated with it.  You've probably
got different groups working on the different parts (the publisher's
content and the HTML pages), so it makes sense to separate it out and
serve the static content by generating links to your static web server's
content from your dynamic HTML.  Additionally, you could then put the
two pieces on separate machines (one or more with Apache, one or more
with Tomcat) to keep them separated even more cleanly.
If the content needs to be protected, I would create a separate
directory and put the content there.  Symlink this to the base of your
Tomcat webApp and let Tomcat serve it normally, employing whatever
security scheme you're using.  You won't be able to deploy the entire
thing as a single WAR, but it doesn't sound like you really care to
do this anyways.
This is why it's not practical to bundle everything into a war file.
Instead, I need tomcat to point to the file system where many
users will be building the site.
On the other hand, the war file can easily contain the java 
infrastructure
(struts, velocity, configuration information, etc.). I'd like to be able
to keep the small war file, hot deploy, etc., but have the raw content
(static and otherwise) live elsewhere.

Given that, would you solve it with multiple contexts? Or do you
have another suggestion?
Alternately, you could extend the DefaultServlet (if you don't mind tying
yourself to Tomcat and your version) with your own custom static content
servlet that gets data from an arbitrary directory.  If you can't be
tied to Tomcat, use the source as a base to write your own default
servlet.  This solution is more on the "slick" side of things, so it
wouldn't be preferable ... better to stay within the mainstream
boundaries.
If you can, look into symlinking or Apache.  Consider the extend/impl
DefaultServlet idea.  If you're still not satisfied, having two
separate contexts can be made to work.  Perhaps others have additional
ideas.

Fred
Good luck,
justin

At 10:08 AM 5/11/2004, you wrote:

Hi,

>Is there a way, within a single context, to separate out
>the static content to some other file system location.
Of course, there are many ways, none of them advised.  You want to keep
your webapp as a whole, that's the whole point of a WAR file.  You can
symlink (at the filesystem level) or use normal HTTP linking to access
your static content.  But you can't symlink in a WAR, so...
>I believe that Yoav's suggestion is that I set up the empty
>path ("") context for this purpose. However, this is where
>I started, and Justin argued against this "cross-context"
>approach.
And I agree with Justin, just to be clear.  I wasn't advocating 
anything
different from what he said, just showing you that it can technically 
be
done.  If crossContext forwards are the worst design choices on this
list, we'll be in great shape.

Yoav Shapira



This e-mail, including any attachments, is a confidential 

RE: forwarding across contexts?

2004-05-11 Thread Justin Ruthenbeck
Fred,

Thanks for the additional info about your app ... it makes it much
easier to talk about these things.  :)  There are many (valid) ways
to proceed, many of which vary in the amount of "standards" they
adhere to (how much you want to align yourself with Tomcat).
I'll just give you my thoughts.
At 09:02 AM 5/11/2004, you wrote:
Let me describe a bit about our application, just in case you
(or anyone else) have some specific advice.
My client is a publisher, and the bulk of the site will be many
thousands of published articles and associated content such
as figure, tables, etc.
The HTML content, however, will be served by tomcat, since
it has some dynamic components.
The biggest question, then, has to do with your security requirements.
Specifically, does this content need to be protected or can it just
sit out there for anyone to grab?
If it need not be protected, this is, IMHO, a textbook example of when
to use Apache.  You've got a large collection of static data and a
relatively small web application associated with it.  You've probably
got different groups working on the different parts (the publisher's
content and the HTML pages), so it makes sense to separate it out and
serve the static content by generating links to your static web server's
content from your dynamic HTML.  Additionally, you could then put the
two pieces on separate machines (one or more with Apache, one or more
with Tomcat) to keep them separated even more cleanly.
If the content needs to be protected, I would create a separate
directory and put the content there.  Symlink this to the base of your
Tomcat webApp and let Tomcat serve it normally, employing whatever
security scheme you're using.  You won't be able to deploy the entire
thing as a single WAR, but it doesn't sound like you really care to
do this anyways.
This is why it's not practical to bundle everything into a war file.
Instead, I need tomcat to point to the file system where many
users will be building the site.
On the other hand, the war file can easily contain the java infrastructure
(struts, velocity, configuration information, etc.). I'd like to be able
to keep the small war file, hot deploy, etc., but have the raw content
(static and otherwise) live elsewhere.
Given that, would you solve it with multiple contexts? Or do you
have another suggestion?
Alternately, you could extend the DefaultServlet (if you don't mind tying
yourself to Tomcat and your version) with your own custom static content
servlet that gets data from an arbitrary directory.  If you can't be
tied to Tomcat, use the source as a base to write your own default
servlet.  This solution is more on the "slick" side of things, so it
wouldn't be preferable ... better to stay within the mainstream
boundaries.
If you can, look into symlinking or Apache.  Consider the extend/impl
DefaultServlet idea.  If you're still not satisfied, having two
separate contexts can be made to work.  Perhaps others have additional
ideas.

Fred
Good luck,
justin

At 10:08 AM 5/11/2004, you wrote:

Hi,

>Is there a way, within a single context, to separate out
>the static content to some other file system location.
Of course, there are many ways, none of them advised.  You want to keep
your webapp as a whole, that's the whole point of a WAR file.  You can
symlink (at the filesystem level) or use normal HTTP linking to access
your static content.  But you can't symlink in a WAR, so...
>I believe that Yoav's suggestion is that I set up the empty
>path ("") context for this purpose. However, this is where
>I started, and Justin argued against this "cross-context"
>approach.
And I agree with Justin, just to be clear.  I wasn't advocating anything
different from what he said, just showing you that it can technically be
done.  If crossContext forwards are the worst design choices on this
list, we'll be in great shape.
Yoav Shapira



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-----
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.n

Re: forwarding across contexts?

2004-05-10 Thread Justin Ruthenbeck
At 07:04 PM 5/10/2004, you wrote:
Hi,

I'm trying to install a filter into the default context that
forwards to my application (in another context) and it
doesn't seem to want to work. (jboss 3.2.3 with embedded
tomcat 4.1.29)
In researching this, I've seen various hints that this may
in fact be illegal. Can anyone confirm?
It is generally good design practice to limit interactions between
your webapps except for strongly defined specific interfaces that
promote modularity.  Doing something like you're suggesting will
likely lead to messy, difficult code to work with ... not because
it's a necessarily bad design idea, but rather because the premise
behind J2EE is that code bases are designed, coded, deployed, and
maintained as independent applications.  They're not meant to
ineroperate in a fluid way.  It's possible to do what you're
suggesting, but not recommended.
The REASON I want to do this is that I want to be able
to take advantage of "simple" URLS with the default
context, as in "/images/whatever.gif", and have them be
served by DefaultServlet, which conveniently knows how
to handle all that sort of stuff, set mime types, etc. I'm
also hoping that DefaultServlet was written by someone
more clever than me!
Resources need not be within the ROOT web application to be served
by the DefaultServlet.  You'll notice that the DefaultServlet is
defined within the global web.xml (I haven't worked with recent
versions of jBoss, so I'm not sure exactly where they put this
these days), which means that all applications inherit it.  This
means that resources like "/images/whatever.gif" and
"/mywebapp/images/whatever.gif" will both be served by the
DefaultServlet unless you configure it otherwise.
But, I also want to capture certain "simple" URLs and forward
these to another context. As in "/protected.html" needs to
be forwarded to "/accesscheck/protected.html" or similar.
Am I on the wrong track here? Is it possible to forward
(via RequestDispatcher) from one context to another? If not,
how can I take advantage of DefaultServlet in my application?
See ServletContext#getContext(String).  Again, I predict you'll find
this to be a clunky and frustrating way to do things.  Unless you have
an over-riding reason to do otherwise, embrace the idea of separate
and distinct web applications and let the container do this URL
parsing and forwarding for you.
Many thanks,

Fred Toth
Good luck,
justin
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


startupw.exe & classpath

2004-05-03 Thread Justin McReynolds
I'm having classpath trouble when I start Tomcat 5.0.19 with the "Start
Tomcat" shortcut that points to "C:\Tomcat50\bin\tomcatw.exe
//GT//Tomcat5"
I want to include a directory that is outside of the tomcat install dir,
e.g. "c:\mydir", but I don't know how to add that directory to the
classpath.
 
I can edit setclasspath.bat to include that directory, and then start
Tomcat with either "startup.bat" or "catalina.bat" and it works fine; is
there an analogous file for tomcatw.exe?
 
Thank you,

Justin McReynolds

Advanced Product Support Engineer  -  Stellent, Inc.  -  Office: (425)
896-7057  -  Cell: (425) 985-2425  -  [EMAIL PROTECTED]

 


Re: FW: Tomcat stops loading when I run my servlet with

2004-04-23 Thread Justin Ruthenbeck
At 05:21 PM 4/23/2004, you wrote:
Justin,

I followed your advice immediately, but the exact same thing happens.
My response was tongue-in-cheek, but that's ok.  :)

Just to restate the issue, my servlet hangs because it needs to obtain an
XML Schema from localhost:8080.  But it can't get it, because Tomcat won't
finish loading until the servlet is finished.  But the servlet won't 
finish
until Tomcat finishes loading.  Etcetera, etcetera ad infinitum.

I've got some sort of logic issue here.  If I want to kick off a program
that polls a directory for XML files, should I probably do something 
where I
kick off an independent thread, so that Tomcat is not waiting for my 
program
to finish (which if it's a good poller, it never will)?
Ah, I see.  Using the ServletContextListener will make your life easier 
going forward, but it doesn't directly address what you're talking about 
here.  As others have said, you may be able to solve the immediate 
problem with an EntityResolver (pretty standard).  The larger question, 
though, remains.

Since there's no standard way to make a webApp unavailable after it has 
been fully initialized, whatever resources you need to verify the startup 
have to be available during the contextInitialized() timeframe.  That 
means your options for deployment are a tad limited (ie where to place 
these schemas), regardless of whether you use an EntityResolver or 
not.  It's really an issue of what types of restrictions you're willing 
to place on the deployment ... if it's always deployed as an exploded 
dir, you could use a init param to specify the OS filesystem location of 
the schema (or an EntityResolver).  If you can put the schema somewhere 
in the webapp or container's classpath, you can use the 
getResourceAsStream() method.

If you truly need to poll indefinitely for XML files (files will change 
during runtime), but reading one of them isn't required for you to start 
the context successfully, then you could fire off the thread and let your 
startup finish gracefully.

Just depends on the other conditions of your app.

justin



-Original Message-
From: Adrian Klingel [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 6:52 PM
To: Adrian Klingel - Exaweb
Subject: FW: Tomcat stops loading when I run my servlet with



-Original Message-
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 6:47 PM
To: Tomcat Users List
Subject: Re: Tomcat stops loading when I run my servlet with



Yes.  Rip out the load-on-startup.  Now.  Don't wait till
Monday.  Replace with a context listener (see:
javax.servlet.ServletContextListener).  Relax and have a stress-free
weekend.
justin

At 01:55 PM 4/23/2004, you wrote:
>Look at listeners. I think there was a similar thread a while back and 
the
>solution was to have a listener kick off the servlet after all the other
>processes were done. You could also have your servlet start and then 
wait
>for a certain amount of time, to allow time for all other processes to
>start.
>
>Doug
>
>
>- Original Message -
>From: "Adrian Klingel" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, April 23, 2004 4:03 PM
>Subject: Tomcat stops loading when I run my servlet with 

>
>
> > I have a servlet which calls a method on itself to poll a directory 
for
>XML
> > files.  When one is found, another method ("read()" is called which
> then
> > creates a SAX parser and attempts to validate the file against an XML
> > schema.  Upon calling the "parse()" method, Tomcat freezes.  It 
doesn't
> > create or write to a log, and nothing else starts up.  Nothing is
>accessible
> > on port 8080, because Tomcat doesn't make it to the point where it
> mounts
> > that port.
> >
> > When I remove the  from this particular app's 
web.xml,
> > Tomcat completes its startup process and things are accessible.  I 
can
>then
> > reintroduce the  to the web.xml and Tomcat will
> > automatically kick off the servlet.  This time nothing freezes, and 
the
> > program runs as it is supposed to.
> >
> > My program is attempting to validate this XML file against a schema
> which
>is
> > accessible locally on port 8080.  But that port is prevented from
> becoming
> > available, so the program will just wait forever.
> >
> > My question is, how can I prevent my servlet from starting up until
> after
> > Tomcat has completed its startup procedure?  I've specified higher
> numbers
> > in the  element, but to no avail.
> >
> > Thanks for any help you can offer.
> >
> >
> > -----
> > To unsubscrib

Re: Tomcat stops loading when I run my servlet with

2004-04-23 Thread Justin Ruthenbeck
Yes.  Rip out the load-on-startup.  Now.  Don't wait till 
Monday.  Replace with a context listener (see: 
javax.servlet.ServletContextListener).  Relax and have a stress-free 
weekend.

justin

At 01:55 PM 4/23/2004, you wrote:
Look at listeners. I think there was a similar thread a while back and the
solution was to have a listener kick off the servlet after all the other
processes were done. You could also have your servlet start and then wait
for a certain amount of time, to allow time for all other processes to
start.
Doug

- Original Message -
From: "Adrian Klingel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 4:03 PM
Subject: Tomcat stops loading when I run my servlet with 
> I have a servlet which calls a method on itself to poll a directory for
XML
> files.  When one is found, another method ("read()" is called which 
then
> creates a SAX parser and attempts to validate the file against an XML
> schema.  Upon calling the "parse()" method, Tomcat freezes.  It doesn't
> create or write to a log, and nothing else starts up.  Nothing is
accessible
> on port 8080, because Tomcat doesn't make it to the point where it 
mounts
> that port.
>
> When I remove the  from this particular app's web.xml,
> Tomcat completes its startup process and things are accessible.  I can
then
> reintroduce the  to the web.xml and Tomcat will
> automatically kick off the servlet.  This time nothing freezes, and the
> program runs as it is supposed to.
>
> My program is attempting to validate this XML file against a schema 
which
is
> accessible locally on port 8080.  But that port is prevented from 
becoming
> available, so the program will just wait forever.
>
> My question is, how can I prevent my servlet from starting up until 
after
> Tomcat has completed its startup procedure?  I've specified higher 
numbers
> in the  element, but to no avail.
>
> Thanks for any help you can offer.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-----
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Tomcat and restricting the size of HttpServletRequest

2004-04-23 Thread Justin Ruthenbeck
At 07:03 AM 4/23/2004, you wrote:

This also begs the question as to when my servlet gets to see an 
incoming request - I was concerned that by the time my servlet gets to 
see the incoming request Tomcat had already read the incoming data and 
stored it in the HttpServletRequest object - in which case 
request.getContentLength() is of no help.

Regards
Roger
If anyone has insight into this, I'd be very curious to get a definitive 
answer.  Although I've never explicitly explored this (or read this part 
of TC's code), it seems like Tomcat reads the entire POST, makes an 
in-memory copy of it, then passes it along to the Servlet/Filter 
processing the request.  If this is the case, then the InputStream from 
the ServletRequest is not reading data across the network.

Again, my reasons for surmising this are anecdotal.  It seems like it'd 
be easier and more fault-tolerant to have the above behavior than to 
truly stream data over the network.  Any authoritative input would be 
appreciated.

Thanks,
justin


______
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to limit concurrent requests by same user

2004-04-21 Thread Justin Ruthenbeck
You'll find quite a bit of info about this in the archives.  When this 
has come up in the past, consensus seems to have been the setting of a 
unique token within the page when generated such that each time a user 
requests a "submittable" page, that page will contain a hidden attribute 
with that token.  Implement a filter that only allows processing of that 
token once.

The problem with the solutions mentioned in this thread is that if a user 
double clicks on a form, the browser will display the output of the 
second click (which would be "nothing").  If you implement the tokens, 
the second request can wait for the first to complete, observing a result 
object that it can return once the first request finishes.  This is 
*definitely* an advanced technique, but it's the most robust, 
user-tolerant, and resource-conservative one I've used and/or seen other 
places.

Depending on your situation, the simplest way I've seen to (mostly) 
handle this is to disable the submission button with Javascript once it's 
been tapped once.  It's a point solution that's not perfect, but it'll 
catch 98% of egregious offenders.

justin

At 12:58 AM 4/21/2004, you wrote:

> I wonder if it would be possible to write a filter that would 
implement
> this functionality transparently to the JSP pages/servlets.

It could be done semi-transparently with a conditional
custom tag embracing all of an individual page's content.
That tag could check for concurrent request and then
conditionally display or omit the (costly) body of the page.
Regards
Thomas


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] how to save a form field to client

2004-04-07 Thread Justin Ruthenbeck
Yes, that can work.  A small applet with proper permissions granted would 
do the trick as well.

justin

At 06:45 AM 4/7/2004, you wrote:
Hi all,

Not really a Tomcat question but I'm hoping someone has a good
suggestion.  I have a Tomcat app with a chat client talking to a jabber
chat server.  A business requirement is to be able to click a button to
save the chat transcript to the client hard drive.  The only solution
I've come up with so far is basically submitting the text area as an
input to a servlet, that then saves the file to a temporary directory on
the server and redirects the client request to that file, which would
(hopefully) initiate the "save or open" dialog we all know and love.
Can this work?  Other ideas?

Thanks!

Andrew Longley
Senior Developer
MindFlow Technologies, Inc.
(972) 930-9988 x139
http://www.mindflow.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


______
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How can I maintain state with Axis webservice in Tomcat?

2004-04-06 Thread Justin Ruthenbeck
This is more of an Axis question, but...

Have you looked at SimpleSessionHandler?  I had to extend it to make it 
work nicer with HttpSessions, but that's really up to how you need it to 
function.  Yoav's reply is a good way to go as well.

justin

At 08:32 AM 4/6/2004, you wrote:
I've got multiple instance of a presentation front end sending requests 
to multiple instances of  the component I'm building.  I know about 
using cookies for state management, but it won't work with our case 
because we don't connect to any client web browser.  The front end does 
provide a unique id that is persistent throughout the lifecycle of the 
request.  How can I use this unique id as the unique identifier so that 
I can manage state within AXIS web services.

-
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today


______
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: tomcat5/tomcat4 comparison

2004-03-30 Thread Justin Ruthenbeck
At 12:22 PM 3/30/2004, you wrote:
Basically, the whiz-bang feature I want is JSP2.0

I have looked over whats on the site as they do show about 10 
differences in containers, so the clustering, GC improvments, some 
others, I've read.  I just need to justify the move of a handful of 
servers to tomcat 5.
Up there amongst the best reasons is availability of support.  As with 
all OSS, you benefit by aligning yourself to the "main" trunk of 
development from a bug fix and *especially* forum support point-of-view.

Many (most, it seems) of the regular contributors to this list have 
migrated to Tomcat5, so there's less of an audience anxious to work on 
Tomcat4 problems.

justin


-Original Message-
From:   QM [mailto:[EMAIL PROTECTED]
Sent:   Tue 3/30/2004 11:55 AM
To: Tomcat Users List
Cc:
Subject:Re: tomcat5/tomcat4 comparison
On Tue, Mar 30, 2004 at 09:44:23AM -0800, Neil MacMillan wrote:
: Hi all, I'm trying to gather all the information I can about pros/cons 
of
: migrating  10-15 servers from tomcat4 to tomcat5.  I have been 
unsuccessful in
: finding some good performance comparisons, and major feature differences
: between the two (major)versions.  Can anyone provide some links/docs for
: this?

Jokes aside, have you checked the release docs?  I don't have
the exact URL but they're on the website.
just a few TC5 new features/improvements that come to mind:
- support for servlet spec 2.4 and JSP spec 2.0
- clustering
- improved manager app (IIRC)
Unless you see some total whiz-bang feature that you've been
craving, then it's a matter of deciding whether you want to
upgrade just for the heck of it, or to be running the latest
version. (-and that's not necessarily a bad thing.)
-QM


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 4.1.27 fails to start

2004-03-26 Thread Justin Ruthenbeck

I'm going to go out on a limb here and suggest that perhaps you have some 
xml that you just edited where you included the string "--" within a 
comment block.  I'm basing this guess on the error message that you got:

"The string "--" is not permitted within comments."

Seriously, check the XML that you just edited and look for something that 
looks like:



Such a comment is malformed.  If you can't figure out which xml it is 
(you should be able to), look at the source Catalina.java:449.

Next time, you may want to consider thinking about the error message you 
got before posting to the list and, if you're going to post, give some 
context and an indication that you did so:

"I was trying to edit my server.xml to add a new Coyote Connector, which 
I believe I did correctly.  Now when I start my Tomcat with the 
startup.bat file, I get the following error message: [Stack Trace].  I 
couldn't figure out what was causing this, so I bumped up the debug 
level, but didn't see anything. [Debug output].  I googled for "is not 
permitted within comments" but didn't find anything useful.  I'm offering 
40 karma points for anyone who can help me with this... please."

;)
justin
At 06:40 PM 3/26/2004, you wrote:
Tomcat fails to start with the following stacktrace:
-
Catalina.start: org.xml.sax.SAXException: Stopping after fatal error:
The string
 "--" is not permitted within comments.
org.xml.sax.SAXException: Stopping after fatal error: The string "--"
is not per
mitted within comments.
at org.apache.xerces.framework.XMLParser.reportError
(XMLParser.java:1228
)
at
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XM
LDocumentScanner.java:570)
at org.apache.xerces.framework.XMLDocumentScanner.scanComment
(XMLDocumen
tScanner.java:1894)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.disp
atch(XMLDocumentScanner.java:1121)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome
(XMLDocumentS
canner.java:381)
at org.apache.xerces.framework.XMLParser.parse
(XMLParser.java:1081)
at org.apache.commons.digester.Digester.parse
(Digester.java:1548)
at org.apache.catalina.startup.Catalina.start(Catalina.java:449)
at org.apache.catalina.startup.Catalina.execute
(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process
(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main
(Bootstrap.java:203)
--
We're using Tomcat 4.1.27, JDK 1.4.2 on Windows 2000 machine.

Any thoughts?

Thanks!

- SPS


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Automatic authentication when accessing a servlet ?????????

2004-03-18 Thread Justin Ruthenbeck
Why not just have your custom client hit /pages/login.jsp first and pass 
the j_username and j_password params to it?  After this, your session 
will be active and you can go about hitting whatever you need.

justin

At 03:25 PM 3/18/2004, you wrote:
It's for administration stuff. Then there is not a lot of possible users.

I am using the form authentication, but I think I was not clear when I 
said that Tomcat popups up a page... in fact, Tomcat redirect to my 
login page. No popup is displayed...

here is only the login-config (from web.xml) the security-constraint 
part is set


FORM
Form-Based Authentication Area

/pages/login.jsp
/pages/error.jsp


I am using the j_security_check functionality provided by Tomcat. If my 
component sends a request, Tomcat will try to popup this page... if I 
add the j_username and j_password to the same request, will Tomcat 
retrieves these authentication parameter and performs an automatic 
authentication... do I have to config something else to make it work ?

Is it clearer now :)

Thanks all

Eric




From: "Parsons Technical Services" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Subject: Re: Automatic authentication when accessing a servlet ?
Date: Thu, 18 Mar 2004 18:12:09 -0500
Is this for a few users or a bunch?

If it is a few users then HTTPS Client authentication may work.

But more likely what will fit your plan is to use form authentication. If
you are getting a prompt for name and password then you are using basic
authentication. See SRV .12.5 in the Servlet 2.4 spec. For examples the 
TC
manager uses basic where the admin uses form.

Doug
www.parsonstechnical.com


- Original Message -
From: "Halcyon62 ." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 18, 2004 4:32 PM
Subject: Automatic authentication when accessing a servlet ?
> Hi
>
> Is it possible to incorporate the j_username & j_password (used by the
> servlet "j_security_check") in the request to authenticate the 
caller and
> then, grant access to the servlet that i am trying to access ?
>
> I explain the context:
>
> I have a servlet that allows the caller to download of log files. I 
can
> download these logs using my browser, enter the address and then 
select
the
> log I want.
>
> Now, I want to get these log automatically. I built an external 
component
to
> perform that (it's a requirement i have). The external component 
builds
the
> HTTP request and sends it to Tomcat. If the security constraint it
commented
> out, it works perfectely. But if the security constraint is on, it 
does
not
> work because Tomcat is trying to popup a login page, waiting for 
username
&
> password.
>
> Then, is it possible to incorporate the j_username & j_password 
(used by
the
> servlet "j_security_check") in the request to authenticate the 
caller and
> then, grant access to the servlet that i am trying to access ?
>
> _
> MSN Premium helps eliminate e-mail viruses. Get 2 months FREE*
>
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
MSN Premium helps eliminate e-mail viruses. Get 2 months FREE*
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Port-per-webapp?

2004-03-17 Thread Justin Ruthenbeck
Tony,

Glad to hear you got it working.  The things you did (clear cache, 
restart services, reenter configuration) often solve problems like 
this.  Doesn't provide for a clean explanation of what was wrong, but 
that's a different story.

As for the escape chars, whether they should be escaped really depends on 
who's reading the value.  I've never used the IIS plugin, so I have no 
idea what the behavior is -- an IIS user would have to chime in.

justin

At 07:24 AM 3/17/2004, you wrote:
Hi Justin,

Thank you very much for your help, but I finally got it to work!!
I reconfigured registry settings, cleared cache in Tomcat and IE,
restarted all IIS and Tomcat services manually one by one, and
it began working.
I do have one final question though... In the registry setting
tutorials, I see both c:\tomcat\blahblah and c:\\tomcat\\blahblah
should we or should we not use escape character as in the second
entry?
Thanks again!

Tony

- Original Message -
From: "Tony Nakamura" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 17, 2004 8:16 AM
Subject: Re: Port-per-webapp?
> Hi Justin,
>
> >Be sure, of course, that
> > the files you're editing are indeed the ones being read -- for 
example,
> > make sure that by removing /examples from uriworker.properties, IIS 
no
> > longer serves the Tomcat examples.
>
> Great point... I removed the /examples from uriworkermap.properties, 
and
> it's
> still serving the http://localhost/examples!!!
>
> I checked my registry settings, and it's pointing to the exact 
location to
> the
> uriworkermap.properties:
> Registry for worker_mount_file:
> c:\\jakarta_tomcat\\appserver\\conf\uriworkermap.properties
> file location:
C:\jakarta_tomcat\appserver\conf\uriworkermap.properties
>
>   How could this be..?
>
> Just in case, I am pasting the worker.properties, 
uriworkermap.properties,
> and context from the server.xml.  Thank you!
>
> ===uriworker.properties=
> # *** Begin uriworkermap.properties ***
> # Mount the Servlet context to the ajp13 worker
> /servlet/*=ajp13
>
> # This webapp works
> /Analyzer6_Server/*=ajp13
>
> #This works too/examples/*=ajp13
>
> #This does NOT work
> /examples2/*=ajp13
> /examples2/*.jsp=ajp13
> ==
>
> worker.properties==
> #  Begin worker.properties **
> worker.ajp13.type=ajp13
>
> #
> # Specifies the load balance factor when used with
> # a load balancing worker.
> # Note:
> #  > lbfactor must be > 0
> #  > Low lbfactor means less work done by the worker.
> worker.ajp13.lbfactor=1
>
> #
> # Specify the size of the open connection cache.
> #worker.ajp13.cachesize
>
> #
> #-- DEFAULT LOAD BALANCER WORKER DEFINITION --
> #-
> #
>
> #
> # The loadbalancer (type lb) worker perform weighted round-robin
> # load balancing with sticky sessions.
> # Note:
> #  > If a worker dies, the load balancer will check its state
> #once in a while. Until then all work is redirected to peer
> #worker.
> worker.loadbalancer.type=lb
> worker.loadbalancer.balanced_workers=ajp13
>
> #
> # worker.tomcat_home should point to the location where you
> # installed tomcat. This is where you have your conf, webapps and lib
> # directories.
> #
> worker.tomcat_home=c:\jakarta_tomcat\\appserver
>
> #
> # worker.java_home should point to your Java installation. Normally
> # you should have a bin and lib directories beneath it.
> #
> worker.java_home=c:\jakarta_tomcat\\jdk
>
> #
> # You should configure your environment slash... ps=\ on NT and / on 
UNIX
> # and maybe something different elsewhere.
> #
> ps=\
>
> #
> #-- ADVANCED MODE 
> #-
> #
>
> #
> #-- DEFAULT worker list --
> #-
> #
> # The worker that your plugins should create and work with
> worker.list=ajp13
>
> #
> #-- DEFAULT ajp13 WORKER DEFINITION --
> #-----
> #
>
> #
> # Defining a worker named ajp13 and of type ajp13
> # Note that the name and the type do not have to match.
> #
> worker.ajp13.port=8009
> worker.ajp13.host=w2k3dfvm2
>
> #  End 

Re: Port-per-webapp?

2004-03-16 Thread Justin Ruthenbeck
Tony,

Can you include your full uriworker.properties and worker.properties 
files (inline in the email) for us to look at?  Be sure, of course, that 
the files you're editing are indeed the ones being read -- for example, 
make sure that by removing /examples from uriworker.properties, IIS no 
longer serves the Tomcat examples.

If there's something wrong with your config files, we should catch it 
pretty easily.

justin

At 01:20 PM 3/16/2004, you wrote:
Hi Justin,

Thank you very much for your input (and it's nice to know that my email is
actually
getting distributed).  I've looked extensively at the documentation for 
days
now, and
I cannot figure it out.

The problem I'm having is that the forwarding is "selective".  I have two
webapps:
"webapp1 and examples" that are correctly forwarded by IIS but not the 
ones
that I deploy.

In order to test it, I simply copied the "examples" to "examples2" and 
added
the
following lines to uriworker.properties:

   /examples2/*=ajp13

where ajp13 is my worker name that is defined in the worker.properties 
file.

I get 404-file not found error- when I try to access
http://localhost/examples2/, but
it works if I rename "examples2" to "examples".  So it has to be some
configuration
error, but I just can' t seem to find out which configuration.
Any suggestion helps, thank you!



Tony



- Original Message -
From: "Justin Ruthenbeck" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 16, 2004 3:10 PM
Subject: Re: Port-per-webapp?
>
> You have to configure the IIS plugin to path-forward URLs that have 
your
> webapp name in them.  I don't use IIS, so I don't know specifically how
> it's done, but it's basically a way of telling IIS that anything 
matching
> "my.server.com/myApp" should go to the connector instead of being 
served
> by IIS.
>
> You can test to make sure that this is your problem by adding a file to
> IIS's doc root that matches the url that is supposed to go to 
Tomcat.  If
> you get the page served by IIS, then your forwarding isn't working
> (alternately, the 404 page should indicate whether it's coming from IIS
> or Tomcat).
>
> Look at the connector docs -- I'm sure the specific files/steps are in
> there... Or perhaps an IIS user will respond here.
>
> justin
>
>
> At 01:04 PM 3/16/2004, you wrote:
> >Does anyone not know anything about this?  I'm wondering whether this
> >email is even reaching everyone.?
> >
> >- Original Message -
> >From: "Tony Nakamura" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >Sent: Tuesday, March 16, 2004 12:51 PM
> >Subject: Port-per-webapp?
> >
> >
> > > Hi,
> > >
> > > I am encountering something interesting, and I really hope that
someone
> >will
> > > give me an
> > > insight.
> > >
> > > I'm working on an existing Tomcat 4.1.18 with some webapp 
deployed by
> > > previous developer.
> > > I am using IIS5 and isapi_filter, and it redirects fine to the
previous
> > > webapp that was deployed.
> > >
> > > And here's the problem:  previously deployed webapps are working 
fine
> > when
> > > request was forwarded
> > > by IIS5, but my newly deployed webapps only work on port 8080 and
> > outputs
> > > 404 - file not found error
> > > when I try to access it via IIS.
> > >
> > > Is there a port specification per-webapp?
> > >
> > >
> > > Thank you in advance!!
> > >
> > >
> > > Tony
> > >
> > >
> > > 
-
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: 
[EMAIL PROTECTED]
> > >
> > >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> __
> Justin Ruthenbeck
> Software Engineer, NextEngine Inc.
> justinr - AT - nextengine DOT com
> Confidential. See:
> http://www.nextengine.com/confidentiality.php
> __
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Port-per-webapp?

2004-03-16 Thread Justin Ruthenbeck
You have to configure the IIS plugin to path-forward URLs that have your 
webapp name in them.  I don't use IIS, so I don't know specifically how 
it's done, but it's basically a way of telling IIS that anything matching 
"my.server.com/myApp" should go to the connector instead of being served 
by IIS.

You can test to make sure that this is your problem by adding a file to 
IIS's doc root that matches the url that is supposed to go to Tomcat.  If 
you get the page served by IIS, then your forwarding isn't working 
(alternately, the 404 page should indicate whether it's coming from IIS 
or Tomcat).

Look at the connector docs -- I'm sure the specific files/steps are in 
there... Or perhaps an IIS user will respond here.

justin

At 01:04 PM 3/16/2004, you wrote:
Does anyone not know anything about this?  I'm wondering whether this
email is even reaching everyone.?
- Original Message -
From: "Tony Nakamura" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 16, 2004 12:51 PM
Subject: Port-per-webapp?
> Hi,
>
> I am encountering something interesting, and I really hope that someone
will
> give me an
> insight.
>
> I'm working on an existing Tomcat 4.1.18 with some webapp deployed by
> previous developer.
> I am using IIS5 and isapi_filter, and it redirects fine to the previous
> webapp that was deployed.
>
> And here's the problem:  previously deployed webapps are working fine 
when
> request was forwarded
> by IIS5, but my newly deployed webapps only work on port 8080 and 
outputs
> 404 - file not found error
> when I try to access it via IIS.
>
> Is there a port specification per-webapp?
>
>
> Thank you in advance!!
>
>
> Tony
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-----
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Releasing JK 2.0.4

2004-03-16 Thread Justin Ruthenbeck
The binaries aren't available yet because it hasn't been released 
yet.  Just wait for the official release (with the official release 
notice posted here) and get the binaries then.

justin

At 09:41 AM 3/16/2004, you wrote:
i managed the cvs checkout, but i am not able to build the isapi dll 
with VS7. Several modules are missing. Is there any build howto on the web?

Yiannis Mavroukakis wrote:

Taken from http://jakarta.apache.org/site/cvsindex.html
If you don't have cvs, get it :)
then do
cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
The password is anoncvs
Then cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout
jakarta-tomcat-connectors
That should do it, assuming the latest is in CVS.
-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: 16 March 2004 13:40
To: Tomcat Users List
Subject: RE: Releasing JK 2.0.4
I was afraid of that answer, i've never downloaded anything through 
cvs. Can
you point me to a short description of how to set it up?
If not I'll wait for the announcement that the tarball is on the mirrors.
Ta
Matt
-Original Message-
From: Yiannis Mavroukakis [mailto:[EMAIL PROTECTED]
Sent: 16 March 2004 13:39
To: 'Tomcat Users List'
Subject: RE: Releasing JK 2.0.4

CVS?:)
-Original Message-
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: 16 March 2004 13:30
To: Tomcat Users List
Subject: RE: Releasing JK 2.0.4
Hi,
Where does one download this version?
Ta
Matt
-Original Message-
From: Yiannis Mavroukakis [mailto:[EMAIL PROTECTED]
Sent: 16 March 2004 13:18
To: 'Tomcat Users List'
Subject: RE: Releasing JK 2.0.4
New release! I'll roll out the red carpet :)))
-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]
Sent: 16 March 2004 12:36
To: [EMAIL PROTECTED]
Subject: Releasing JK 2.0.4
Hi,
Seems that the shm is working now.
Greg, have you been able to test it with the current patches?
Anyhow IMO it should work, cause the same problem manifested on FreeBSD 
has been solved.
Henri, when do you plan to tag the release?
MT.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.
Note:__
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.
Note:__
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.
Note:

Re: delaying context reload

2004-03-16 Thread Justin Ruthenbeck
Cindy,

If this is a problem for you, turn reloading off in your context.xml and 
use the manager app's Reload command instead.  This command can be 
executed either through hitting a URL, using the manager html pages, or 
(best) through an Ant command.  Doing this means the reload only happens 
when you request it.  It's a standard way to do things.

Alternately, change the interval at which reload checks happen (I don't 
use this, so I don't know where this is set).  If you double the reload 
check time, you should halve the number of time you have the problem (and 
double the average wait for a reload).

In short, use the manager.  :)

justin

At 09:23 AM 3/16/2004, you wrote:
At 08:00 PM 3/15/04 -0500, Christopher Schultz wrote:
>Run Plugin:"c:\eudora\attach\Re delaying context reload.ems <0880.0002>"
>
Hi Chris,

No, I'm not using Ant (yeah, yeah, I know I should...) This is my local 
development machine where I have WEB-INF/classes set as my output 
directory when I compile. This has worked fine, but as things have 
become more complex the server reload has started to beat the compile. I 
was just hoping to find a way to delay the reload a few seconds. Since 
none of the responses I recieved offered a solution, I guess I should 
assume that this is not possible with this version of Tomcat.

BTW. I couldn't open your PGP signed message and had to read it in the 
archive.

Cindy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Strange cross-context bean/session behaviour

2004-03-11 Thread Justin Johnson
I have an internal website, split into several web applications.  A problem
has been co-ordinating a UserDataBean across the sessions for each app, so
that the user's preferences change across all apps simultaneously.

Here's the tag that puts a UserDataBean into the session; it's at the top of
all pages:





The body should be executed only if there is no bean attached to 'user' in
the session, and that's what appears to happen.

The co-ordination problem was solved by having each bean register itself
with a singleton that dispatches propertyChanged events to other beans for
the same user.  I created a reporting function for the singleton to inspect
it, and got this:

Number of UserDataBeans listening: 3
Listening sessions:
89140B58A732CF2989E5F3D9D7D58AA3 [Intranet]
1E8628A77789A26C49AB80AA3B0B8665 [Project Template]
1E8628A77789A26C49AB80AA3B0B8665 [Intranet]

[Intranet] is the contextName of the root app; [Project Template] is the
name of the app that is a template for other apps.  Notice that there are
three beans, but only two sessions.

The session starting 8914 is initialized on hitting the home page, and a
bean is created for it.  The session starting 1E86 is initialized on first
hitting the template app, and a bean is created for it.  My question is
about the second bean created for the session starting 1E86.

Every page uses  to grab
mainMenu.jsp from the root context; mainMenu has the same  tag
as I listed above.  What's apparently happening is that, since the import is
cross-context, mainMenu is being processed as being in the root context, not
the template context (as it should be, I believe).  However, the session to
which that bean is attached is the Template session.  In other words, the
template session is going cross-context.

At the point the import is executed, both sessions already have a
UserDataBean attached to 'user' in the session.  So why is a third created?
In either session, and in either context, the bean is already initialized
and attached.  The index page of the root app also imports mainMenu.jsp
locally, but doesn't create a bean in that case (the order of the beans
above is necessarily the order in which they were created; the third,
unnecessary bean was only created after the cross-context import).  

This isn't a problem, per se, just a strange behaviour that I would like to
understand.  Any insight is appreciated.

Justin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: java.library.path question???

2004-03-10 Thread Justin Ruthenbeck
Some hints to get you there...

Think about how you start Tomcat (assuming it's not as a Windows 
service).  If you were to edit that startup script to add your dll 
location to the java.library.path, then it would be available when you 
run.  If you're running with low-level tools, this will be 
straight-forward.  If you're running with an IDE, it'll be a tad more 
complicated (like everything else).

justin

At 05:29 PM 3/10/2004, you wrote:
When I run a servlet in Tomcat that executes some JNI code that calls a 
DLL,
it fails with an 'unsatisfiedlinkerror'. The problem is that my DLL that 
JNI
uses was
not in my SYSTEM path. When I put it in there, all is well.
What I would like to do is NOT put it in my SYSTEM path, but rather into a
configuration file.
Which config file/startup file do I modify so that the java.library.path
System property will
hold this path???

i.e.
System.getProperty("java.library.path") needs to also have my DLL's
directory in it
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


______
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  1   2   3   4   5   6   >