Re: Tomcat vs (other container) compatibility

2007-11-17 Thread Wade Chandler
The main point to keep in mind is that Tomcat only implements the Servlet and 
JSP specifications from JEE, and thus is a Servlet container and is not an EE 
container. Very important part of the puzzle to keep in mind, so moving from TC 
to one of the others should be very easy unless of course you are using 
anything Tomcat specific. In that case you won't be able to just move it 
without some rewrite.

As far as others stole Tomcat, I think we need to make sure we always know 
the entire story and know whose original investments went into works, though it 
has come a long long long way since the donation, if we are going to bring it 
up:
http://en.wikipedia.org/wiki/Apache_Tomcat#History

Wade

- Original Message 
From: Johnny Kewl [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, November 17, 2007 7:26:41 AM
Subject: Re: Tomcat vs (other container) compatibility

- Original Message - 
From: Jacob Rhoden [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, November 17, 2007 1:40 PM
Subject: Tomcat vs (other container) compatibility


 Hi,

 Just wondering if there is anyone who has been or is involved in
 cross JEE 
 container work, how compatible are tomcat apps with other commercial
 apps 
 such as OC4J, Websphere, BEA and so on? If you don't use tomcat
 specific 
 things, does it just work, I ask because the compatibility issue
 might 
 come up at work.

Heres an article from IBM site
http://www.ibm.com/developerworks/websphere/library/techarticles/0511_li1/0511_li1.html

I have put quite a few TC servlets onto Glassfish... no problem.

I think in general you will find very little problems moving Tomcat (A 
Servlet Container) to one of the above (EJB containers).
Both J2EE but they different animals.

Tomcat webapps generally migrate easily to most servers because they
 all 
stole tomcat to begin with ;)
 inside most of this EJB containers you will find something that
 looks 
very much like Tomcat.

So in general no problem...

But amongst EJB servers this is not true... ie if you want to move from
 say 
WebSphere to Jboss, or Spring or Glassfish... then suicide is a very
 real 
possibility ;)
Tomcat is actually one of the few common denominators between these 
servers once you have applied EJB tools, then portability is an
 issue.



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





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



Re: running! a servlet at tomcat startup

2007-11-05 Thread Wade Chandler
See Servlet.getServletConfig() and ServletConfig.getServletContext(). 


Wade


- Original Message 
From: Johnny Kewl [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, November 5, 2007 6:16:17 AM
Subject: Re: running! a servlet at tomcat startup

OK, now I'm officially wondering... if one cant get at Request... is
 there a 
better way
to find the name of the web-app/context?





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



Re: running! a servlet at tomcat startup

2007-11-05 Thread Wade Chandler
Yes, and in the listener I would then utilize some kind of other web client to 
actually perform a first request. You can use something like HttpClient or one 
of the command line text browsers and Runtime.exec. It would probably be easier 
than trying to simulate with some other means, but I may be wrong..especially 
if you already know what you are doing will work without having to have the 
extra client connection, but it would seem a lot less code to just have a 
config file you fill in and a client which makes a simple http web request.

Wade


- Original Message 
From: Caldarale, Charles R [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, November 5, 2007 10:39:47 AM
Subject: RE: running! a servlet at tomcat startup


 From: loredana loredana [mailto:[EMAIL PROTECTED] 
 Subject: Re: running! a servlet at tomcat startup
 
 In case ur wondering why I used a servlet to fill 
 the cache is because I need some variables like 
 request.getContenxtPath, getRealPath() etc. 

Wouldn't a ServletContextListener be more appropriate for this kind of
activity?  See section 10 of the servlet spec for details.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
 PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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






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



Re: How to increase Tomcat webserver speed?

2007-10-05 Thread Wade Chandler
On that note you can get NetBeans and its profiler and then profile your code.
 
http://www.netbeans.org

It will tell you different things about time spent.

Wade


- Original Message 
From: Leon Rosenberg [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, October 5, 2007 3:11:48 PM
Subject: Re: How to increase Tomcat webserver speed?

many interesting mails, but lacking advices :-)

i would hardly recommend you to actually measure your webapps performance.
You can use a filter to measure the request duration, and measure the
db call duration from your persistence service and by that determine
where the time is lost, db or tomcat. Whatever it is, you can
investigate further.
Most database system also offer sql statement duration logging, so you
can see which statements take how long.
It can be the markup generation, the io, the database pooling, a bad
synchronized block, inefficent loop somewhere or 1000 other possible
causes. You will know when you start to measure :-)
regards
Leon


On 10/5/07, Stephen Caine [EMAIL PROTECTED] wrote:
 Keglius,

 Assuming you are using a web browser to display your data, consider
 the HTML used to construct the page.  Regardless of how fast your
 database is, using TABLEs will always be slower than just using PRE
 or BR tags.  While this may not be very pretty, it does result in
 much faster screen draws.  In some browsers, the table does not start
 drawing until the last record is transferred; while on others rows
 begin to appear as soon as the first record is transferred.

 The other suggestions, such as using indexes, will certainly help.

  From our experience, with sufficient memory and CPU processing
 speed, Tomcat is very fast.

 Stephen Caine
 Soft Breeze Systems, LLC

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



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






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



Re: PHP Security Vulnerability???

2007-09-17 Thread Wade Chandler
- Original Message 
From: Arend P. van der Veen [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, September 17, 2007 7:43:36 AM
Subject: Re: PHP Security Vulnerability???

Wade Chandler wrote:
 --- Arend P. van der Veen [EMAIL PROTECTED] wrote:
 ...
 Hi,

 This turned out to be a false positive.

 I use /cgi-bin as a url-pattern for a servlet mapping:

  servlet-mapping
  servlet-nameProxyServlet/servlet-name
  url-pattern/cgi-bin/*/url-pattern
  /servlet-mapping

 I essentially was sending references to cgi-bin to apache listening on
 the loopback.  I also set a security-constraint for this url-pattern.
 Finally, I set the login-conf to form based authentication.  When Nessus
 tried to access URL such s /cgi-bin/phpinfo.pgp it returned an http
 error of 200 even though it did not exist.  Not sure why.  But Nessus
 assumed that the 200 meant that it existed.  When I switched the login
 configuration to basic authentication the problem went away.  This had
 something to do with form based authentication.

 A finally found that if a simply changing the URL binding to from
 cgi-bin to xyz.  Now with form based authentication everything works.

 Thanks,
 Arend

 ...
 Hi Martin,

 I can supply you a couple of things:

 1.  Tomcat access logs showing the Nessus attack that generated the problem.
 2.  A detailed description of my configuration that generated the error 
 and what I did to fix it.
 3.  A sample app that generates the problem.
 4.  All of the above.

 Please let me know what you want and I will forward it to you.

 Thanks,
 Arend

 
 I meant to write before, and it slipped my mind. The reason this occurs with 
 form based
 authentication is because form based authentication is a pure server side 
 thing. It doesn't tell
 the client...oh hey, by the way, I'm going to need you to authenticate. 
 Instead it sends back an
 actual web page which happens to ask the user to login. So, the scanner tried 
 to hit the URL it
 thought would have phpinfo (anything else under that path should give the 
 same results), and it
 did in fact get returned a valid HTML page, yet not anything related to 
 phpinfo. This sounds like
 a bug in the scanner though as it should analyze the return and not whether 
 something was just
 returned or not. Someone might have their server setup to return a page which 
 explains this is not
 available if on an external NIC port and if on an internal one to return the 
 actual phpinfo.
 
 Wade
 
 
 ==
 Wade Chandler
 Software Engineer and Developer
 
 Netbeans Community and Dream Team Member:
 http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
 
 Check out Netbeans at:
 http://www.netbeans.org
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
This matches what I see.  Can I relay some of this information to Nessus 
in a bug report? Thanks for your help.

Absolutely, I believe anything from a public mailing list is free for all ;-)

Wade





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



RE: Tomcat JNI Netbeans

2007-09-12 Thread Wade Chandler
You can load a native library directly using System.load instead of 
System.loadLibrary. All you
have to do is figure out where the library is and be able to pass a full path 
to it. You can use
the servlet API to get to your WEB-INF folder and get a full path to it. It is 
pretty trivial from
there to make a System.load(fullPathToFile) call. 

You can also add extra options to Tomcat to set the Java library path. 
Depending on how you run
Tomcat this can differ. For instance, you can set in a script for the user TC 
is run as, in some
script you have which runs TC, or in catalina.bat/.sh an environment variable 
called JAVA_OPTS and
part of this variable can be a list of directories for native libraries:
set JAVA_OPTS=-Djava.library.path=C:\somepath\somefolder;C:\someotherpath

or

export JAVA_OPTS=-Djava.library.path=/somepath/somefolder:/someotherpath

Wade

I didn't see the entire thread. Do you need to do something else specifically?

Wade

--- soulboy [EMAIL PROTECTED] wrote:

 
 Thanks for the reply,
 
 
  From: soulboy [mailto:[EMAIL PROTECTED] 
  Subject: RE: Tomcat JNI Netbeans
  
   Does that work with JNI ?
 
  JNI has nothing to do with Tomcat,
 
 Not sure what you mean by that.
 
   but rather with the JVM you're using.
  For Sun-based JVMs, the location of native libraries must be specified
  via the java.library.path system property.  When running on UNIX/Linux
  platforms, the default value of that property is taken from the
  LD_LIBRARY_PATH environment variable; for Windows, it comes from PATH.
  The system property can alternatively be set directly on the launcher
  command line.
 
 Yes I am aware of this.
 
  Tomcat 6 uses a much simplified classloader hierarchy both to reduce
  overhead and make certain operations easier, such as direct referencing
  of Tomcat-specific classes.  Changing the classloader hierarchy to be
  compatible with 5.5 or earlier is a step backwards.
 
 Ok well I take your word for it, I am new to Java so I am sure you are right
 but it doesnt mean much to me.
 
   All the instructions for JNI with Tomcat say use
   $CATALINA_HOME/shared/lib.
 
  What instructions are those?  If they're coming from some 3rd party,
  they're out of date (not unusual).
 
 Yes you are probably right however do you know where there are any official
 instructions on setting up JNI and Tomcat ? 
 
  Also I would prefer to keep my jars separately 
  as its easier to keep track of things.
 
  Which is why the servlet spec recommends that webapps be implemented
  independently, and jars should go into WEB-INF/lib of each webapp, even
  if that means duplicating them.  Since you're insisting on using JNI
  (thereby guaranteeing your app is not portable), you're stuck with the
 
 Actually for this project portability isnt important but being able to call
 third party DLLs is. If it wasnt for JNI we couldnt use Java. I wouldnt
 be surprised if this keeps cropping up.
 
  Java restriction that a native library can only be loaded once,
  regardless of the number of classloaders that want to use it.  I'd still
  put the common jar in Tomcat's lib directory, since that's simple and
  straightforward.
 
 Ok thanks again
 -- 
 View this message in context: 
 http://www.nabble.com/Tomcat-JNI-Netbeans-tf4376281.html#a12647448
 Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: PHP Security Vulnerability???

2007-09-11 Thread Wade Chandler
Does it give you any paths to this PHP application? I haven't seen anything 
like it from scanners
on my server.

Wade

--- Arend P. van der Veen [EMAIL PROTECTED] wrote:

 Hi,
 
 I recently setup a server using Tomcat 5.5 on FreeBSD 6.2.  I thought I 
 had everything locked down.
 
 I run a nessus scan and found a strange Vulnerability.  It says that states:
 
 The remote web server contains a PHP application that is affected by
 multiple vulnerabilities.
 
 I am not using PHP.  Has anyone else seen this?
 
 Thanks,
 Arend
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: Concurrency with HttpSession

2007-09-10 Thread Wade Chandler
I had been too quick with it before, and came up with
what I think is a better fix. I haven't submitted a
patch, but I suppose I could. I work on the NetBeans
project and it would be about the same. For anyone
interested in this issue it is at:
http://issues.apache.org/bugzilla/show_bug.cgi?id=43343

Wade

--- Christopher Schultz [EMAIL PROTECTED]
wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Wade,
 
 Wade Chandler wrote:
  Do you want to file a bug or do you want me to?
 I'm
  looking at the Tomcat 6.0.9 source code.
 
 Even if nobody decides to do anything, please PLEASE
 log this bug and
 get this discussion into bugzilla.
 
 Thanks,
 - -chris
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla -
 http://enigmail.mozdev.org
 

iD8DBQFG5WNd9CaO5/Lv0PARAuEOAKCdmSe8o0U6HNVhux9GTDKCXDOZmQCgutEk
 K2bbhI7o08vs6iYOChp1U34=
 =Cugw
 -END PGP SIGNATURE-
 

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


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



Re: [OT/RANT] Quartz

2007-09-10 Thread Wade Chandler
Well, I have a couple of web applications which suck
up a thread for such things as well. I do it so that I
can schedule processes through this single application
and the end people do not need anything else, and also
because if they had to admin their own servers in
these instances it would just look bad on me as the
scheduled processes need to be configured by simple
end users who don't know anything about the server. I
guess it really depends on the usages, and these
applications run on Windows or *nix. I don't use
Quartz, but instead just some custom classes.

Wade

--- Christopher Schultz [EMAIL PROTECTED]
wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Ben,
 
 Ben Souther wrote:
  Hehe.
  
  It's amazing what you can do with one line of code
 using cron and wget.
 
 For real.
 
 I've never found an application where it makes sense
 to have a scheduled
 job run inside the webapp.
 
 I realize that lots of folks don't have direct
 access to their own
 production servers (basically WAR drop-offs), but
 when you start to need
 your own scheduled jobs, it's time to grow up and
 admin your own boxes.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla -
 http://enigmail.mozdev.org
 

iD8DBQFG5X879CaO5/Lv0PARApy0AJ9YRW2HFuenZKxK8mYWeSAWRjfPdwCeNrRJ
 0v54aZRuxgzhZL7dtJGnYNQ=
 =Wvvi
 -END PGP SIGNATURE-
 

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


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



Re: Concurrency with HttpSession

2007-09-08 Thread Wade Chandler
You got my attention, so I was curious.

Looking at file:
java/org/apache/catalina/session/PersistentManagerBase.java

methods:
swapIn
swapOut
writeSession
findSession
(other related)
then the different stores load and save methods it
doesn't look good. 

Basically, yes, you have an issue with Tomcat and
session passivation, unless I missed something else.
It does not have code for locking the session during
read and write. 

What really needs to happen is a session needs to have
an instance variable which can be used for a
synchronization lock at the session level. In
ManagerBase.findSession, this lock would be used
before the session map is accessed. After the session
map is accessed it should then return null if the
session had been passivating before it was asked to be
found. It would then be loaded before it was ever
given back to be accessed. It would also be used in
PersistentManagerBase.swapOut like this:

protected void swapOut(Session session) throws 
IOException {

if (store == null || !session.isValid()) {
return;
}

synchronized(session.locker){
//some check(s) needs to be added to see
//if the session was accessed before
//the call to initiate this process
//occurred
((StandardSession)session).passivate();
writeSession(session);
super.remove(session);
session.recycle();
}

}

This way a session can not be found before it is
completely written to disk/store. Some checks, as
mentioned in a comment in the code, need to be in
place to make sure the session was not accessed after
the method was called. It could be that the method is
called to begin right as the session has been accessed
and after the lock is released in findSession. So, you
would have a session and have some issues. Your user
would have a time when they thought they set something
or your code could think this then immediately the
changes are lost. Anyways, that is what looks to be
the issue.

The only way you could possibly *sort of* workaround
this issue would be to use a
HttpSessionActivationListener, but even then it would
be hard to code up a 100% reliable solution. You can
see how this would *sort of* be a way to work around
the issue by looking at the Tomcat class
StandardSession method passivate (in the same folder
as PersistentManagerBase.java), and see the events
will be thrown, but it would be pretty complicated and
ugly. This reminds me of the Session and Application
HashMap issue I mentioned before. It may not be the
case, but in that instance the developer thought
skipping the locks would speed up the server, but the
issue made it (Tomcat) less reliable and the speed
gain was by no means a match for the possible data
loss.

Do you want to file a bug or do you want me to? I'm
looking at the Tomcat 6.0.9 source code.

Wade

--- lightbulb432 [EMAIL PROTECTED] wrote:

 
 I'm not talking about EJBs, but rather about any
 Tomcat-specific passivation
 that is done for HttpSessions that haven't been
 accessed in a while (just a
 memory use optimization).
 
 Regarding my question in general, I'm wondering
 (maybe this is more of a
 serialization question in general), if the container
 decides to serialize to
 disk a session with 10 attributes, and the following
 happens, wouldn't it
 result in an inconsistent serialized session? The
 container's thread
 finishes writing the first 5 attributes to disk,
 then a request's thread
 updates two session attributes (one from the first
 5, one from the next 5),
 then the container writes the next 5 attributes to
 disk.
 
 You'd have an inconsistent serialized view, right?
 With only one of the two
 attribute updates reflected in the session. Sure,
 you'd assume that once a
 request accesses the session, the passivation would
 stop. Nonetheless, what
 thread-safety issues might arise with Tomcat in this
 case and others?
 
 I'm asking more for learning than any particular
 issue I'm having.
 
 
 
 mgainty wrote:
  
  I found this doc applicable
  You can pass the HttpSession as parameter to an
 EJB method, only if all 
  objects in session are serializable.
  This has to be consider as passed-by-value, that
 means that it's read-only 
  in the EJB.
  If anything is altered from inside the EJB, it
 won't be reflected back to 
  the HttpSession of the Servlet Container
  
  More to the point of your test scenario:
  The pass-by-reference can be used between EJBs
 Remote Interfaces, as they 
  are remote references.
  While it is possible to pass an HttpSession as a
 parameter to an EJB
  object, 
  it is considered to be bad practice in terms of
 object-oriented design.
  This is because you are creating an unnecessary
 coupling between back-end 
  objects (EJBs) and front-end objects
 (HttpSession).
  
  In any case could you post an the aforementioned
 where the session 
  attributes are being modified so we can look at
 it..
  
  Thanks/
  M--
  This email message and any files transmitted with
 it 

Re: Concurrency with HttpSession

2007-09-07 Thread Wade Chandler
Tomcat wraps HttpSession objects underlying maps using
java.util.Collections.synchronizedMap. There was a
previous issue in a version of Tomcat 5.0.x something
in which this was changed, and it raised a stink, so
it was fixed again. It had to be put back to use
synchronized as the concurrency issues caused such
headaches the developer had no way to manage this from
an application perspective. I can't imagine Tomcat
would have calls which are not synchronized to pull a
session back from storage either. The user certainly
would not have any control over such a thing as JSP
session access can not be wrapped easily by developers
using normal synchronization techniques. Are you
having some specific issue?

Wade

--- lightbulb432 [EMAIL PROTECTED] wrote:

 
 I'm reading some book concurrency books that talk
 about potential thread
 safety issues with HttpSession. Specific cases
 follow:
 
 - When the web container passivates an HttpSession
 while a user's request
 modifies it
 - When the web container replicates an HttpSession
 while a user's request
 modifies it
 - When multiple quick, successive requests from the
 same user access the
 same HttpSession
 
 Could somebody explain how Tomcat deals with the
 first two, and what steps
 web application developers need to take to avoid
 concurrency problems with
 all three cases above? Is it guaranteed that the
 passivated/replicated
 object is always a consistent view of the
 HttpSession?
 
 Thanks.
 -- 
 View this message in context:

http://www.nabble.com/Concurrency-with-HttpSession-tf4403264.html#a12561600
 Sent from the Tomcat - User mailing list archive at
 Nabble.com.
 
 

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


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



Re: Concurrency with HttpSession

2007-09-07 Thread Wade Chandler
I suppose in a situation where a server did not handle
concurrency for you in the lowest possible level the
version of JSTL and EL and such things which it used
could handle concurrency by wrapping such access, but
this would then mean you could not access the session
in regular coding practices because you would not have
access to the same locks the JSP support code was
using, so you as a developer would have to choose
between some pure JSP versus servlet type application
instead of mixing the two, and even then I don't see
how you could truly use JSP as you have to access your
logic and the session one way or another at some
point...that or make your own session, so I don't
think with the current specifications it would be
possible for a server to be reliable for any real
usage if it did not handle the concurrency issues
itself at the lowest possible levels.

Wade

--- Wade Chandler [EMAIL PROTECTED]
wrote:

 Tomcat wraps HttpSession objects underlying maps
 using
 java.util.Collections.synchronizedMap. There was a
 previous issue in a version of Tomcat 5.0.x
 something
 in which this was changed, and it raised a stink, so
 it was fixed again. It had to be put back to use
 synchronized as the concurrency issues caused such
 headaches the developer had no way to manage this
 from
 an application perspective. I can't imagine Tomcat
 would have calls which are not synchronized to pull
 a
 session back from storage either. The user certainly
 would not have any control over such a thing as JSP
 session access can not be wrapped easily by
 developers
 using normal synchronization techniques. Are you
 having some specific issue?
 
 Wade
 
 --- lightbulb432 [EMAIL PROTECTED] wrote:
 
  
  I'm reading some book concurrency books that talk
  about potential thread
  safety issues with HttpSession. Specific cases
  follow:
  
  - When the web container passivates an HttpSession
  while a user's request
  modifies it
  - When the web container replicates an HttpSession
  while a user's request
  modifies it
  - When multiple quick, successive requests from
 the
  same user access the
  same HttpSession
  
  Could somebody explain how Tomcat deals with the
  first two, and what steps
  web application developers need to take to avoid
  concurrency problems with
  all three cases above? Is it guaranteed that the
  passivated/replicated
  object is always a consistent view of the
  HttpSession?
  
  Thanks.
  -- 
  View this message in context:
 

http://www.nabble.com/Concurrency-with-HttpSession-tf4403264.html#a12561600
  Sent from the Tomcat - User mailing list archive
 at
  Nabble.com.
  
  
 

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

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


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



Re: Concurrency with HttpSession

2007-09-07 Thread Wade Chandler
--- Leon Rosenberg [EMAIL PROTECTED]
wrote:
 On 9/7/07, lightbulb432 [EMAIL PROTECTED]
 wrote:
 
  I'm reading some book concurrency books that talk
 about potential thread
  safety issues with HttpSession. Specific cases
 follow:
 
  - When the web container passivates an HttpSession
 while a user's request
  modifies it
 
 strange use case. why should that happen?
 

Yes, to me that would be a bug. I mean, if the server
were to be in the act of caching a dormant session out
to disk and out of memory when a request came in there
should be a lock in place, and then once it finished
doing so, the lock would be released, the session
would be brought back into memory, and all should be
well. If not, then it simply would not work and would
be bad coding...that is when you file a bug.

  - When the web container replicates an HttpSession
 while a user's request
  modifies it
 
 Hmm.. Is it a real issue for you?
 

Again, if it were doing so, same as the above issue.
If the server or infrastructure for clustering were
doing anything related to copying out to keep multiple
instances up to date I would expect concurrency to be
controlled at the server and cluster level, and if not
then it would simply be a bug. I don't see how it
could be anything else unless the clustering support
allowed you, in configurable instances, to tell it not
to be so rigid and allow access to these things even
when they may not yet be up to date. Then in this case
you would have to know your logic well enough to know
if it would be an issue or not, and would hope being
rigid would be the default.

  - When multiple quick, successive requests from
 the same user access the
  same HttpSession
 
 No problem here, at least not with 2.5 compliant
 server.
 

My other reply was specifically about this.

Wade

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



Re: POJO Application Server for Tomcat

2007-08-19 Thread Wade Chandler
Worked for me too. I read up on it, and it sounded
interesting. I'm looking forward to trying it out and
bookmarked it.

Wade

--- Steve Ochani [EMAIL PROTECTED] wrote:

  The link to your site times out.
 
 Works fine for me
 
 http://coolharbor.100free.com/index.htm
 
  
  On 8/19/07, Johnny Kewl [EMAIL PROTECTED]
 wrote:
   I'd like to show you guys something that I think
 may blow your
   minds.
  
   Firstly let me just say that I call myself a
 hobbyist, dont consider
   myself in the same league as the guru's that
 work on Tomcat and
   Apache, but I do spend an enormous amount of
 time playing with
   technology. One can almost measure how much I
 like a technology by
   how much time I stay in the mailing lists, on
 Postgresql I think it
   was 3 months, and I really like that product, on
 Tomcat it must be
   close to a year and still counting, what a
 fantastic product.
  
   In our office Tomcat is now officially the
 delivery mechanism for
   everything.
First I was impressed with Tomcats web
 abilities, then more and
more with its container ability, we discovered
 that it can run any
code, and even if it wasnt intended for the
 web, we started
sticking applications into Tomcat
 anywaythat idea has now come
a long way.
  
   I call it a POJO Application server, I've
 mentioned before that we
   actually popping full java applications out of
 browsers, but then it
   was very much something only I could use, messy
 libraries etc. What
   I've done now is (try) make a more professional
 package, and it
   would be really nice if the guru's just have a
 little read about
   this unbelievable servlet, and let me know what
 you think, if just
   to see how someone is using your Tomcat, in a
 very unusual way.
  
   As you will see, I dont like EJB containers, but
 I love Tomcat, and
   it was almost inevitable that this would happen.
 All I will say is
   that this is no ordinary application server...
 not unless I missed
   something and you can also just drop a POJO
 application into the
   others and make it remoteable.
  
   I think its a new way of looking at application
 servers, it feels
   like a discovery to me, but then who knows maybe
 there is something
   out there like this, I dont know, all I do know
 is that when we drop
   this servlet into Tomcat, we run POJO
 applications over the wire as
   if they were right their on the client machine,
 the same
   applications that will also run standalone on
 the machine. Its so
   different that I really struggled to find the
 relevent theory behind
   this technology, I think I'm close, but any
 pointers or corrections
   would be much appreciated there as well.
  
   Anyway, would just like to thank all the
 Tomcat'ers that have helped
   me out, people like Chuck, Bill, Christopher,
 Leon, David, Mark,
   Mladen... and if I forgotten you, sorry, so
 many, it really is the
   best mailing list on the web.
  
   Oh! you'll see its only certified for Tomcat ;)
   Only thing left to do now is see if I get Tomcat
 to make coffee, and
   clean the pool... and maybe get this to run on
 something fishy, you
   know, just in case someone needs a real
 application server ;)
  
   Thanks  http://coolharbor.100free.com/index.htm
   Johnny
  
 

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

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


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



Re: Installing Tomcat on Linux

2007-08-02 Thread Wade Chandler
Exactly.

Wade

--- Hassan Schroeder [EMAIL PROTECTED]
wrote:

 On 8/2/07, Vigorito, Nicholas E.
 [EMAIL PROTECTED] wrote:
  Here are some quotes from this person:
 
  You are trusting that someone built the binaries
 directly from the
  source code without any additional modification or
 back-doors built in.
 
 Flip side: you have gone through the *entire source
 tree* that you've
 downloaded *file by file* and *can personally
 confirm*  that there are
 no additional modifications or back-doors.  Oh,
 yeah, baby.
 
 Leaving aside the question of where you get the
 master source to
 compare to, and how you confirm that *it* hasn't
 been tampered with...
 
 But I'd love to know how many packages your
 co-worker is willing to
 personally vouch for. :-)
 
 heh.
 -- 
 Hassan Schroeder 
 [EMAIL PROTECTED]
 

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


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



RE: Installing Tomcat on Linux

2007-08-02 Thread Wade Chandler
My first question would be:
Do you examine every line of code in these sources you
compile?

Then:
If not, if you get the same sources and binaries from
the same location, what is the difference?

Most admins i know, who get sources and build them, do
not know all the ins and outs of the application they
are compiling.

Wade

--- Vigorito, Nicholas E.
[EMAIL PROTECTED] wrote:

 Here are some quotes from this person:
 
 You are trusting that someone built the binaries
 directly from the
 source code without any additional modification or
 back-doors built in.
 
 
 Also building from the source allows you to either
 specify the default
 build or add/subtract modules/functionality that you
 want or don't want.
 
 
 The only sys admins I know of that install from
 binaries on Linux
 machines are the lazy ones or the ones that have no
 clue what they are
 doing.
 
 I would never install open source from binaries on a
 machine I did not
 want someone to break into. 
 
 -Original Message-
 From:

[EMAIL PROTECTED]

[mailto:[EMAIL PROTECTED]
 rg] On Behalf Of ben short
 Sent: Thursday, August 02, 2007 4:44 PM
 To: Tomcat Users List
 Subject: Re: Installing Tomcat on Linux
 
 I would question his reason for this statement
 
 A coworker claims that all unix admins should never
 install open source
 binaries. They should build using the source.
 
 On 8/2/07, Vigorito, Nicholas E.
 [EMAIL PROTECTED] wrote:
  I am going to install Tomcat standalone (not
 fronted by Apache) on a 
  Linux box that will eventually be opened up to
 small portion of the 
  outside world.
 
  I am a developer and as such haven't ever done
 anything with Tomcat 
  except install the binaries on my Windows machine
 and run it locally 
  for development purposes.
 
  A coworker claims that all unix admins should
 never install open 
  source binaries. They should build using the
 source.
 
  Looking for a concensus. Is it ok to install the
 Tomcat binaries or 
  should I build using the Tomcat source then
 install? Reasons why?
 
  Thanks!
 
  Nick
 
 

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

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


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



RE: Installing Tomcat on Linux

2007-08-02 Thread Wade Chandler
heh heh,

from my experience with system admins, I will be
willing to bet the answer is no, unless he is telling
a big one ;-)

Wade

--- Steve Ochani [EMAIL PROTECTED] wrote:

 LOL,
 
 I would ask him if he sits there and examines all
 the code of everything that 
 is on his system.
 
 
 
 
 On 2 Aug 2007 at 16:49, Vigorito, Nicholas E. wrote:
 
  Here are some quotes from this person:
  
  You are trusting that someone built the binaries
 directly from the
  source code without any additional modification or
 back-doors built
  in.
  
  
  Also building from the source allows you to either
 specify the default
  build or add/subtract modules/functionality that
 you want or don't
  want.
  
  
  The only sys admins I know of that install from
 binaries on Linux
  machines are the lazy ones or the ones that have
 no clue what they are
  doing.
  
  I would never install open source from binaries on
 a machine I did not
  want someone to break into. 
  
  -Original Message-
  From:
 

[EMAIL PROTECTED]
 

[mailto:[EMAIL PROTECTED]
  .o rg] On Behalf Of ben short Sent: Thursday,
 August 02, 2007 4:44 PM
  To: Tomcat Users List Subject: Re: Installing
 Tomcat on Linux
  
  I would question his reason for this statement
  
  A coworker claims that all unix admins should
 never install open
  source binaries. They should build using the
 source.
  
  On 8/2/07, Vigorito, Nicholas E.
 [EMAIL PROTECTED] wrote:
   I am going to install Tomcat standalone (not
 fronted by Apache) on a
   Linux box that will eventually be opened up to
 small portion of the
   outside world.   I am a developer and as such
 haven't ever done
  anything with Tomcat  except install the binaries
 on my Windows
  machine and run it locally  for development
 purposes.   A coworker
  claims that all unix admins should never install
 open  source
  binaries. They should build using the source.  
 Looking for a
  concensus. Is it ok to install the Tomcat binaries
 or  should I build
  using the Tomcat source then install? Reasons why?
   Thanks!  
  Nick 
  
 

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

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

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


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



Re: MySql Connector returning ?DataSource

2007-07-23 Thread Wade Chandler
From a JSP page try to make a MYSQL connection using
just pure JDBC calls. It may be something to do with
your JDBC classes and the directory your JAR files are
housed. If I remember correctly I had to put my MYSQL
JAR file in the shared folder so the server could
access them. This versus having them in the
WEB-INF/lib folder. May or may not be your issue, but
make sure you can actually make a JDBC connection with
the drivers first. If not then the DataSource won't
work either.

I have never used
WatchedResourceWEB-INF/web.xml/WatchedResource

before either. Maybe comment out this line and see if
it has any impact.

Wade

--- Prem Padarath [EMAIL PROTECTED] wrote:

 Hi,
 
 I am trying to set up a database resource in Tomcat
 5.5.20 .  I am having a
 problem getting a DataSource object back from a JNDI
 lookup.
 (I am getting a
 org.apache.tomcat.dbcp.dbcp.BasicDataSource object
 returned and throwing an exception - code below)
 
 My problem is similar to the Re: MySql Connector
 thread of messages.
 
 I can see the resource listed in the Tomcat
 Administration Tool under Tomcat
 Server -- Service -- Host -- Context(/dbtest)
 and all the information for the datasource looks
 fine (as from the
 context.xml file below).
 
 My context.xml file (placed in my webapp under
 META-INF) looks as follows:
 
 Context crossContext=true path=/dbtest
 reloadable=true
 Logger
 className=org.apache.catalina.logger.FileLogger
 prefix=localhost-dbtest-log.
 suffix=txt
 timestamp=true/
 
   Resource
 name=jdbc/MYSQLDS
 auth=Container
 type=javax.sql.DataSource
 maxActive=5
 maxIdle=3
 maxWait=1
 username=myuser
 password=mypwd
 driverClassName=com.mysql.jdbc.Driver

 url=jdbc:mysql://localhost:3306/testdb/
  
 WatchedResourceWEB-INF/web.xml/WatchedResource
 /Context
 
 My web.xml file contains the following:
 
 resource-ref
   descriptionDB Connection/description
   res-ref-namejdbc/MYSQLDS/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
 
 
 And the snippet/code I am using to acquire a
 datasource is as follows:
 
 DataSource ds = null;
 
 ds =

(DataSource)initContext.lookup(java:/comp/env/jdbc/MYSQLDS);
 
 
 When the app is run, I get back
 
 java.lang.Exception:
 org.apache.tomcat.dbcp.dbcp.BasicDataSource
 dbtest.HelloWorld.execute(HelloWorld.java:53)

 sun.reflect.NativeMethodAccessorImpl.invoke0(Native
 Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(
 NativeMethodAccessorImpl.java:39)
 sun.reflect.DelegatingMethodAccessorImpl.invoke
 (
 DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 
 (by the way, I am running this within a Struts2
 Framework)
 
 Can anyone tell me what I am doing incorrectly
 still?
 
 Thx,
 Prem
 


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



RE: CGI vs SMTP vs Tomcat

2006-10-19 Thread Wade Chandler
I would get an IDE such as Netbeans at:
http://www.netbeans.org

Wade

--- HALSTEAD SGT WARREN F [EMAIL PROTECTED]
wrote:

 Tomcat is running on my (Windows 2003) machine as a
 service logging in
 as a Local System account. When I ran my test Perl
 script on the command
 line, I was logged in as a administrator account.
 
 I tried changing the account it uses to a local
 admin account and it
 couldn't find any of the webpages (404 errors)
 
 Windows Firewall is explicitly turned off on my
 server.
 
 Tomcat finds Perl through the web.xml file. There is
 a executable line
 in the config that I pass the executable path to.
 All my other Perl cgi
 scripts work fine, except for a file upload form
 which is a separate
 e-mail. (I can't seem to figure out how to compile a
 single .java file
 to a .class file. I find myself downloading all the
 dependencies for
 Tomcat so it will all compile and I can extract a
 single class file.)
 
 ~Warren Halstead
 
 -Original Message-
 From: Wade Chandler
 [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, October 18, 2006 7:23
 To: Tomcat Users List; [EMAIL PROTECTED]
 Subject: Re: CGI vs SMTP vs Tomcat
 
 The JVM security policy couldn't just block TCP/IP
 access for the Perl
 process.  The reason being the child process...perl
 in this case will
 not be run in the JVM like a class which will make
 calls inside the JVM
 space...a.k.a the JVM can't say...you are not allow
 to make the call to
 make the connection.  Tomcat would have to create a
 TCP/IP proxy to
 block access for the perl process or install a
 native driver to block
 low-level system calls.  My guess is that maybe
 there is another
 firewall (personal firewall) or something like it
 blocking.  I wrote
 another email. 
 Another thought is maybe the user Tomcat is being
 run as does not have
 all the paths setup which would allow the Perl
 script to use the NET
 package...not sure, but maybe possible I would think
 if Active Perl can
 be installed for a user or for the entire system,
 but then I wouldn't
 know how it is finding the perl exe to launch the
 .pl file by extension
 if it were not installed for all, but in Windows
 certain permissions can
 affect parts of applications depending on what they
 are depending
 on...maybe a lock down tool was run on the system at
 some point (would
 mess up permissions and fixing them can be
 impossible some times)?
 
 Wade
 
 
 

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


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



Re: CGI vs SMTP vs Tomcat

2006-10-18 Thread Wade Chandler
The JVM security policy couldn't just block TCP/IP
access for the Perl process.  The reason being the
child process...perl in this case will not be run in
the JVM like a class which will make calls inside the
JVM space...a.k.a the JVM can't say...you are not
allow to make the call to make the connection.  Tomcat
would have to create a TCP/IP proxy to block access
for the perl process or install a native driver to
block low-level system calls.  My guess is that maybe
there is another firewall (personal firewall) or
something like it blocking.  I wrote another email. 
Another thought is maybe the user Tomcat is being run
as does not have all the paths setup which would allow
the Perl script to use the NET package...not sure, but
maybe possible I would think if Active Perl can be
installed for a user or for the entire system, but
then I wouldn't know how it is finding the perl exe to
launch the .pl file by extension if it were not
installed for all, but in Windows certain permissions
can affect parts of applications depending on what
they are depending on...maybe a lock down tool was run
on the system at some point (would mess up permissions
and fixing them can be impossible some times)?

Wade

--- Pid [EMAIL PROTECTED] wrote:

 is there a simple answer here?
 
 if OP's running under a security manager, does the
 CGI servlet require
 port permissions setting in catalina.policy?
 
 
 
 
 Martin Gainty wrote:
  As Tomcat is written in Java JSP and Servlet (with
 C code for native function calls to the underlying
 OS~this is at least for the majority on this list
 )This is the expertise we offer to you
  If its not written in Java such as fitting a
 CGI/CFM/PHP script or non Java class we're not
 saying its not possible but it will be more
 difficult and time consuming task to accomplish
 retrofitting an non Java package into a purely Java
 Framework..accordingly when speaking to your client
 you may want to consider a TM approach to the task
 as making this situation operational may very well
 indeed 'take a while'
  No offence has been taken..
  HTH,
  Martin --
  This e-mail communication and any attachments may
 contain confidential and privileged information for
 the use of the 
  designated recipients named above. If you are not
 the intended recipient, you are hereby notified that
 you have received
  this communication in error and that any review,
 disclosure, dissemination, distribution or copying
 of it or its 
  contents
  - Original Message - 
  From: HALSTEAD SGT WARREN F
 [EMAIL PROTECTED]
  To: users@tomcat.apache.org
  Sent: Tuesday, October 17, 2006 9:52 PM
  Subject: Re: CGI vs SMTP vs Tomcat
  
  
  Sir,
  
  I in no way am implying that the members of this
 list have been
  derisive. I meant to state answers I found else
 where seemed dersive. I
  did find an example of a non-derisive write it in
 Java. I sumbit to
  your attention:
  
 

http://mail-archives.apache.org/mod_mbox/tomcat-users/200310.mbox/%3cLLE
 

[EMAIL PROTECTED]
  
  As well as:
  
 

http://www.experts-exchange.com/Programming/Programming_Languages/Perl/Q
  _21216234.html
  
  For the above you have to pay/register for the
 solution, and I am leery
  of it, but it is an excellent example of my
 problem.
  
  Thank you all again for your help. I may just have
 to take a self-taught
  crash course in Javaor socket programming in
 Perl. :P
  
  V/R
  
  ~Warren Halstead
  
  
  
  
  
  David Smith wrote:
  
  Really?! I've been on this list for a while and do
 not recall such
  derisive comments. Perhaps a more optimistic
 approach would help.
  
  As to the problem, I don't use the setup you are
 attempting, so you are
  going to have to help with some more info.
 Specifically a code example
  and logs for the moment when the connection is
 attempted. Further, some
  information regarding the environment would also
 be helpful -- security
  settings, etc., ... It may be that the CGI is
 relying on environment
  variables that aren't available to the tomcat
 service.
  
   --David 
  
  HALSTEAD SGT WARREN F wrote: 
  Good Afternoon, 
 
  I am running Tomcat 5 with CGI enabled. I am
 attempting to use 
  Net::SMTP to send e-mail, and it works fine from
 the command line, but
  
  not running as a CGI script. I have scoured the
 internet and found
  other 
  people with this problem, but the derisive answer
 to their pleas for 
  help has been Write it in Java dummy! 
 
  I do not have that option, and so I must ask if
 there is some 
  security function in Tomcat or a workaround, that
 allows perl CGI 
  scripts to make a socket connection to port 25 of
 another server. 
 
  Thank you for your help in this matter. If you
 feel any other 
  details are required to troubleshoot my problem,
 please feel free to 
  contact me and ask. 
 
  Very Respectfully, 
 
  ~Sgt Halstead 
  15th MEU 
  USMC 
 
 
  
  
  
 

-
  To start a new topic, e-mail:
 

Re: CGI vs SMTP vs Tomcat

2006-10-17 Thread Wade Chandler
Hmm.  Which user is Tomcat being run as?  Are you
running Tomcat as the same user as your are running
the script?  Wondering if maybe there is not some type
of a port blocker installed on your system outside of
the servers.  Maybe when you ran your script or one
previously maybe quite some time ago which made
outbound connections you were prompted to allow it or
not, and Tomcat running as a different user maybe
didn't cause you to get the popup about the blocked
port.  Do you have any logs you can check if you have
any port blockers or personal firewalls installed?

Wade

--- Warren Halstead [EMAIL PROTECTED] wrote:

 
 Ok,
 
  Here goes
 
  1) I can from my server ping the mail server.
  2) I can from the Windows command line, telnet
 to port 25 (SMTP) of the
 mail server. It works.
  3) Using a packet sniffer I see #2 happening.
  4) Using a packet sniffer I see nothing
 happening network wise from my
 script.
 
 PERL Example:
 
 use strict;
 use Net::SMTP;
 
 my $smtp = Net::SMTP-new($mailServer); #
 connect to an SMTP server
 $smtp-mail($senderEmail);   # use the
 sender's address here
 $smtp-to($recipientEmail);  #
 recipient's address
 $smtp-data(); # Start the mail
 
  # Send the header.
 $smtp-datasend(To: $recipientEmail\n);
 $smtp-datasend(From: $senderEmail\n);
 $smtp-datasend(Subject: $subject\n);
 
 $smtp-datasend(\n);   # Send the
 body.
 $smtp-datasend($message\n);
 
 $smtp-dataend();#
 Finish sending the mail
 $smtp-quit; # Close
 the SMTP connection -ab
 
 
 Output in logs
 
 
 2006-10-05 00:17:29 StandardContext[]cgi: findCGI:
 path=/RFI.cgi, C:\Program
 Files\Apache Software Foundation\Tomcat
 5.0\webapps\ROOT\WEB-INF/cgi
 
 2006-10-05 00:17:29 StandardContext[]cgi: findCGI:
 currentLoc=C:\Program
 Files\Apache Software Foundation\Tomcat
 5.0\webapps\ROOT\WEB-INF\cgi
 
 2006-10-05 00:17:29 StandardContext[]cgi: findCGI:
 currentLoc=C:\Program
 Files\Apache Software Foundation\Tomcat
 5.0\webapps\ROOT\WEB-INF\cgi
 
 2006-10-05 00:17:29 StandardContext[]cgi: findCGI:
 FOUND cgi at C:\Program
 Files\Apache Software Foundation\Tomcat
 5.0\webapps\ROOT\WEB-INF\cgi\RFI.cgi
 
 2006-10-05 00:17:29 StandardContext[]cgi: findCGI
 calc: name=RFI.cgi,
 path=C:\Program Files\Apache Software
 Foundation\Tomcat
 5.0\webapps\ROOT\WEB-INF\cgi\RFI.cgi,
 scriptname=/cgi-bin\RFI.cgi,
 cginame=\RFI.cgi
 
 2006-10-05 00:17:29 StandardContext[]cgi:
 runCGI(envp=[{HTTP_USER_AGENT=Mozilla/5.0 (Windows;
 U; Windows NT 5.1;
 en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1,
 HTTP_ACCEPT_ENCODING=gzip,deflate,
 REQUEST_METHOD=POST, AUTH_TYPE=,
 HTTP_ACCEPT_LANGUAGE=en-us,en;q=0.5,
 SERVER_NAME=205.16.7.98,
 SERVER_SOFTWARE=TOMCAT,
 HTTP_CONTENT_TYPE=application/x-www-form-urlencoded,
 HTTP_REFERER=http://205.16.7.98/RFI/RFI.html,
 HTTP_KEEP_ALIVE=300,
 HTTP_ACCEPT_CHARSET=ISO-8859-1,utf-8;q=0.7,*;q=0.7,
 HTTP_HOST=205.16.7.98,
 GATEWAY_INTERFACE=CGI/1.1,
 X_TOMCAT_SCRIPT_PATH=C:\Program Files\Apache
 Software Foundation\Tomcat
 5.0\webapps\ROOT\WEB-INF\cgi\RFI.cgi,
 REMOTE_ADDR=205.16.7.101, SERVER_PROTOCOL=HTTP/1.1,
 HTTP_CACHE_CONTROL=max-age=0, PATH_INFO=,
 REMOTE_HOST=205.16.7.101,
 QUERY_STRING=, HTTP_CONNECTION=keep-alive,
 SERVER_PORT=80,
 CONTENT_TYPE=application/x-www-form-urlencoded,
 CONTENT_LENGTH=370,
 HTTP_CONTENT_LENGTH=370,

HTTP_ACCEPT=text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5,
 SCRIPT_NAME=/cgi-bin\RFI.cgi, REMOTE_USER=,
 REMOTE_IDENT=}],
 command=C:\Program Files\Apache Software
 Foundation\Tomcat
 5.0\webapps\ROOT\WEB-INF\cgi\RFI.cgi)
 
 2006-10-05 00:17:29 StandardContext[]cgi: runCGI
 (stderr):Can't call method
 mail on an undefined value at C:\Program
 Files\Apache Software
 Foundation\Tomcat
 5.0\webapps\ROOT\WEB-INF\cgi\RFI.cgi line 125.
 2006-10-05 00:17:29 StandardContext[]cgi: runCGI: 1
 lines received on stderr
 
 It finds the CGI, begins to run the CGI, and when it
 gets to the
 
  $smtp-mail($senderEmail);   # use
 the sender's address
 here
 
 line it halts.
 
 According to some PERL sources I have looked up, it
 will return that error
 (Cant' call method mail...) when it fails to
 connect to the mail server.
 For the server names I have tried the full server
 name, full name including
 domain, and the IP address. I have stopped short of
 using semaphore flags
 and morse code. :P
 
 I can't even see the network ATTEMPTING a connection
 using a packetsniffer.
 So it leaves me two options.
 
 1) Tomcat is not allowing something.
 2) ActivePerl is messed up in the head.
 
 So I tried it from the command line.
 
 I took that section of code, and ran it from the
 command line and it worked.
 
 So ActivePerl is not messed up in the head. Is
 Tomcat running the script in
 some sort of container that restricts what it can
 connect to?
 
 I hope this helps.
 
 Thank you in 

Re: CGI vs SMTP vs Tomcat

2006-10-05 Thread Wade Chandler
--- HALSTEAD SGT WARREN F [EMAIL PROTECTED]
wrote:
 Good Afternoon,
 
   I am running Tomcat 5 with CGI enabled. I am
 attempting to use
 Net::SMTP to send e-mail, and it works fine from the
 command line, but
 not running as a CGI script. I have scoured the
 internet and found other
 people with this problem, but the derisive answer to
 their pleas for
 help has been Write it in Java dummy!
 
   I do not have that option, and so I must ask if
 there is some
 security function in Tomcat or a workaround, that
 allows perl CGI
 scripts to make a socket connection to port 25 of
 another server.
 
   Thank you for your help in this matter. If you feel
 any other
 details are required to troubleshoot my problem,
 please feel free to
 contact me and ask.
 
 Very Respectfully,
 
 ~Sgt Halstead
 15th MEU
 USMC
 

On the same machine running your CGI script from the
command line and setting up the appropriate env
variables does it work, or using the same code and
using command line application does it work?  There
should be no difference.  The CGI module will have to
run it as a normal CGI, and java definitely has no
firewall or blocking capabilities unless someone codes
them and starts them.  It sounds like something else
on the system or a script error to me.

Wade

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



Re: tomcat doesn't reload my classes

2006-10-05 Thread Wade Chandler
--- Alessandro Ilardo
[EMAIL PROTECTED] wrote:
 back to my problem: I discovered that the kindly
 network administrator 
 had configured two tomcat instances, one working
 with apache connector 
 for the normal http request and the other on a
 different port for the 
 ssl. Both instances get the classes from the same
 directory, but 
 apparently on the one set for the ssl, reload
 attribute was disabled for 
 some how. In another words it means that each time I
 reloaded the tomcat 
 I only did it for the http connection.

Not sure why he had two instances for HTTPS vs HTTP. 
Apache filters out the encryption and passes off to
Tomcat, so you should only have had to have Apache
with the certificate installed, one tomcat instance
(or multiple workers for session sharing), and there
you go.  Bad configuration.

 
 I have to say that I didn't have an easy life with
 Apache http connector 
 and Tomcat, especially for what regards ssl. I
 believe that for future 
 I'll opt for using tomcat as standalone webserver
 which to serve html 
 pages too, instead to lose working days again.

Yes if you are not going to use any Apache modules for
anything it is a good option to just use Tomcat.  I
have a server running pure Tomcat, and I've had no
problems, though once you have the connector and SSL
setup for Apache there really isn't anything different
from a plain install.  What problems have you had
really?

Wade

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



Re: moving to linux

2006-09-15 Thread Wade Chandler
--- David Rees [EMAIL PROTECTED] wrote:
 I doubt that switching to
 Linux from
 Windows will solve your performance problem. Have
 you identified what
 your performance bottleneck is now?
 
 -Dave

Yes I would have to second that.  I love Linux, but
not knowing where the real issue with your performance
is will just leave you unsatisfied if the issue is
with your application because no matter what you do
outside of the application performance won't be
boosted significantly.  I would profile my application
and see where in my code the application is spending
most of it's time.  If you can't figure out any
metrics that give you any clues try to break down your
dependencies and profile them independently and see
what you get there.  Maybe you have slow database
creation and are not using database pooling.  This can
slow down an application considerably, but don't count
out other factors.

Wade

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



Re: moving to linux

2006-09-14 Thread Wade Chandler
We used AIX on a project and really didn't like the
experience.  We had different issues.  Some of them
are nothing more than management is not as good and
even command line editing and running
commandsLinux is just more user friendly maybe is
the way I would put it.  I feel the same way
personally about all Unix vs. Linux however.  My
favorite Unix would be Solaris, but it still has a way
to go in the way of user friendliness especially for
administration...again my opinion but based on
experience.  

I think the Linux community does a good job at making
things (especially on the command line) easier.  That
is the way I see it.  Since you mentioned Fedora I
would recommend going to www.centos.org and
downloading the latest version there.  It is nothing
more than Enterprise Redhat rebranded.  This is
possible because RH provides the source code for the
packages and these guys rebrand and then compile the
same source code.  It runs well and is stable.  I also
recommend SuSE.  You can get SuSE at www.opensuse.org.
 Get the released version.  Works great.  

I used to try to use Fedora Core, but found I had
issues when it came to release to release updates. 
Some things would break every time it seemed.  I tried
installing on muliple hardware.  I had a system on FC2
and went to 3 and had some issues.  Then I went to FC4
and had major issues with the migration.  I went back
to SuSE and RH (CentOS) releases and haven't been
stressed about anything.  I would also suggest using
Ubuntu.  It is really nice and seems to work well and
be stable.  I play around with Ubuntu on my
workstations mainly because I have always used RH and
SuSE for servers, so I am more familiar with them in
regards to administration and layout.

Wade

--- Asensio, Rodrigo [EMAIL PROTECTED]
wrote:

 Hello, since Tomcat on Windows Server 2003 is not
 satisfying the
 expected performance whe are thinking about to move
 to Linux. Fedora
 Core 5 more precicesly.
  
 I would like to know what is the better combination,
 Tomcat as webserver
 or Apache with Tomcat as mod to execute java.
  
 Also, there is the posibility of get a brand new
 AIX, anyone had that
 experience before ?
  
 Thanks
 Rodrigo
  
  

---
 Rodrigo Asensio
 Fuel Management Services
 Gilbarco Veeder Root
 phone: +1 336 547 5023
 email: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] 
  
 
 
 This message (including any attachments) contains
 confidential
 and/or proprietary information intended only for the
 addressee.
 Any unauthorized disclosure, copying, distribution
 or reliance on
 the contents of this information is strictly
 prohibited and may
 constitute a violation of law.  If you are not the
 intended
 recipient, please notify the sender immediately by
 responding to
 this e-mail, and delete the message from your
 system.  If you
 have any questions about this e-mail please notify
 the sender
 immediately. 


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



Re: log4j in webapp hanging Tomcat?

2006-07-02 Thread Wade Chandler
--- Avi Deitcher [EMAIL PROTECTED] wrote:

 To add to it: I kept two webapps running and had
 them
 System.out.println(logger), where each is in the
 same category/class, to
 check that each one is running its own; it is. I
 then removed every
 webapp I could and ran it again with just the simple
 filter + index.jsp
 to check. Same result. Sigh.
 

Try to setup a file appender and see if you get any
remotely similar behaviour.  If not then my guess
would be some kind of monitor is locked and code
either in Tomcat or commons logging or log4j is
deadlocked.  Before setting up the file appender look
at the process for Tomcat in the windows Task
Manager and see how many CPU cycles it is using at
this point.  If it is eating up the CPU then it isn't
a deadlock and is some infinite recursive loop (more
than likely) some where such as your log call keeping
on calling another log call some how down the stack or
something weird like that.  If the CPU isn't really
being used at all then my first guess would be a
deadlock.

Wade

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



Re: A way to know if file download has ended

2006-06-05 Thread Wade Chandler
--- Darryl Miles [EMAIL PROTECTED]
wrote:

 Bachler, Elisabeth (Elisabeth) wrote:
  Thank you to everyone. I will investigate further.
  Elisabeth
 
 Maybe this thread is related (excuse the horid
 apache web interface) :
 

http://mail-archives.apache.org/mod_mbox/tomcat-users/200604.mbox/[EMAIL 
PROTECTED]
 
 
 Darryl
 
Just remember there are so many other issues.  I say
that not to be pessimistic, but to be realistic to
maybe keep you from spending too much time on it.  For
instance, when you download a file using Firefox,
firefox will be downloading the bytes from the server
even while you are deciding to cancel or save and will
be storing this information into another buffer.  This
is why when you finally hit save if the box has been
up a while you'll notice a jump in the downloaded
bytes then the status of the download speed jumps back
down to the real value.  I mention that because I
don't know how much you are wanting to rely on
successfully downloaded which you mentioned in your
first email.  The user might hit cancel even after the
file has technically been successfully downloaded even
if only to temp space they can't retrieve in any easy
manner.  

There is also the issue of HTTP proxies and caching
and read ahead, all of these things affect HTTP and
the ability to be able to tell what actually happened
at the byte level between the client and server. 
Also, even if the user closes the browser ... you can
still write to the servlet API output with no error
being raised.  This is also true in Microsoft ISAPI
dlls.  I don't even think if you got at the low level
where the server is if you could reliably do this
because of the proxies and caches I talked about. 
Your proxies and caches and even the users may not be
the only ones in the pipeline, so you always have to
keep that in mind.  

We had an issue one time where bytes were getting cut
out of an https connection, but not an http
connection, and later we found an ISP in between us
and a client had some software in between that was
dropping bytes out of https when too much information
passed through and we finally figured that out and
they fixed it, but not just the fact that they didn't
pass the information back wouldn't affect you, but
also the fact that the software in between could be
reading more bytes than you request at a time to help
speed up users of the ISPs connections over HTTP and
keep doing this even when the TCP connection is
severed.

Wade

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



Re: A way to know if file download has ended

2006-06-04 Thread Wade Chandler
--- Guido Schoepp [EMAIL PROTECTED] wrote:

 Bachler, Elisabeth (Elisabeth) schrieb:
  I have an application that uses tomcat 5.0.19. At
 one point in my
  application, the user has the possibility to click
 on a certain link in
  order to download a file.
  Once the file is downloaded, I would like the
 application to go to a certain
  jsp page is there a way to configure tomcat to
 do such a thing? I mean,
  to redirect to a page only if the download has
 been successfully ended?
 
 Maybe this can work:
 Write a a servlet (or JSP) that delivers the file to
 your user, e.g.
 
 
 response.setContentType(application/octet-stream);
 //or whatever
  java.io.InputStream data =
  new java.io.FileInputStream(file.bin);
  byte[] buf = new byte[4 * 1024];
  int len;
  while ((len = data.read(buf, 0, buf.length)) !=
 -1) {
  sout.write(buf, 0, len);
  }
 
 After that you can forward to the desired page:
  RequestDispatcher dispatcher =
 
 getServletContext().getRequestDispatcher(fwd.jsp);
  dispatcher.forward(request, response);
 
 
 Guido

This is one of those issues that just can't be solved
with simple HTTP and HTML.  There isn't a response
sent to the server to tell it every single download
was successful (or at least not sent back to the web
application ... TCP makes sure the last bytes get to
the other side successfully or an error occurs, but
the applications on the server side can't tell this or
at least I don't know how).  Then to make the
situation more difficult there is no defined event for
tying into the HTTP process for when a certain
download has occurred successfully.  So, one has to
use a download manager of some kind to more easily
manage things like this.  This could be a signed java
applet or shockwave file or a COM object (not cross
platform so I wouldn't recommend that, but you might
think it's ok if you force IE and windows).  One could
more easily tell if an upload had finished because you
at least have a defined form element you can access
through DOM, get the name, and then monitor the upload
progress.

Wade

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



Re: How can I modify the java.library.path in Tomcat?

2006-06-02 Thread Wade Chandler
--- Andi Heusser [EMAIL PROTECTED] wrote:

 Hi,
 
  
 
 I have a web application where I need to load some
 3rd party libraries DLLs)
 and I would like to have these DLLs in a
 subdirectory in my app
 (webapps/MyApp/WEB-INF/lib). However when I try to
 do a 'loadLibrary' it
 fails to find them. I then noticed that the
 'Tomcat/bin' directory is in
 this path and if I copy the DLLs in there, then it
 works fine.
 
  
 
 I've tried to set the system property inside my app
 in the static
 initializer of the main class but that doesn't seem
 to work. I basically
 tried to do the following:
 
   static{
 
 String libPath =
 System.getProperty(java.library.path);
 
 String myLibPath =
 System.getProperty(myapp.lib.path);
 //env var set in PC's system variables (WinXP)
 
 System.setProperty(java.library.path,
 libPath +
 File.pathSeparator + myLibPath);
 
   }
 
  
 
 I also looked through the Tomcat conf files but I
 couldn't find any place
 where I could properly set or override the
 java.library.path.
 
  
 
 Is there a way to set this in Tomcat or will I have
 to copy the DLLs into
 Tomcat's bin directory?
 
  
 
 Thanks.
 
 Regards,
 
 Andi

I like finer control over loading native files.  I use
System.load instead.  You can get your web app path
from the Servlet API.  It makes it easier and you
don't have to make sure your library is on a path.

Wade

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



Re: Tomcat as a standalone webserver. Why not?

2006-06-01 Thread Wade Chandler
--- Ga�l Lams [EMAIL PROTECTED] wrote:

 Hi,
 
  I wondering if it's really so good to use Tomcat
 behind a real web
  server like Apache or IIS.
 
  In my Tomcat 5 book there are two reasons to do it
 so:
 
  1. Tomcat is not as secure as common web servers,
 especially if you
  want  to use CGI and SSI (I don't think I want to)
 
  2. Tomcat is slow delivering static content.
 
  Well, as long it's just planned to use only 1
 server for my application,
  I don't think the both points are true for me. On
 the Tomcat site
  there's a note about performance:
  ...
 
 Not an easy question, I think that the answer to
 your question is a
 mix of personal preferences and, taking into account
 your application
 specifications, whether or not you need from apache
 something that you
 can't have with Tomcat.
 
 I personally started with an apache/tomcat/connector
 configuration
 because the same servers were already serving
 php/mysql and cgi
 applications. We moved then all the tomcat/jsp stuff
 to its own
 servers and I decided to remove apache because:
 - it was not required anymore (reason number one)
 and for me, the
 simpler you keep things, the more robust they are.
 Also, I'm quite
 paranoid and for me the less stuff you installed,
 the better
 - I had some problems with the mod_jk (timeouts)
 - we are not serving static content
 
 Regards,
 
 Ga�l
 
As far as static content goes I don't think Apache is
really faster, it will probably use less memory, but
faster is in the details.  At least not with the more
recent Tomcat versions.  5.x.x versions that is.  I
think for anyone to say otherwise they need to have
proof readily available and it be comprehensively
comparative (or at least more than 1 configuration)
... not just some conceived notion that compiled C
code is going to run faster than Java code (look at
Transmeta processors if you need another example of a
virtual machine and speed improvements
http://www.transmeta.com/efficeon/codemorphing.html
just for an example native vs. non-native and which is
faster are all in the details as well).  The java heap
works differently from the C heap, and native
instructions at runtime are organized differently. 
Some things are faster in Java and some are faster in
C (depending on the optimizations of the java runtime
and hardware ... obviously a purely interpreted
runtime would be slower).  

Some information on the whole Java C thing:
http://www.idiom.com/~zilla/Computer/javaCbenchmark.html

For information about the Apache/Tomcat debate see:
http://tomcat.apache.org/faq/performance.html#faster

I think the main point and answer comes down to Gael's
email (personal preferences and needs/which provides
you the services and configurations you need).

Wade

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



Re: NetBeans 5.0 and Tomcat 5.5.16 ... Please Help

2006-06-01 Thread Wade Chandler
--- Vijaya [EMAIL PROTECTED] wrote:

 Hi,
  
 I downloaded NetBeans 5,0 and tomcat 5.5.16. I want
 to connect to a
 remote SQL Server. I am using jtds. I am not
 successful in using both
 NB50 and Tomcat 5.5.16 together. NB5.0 comes with
 bundled tomcat 5.5.9
 and if I use this, I get a '404 error' while
 accessing the remote
 sql*server.
  
 Can someone help me on this? Is there a problem with
 NetBeans 5.0? 
  
 Is there any other IDE can I use?
  
 Lastly, is there a tomcat user group in Bangalore,
 India?
  
 Thanks in advance for your help.
  
 Vijaya
 

One, your question is terribly vague.  I get a 404
when  accessing the remote sql server?  Are you trying
to connect to a JSP page under your Tomcat?  Are you
running the web application in Netbeans?  Did NB
launch your external browser and point you to the
running Tomcat instance address and port?  Are you
running a different version of Tomcat then the one
that shipped with it?  Are you actually running it in
Netbeans?  Have you ever used JDBC and jTDS together
and that is working fine?  Have you gotten it working
in other web applications period?  I'm on both this
list and the NB list.  You can ask your question
there, but if it comes down to something with your
configuration and Tomcat you might be directed back
here.  Ask on [EMAIL PROTECTED] (you'll need to
sign up for the list).  You'll need to provide some
common sense basics though to help someone help you.

Wade

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



Re: SSL with Tomcat and Apache..IE problems

2006-05-27 Thread Wade Chandler
--- Rizwan Merchant [EMAIL PROTECTED]
wrote:

 
 We are running tomcat 5.5.16 on Fedora Core 4 OS. We
 just installed 
 apache2.0 as a front to serve the pages using the
 mod_jk connector. 
 There are 2 apps on tomcat (virtual hosting), one of
 which needs to be 
 SSL enabled (lets say app1 and app2, app2 is the one
 that needs to be 
 SSL enabled).
 
 Everything seems to be working fine on FireFox, both
 apps can be 
 accessed fine. When we access www.app1.com pages are
 served as expected, 
 and when we access www.app2.com the browser detects
 the certificate and 
 switches to https
 
 But things are not well when it comes to IE.
 www.app1.com works the same 
 as FF, and the app can be accessed. But when we try
 to access 
 www.app2.com, IE shows the certificate and asks if
 we would like to 
 proceed. When we click on 'Yes', the browser cannot
 find the app after 
 that and returns Page cannot be displayed error.
 Also, directly 
 accessing the https site by using the URL
 https://www.app2.com:8443 
 works fine on IE as well.
 so its basically the switching from http to https
 for app2 that doesnt 
 seem to work.
 
 I dont understand why this works on FF but not on
 IE..!
 I hope someone can shed some light on this. I can
 post the httpd.conf , 
 server.xml and workers.properties files if that
 helps..
 
 Thanks,
 -Riz.
Not sure what you mean that the browser detects the
certificate and then changes to https.  Also the
standard https port is 443 and not 8443, so I'm not
sure how anything would automatically think
https://www.app2.com would be linked to
https://www.app2.com:8443 when the default would be
https://www.app2.com:443 (https://www.app2.com).  I
can't tell you why it works in FF, but given what you
have provided I would not expect FF to work actually. 
Are you using a redirect or javascript to reload the
page or something to redirect the http to your https
site?

Wade

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



Re: SerialPort TOMCAT

2006-05-25 Thread Wade Chandler
--- vrinda ullas [EMAIL PROTECTED] wrote:

 hi rajjev,
 i am using communication api version 2.
 i am trying to control a relay through serial port.I
 first built ajava
 application to do the same. It works fine.But on
 trying to convet the
 same into a web based application i don,t get any
 results.
 
Have either of you two debugged you applications and
stepped over the lines accessing the serial port? 
Does it throw an Exception of any kind, hang, or just
fall on through?  Another question might be are the
comm APIs open source like the rest of the java APIs? 
If so then you could take the source of those packages
and debug through those as well.  This should help you
track down where the error is faster.

Wade

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



Re: Istalling Bugzilla on Tomcat

2006-05-25 Thread Wade Chandler
--- Bruno Georges [EMAIL PROTECTED] wrote:

 Hi Lessie
 
 Bugzilla is not a Java based  Web App, it is build
 Perl/CGI, therefore you
 need a web server which can parse these requests,
 map and execute them.
 Recently JBoss announced JBoss Web which allows you
 to do exactly that
 along with running Tomcat.
 You can also run PHP and .Net.
 Have a look at:

http://labs.jboss.com/portal/index.html?ctrl:id=page.default.infoproject=jbossweb
 
 Hopes this helps.
 With Best Regards
 Bruno Georges
 
 Glencore International AG
 Tel. +41 41 709 3204
 Fax +41 41 709 3000
 
 
 |-+---
 | |   Lessie Zoa |
 | |   Mitch  |
 | |   [EMAIL PROTECTED]|
 | |   aii.rr.com |
 | |   |
 | |   25.05.06 05:52  |
 | |   Please respond  |
 | |   to Tomcat Users|
 | |   List   |
 | |   |
 |-+---
  

--|
   | 
 
|
   |To:  users@tomcat.apache.org   
 
|
   |cc:  
 
|
   |Subject: Istalling Bugzilla on Tomcat
 
|
   | 
 
|
   |Distribute:  
 
|
   |Personal?   |---|
 
|
   || [ ] x |
 
|
   ||---|
 
|
   | 
 
|
  

--|
 
 
 
 
 
 
 
 Greetings everyone.
 
 
 
 
 
 I am relatively new and loving
 Java—Tomcat—Linux—all of it! But being new,
 well… please bear with me if I ramble…
 
 
 
 
 
 Situation:
 
 
 
 
 
 Due to the nature of our ecommerce software, we do
 not run Apache.
 
 
 
 
 
 I have only found one other post here regarding a
 Bugzilla on Tomcat
 install, and the response was most
 disappointing—as well as a few years
 ago.
 
 
 
 
 
 So, I present the question again…
 
 
 
 
 
 Has someone tried to install Bugzilla on a straight
 Tomcat server?
 
 
 
 
 
 Our box serves 5 separate IPs
 
 
   3 are ecommerce sites
 
 
   1 is an ftp area
 
 
   1 is for development and tools, such as Bugzilla.
 
 
 
 
 
 I intend to use Bugzilla to help track issues on
 each of the ecommerce
 websites as well as development bugs for new
 ecommerce solutions.
 
 
 
 
 
 
 
 
 Complete Environment:
 
 
   Linux 2.6.9
 
 
   MySQL 5.0.20
 
 
   Tomcat 5.5.16
 
 
   Bugzilla 2.22 (this is what I want!)
 
 
 
 
 
 
 
 
 Bugzilla’s ./checksetup.pl ran well and I
 installed the PERL stuff it
 needed. J
 
 
 
 
 
 Then I went to activate the cgi components of
 Tomcat.
 
 
 
 
 
 I have read through the files and did uncomment the
 cgi servelet and
 mapping in the web.xml for Tomcat, then realized
 that is a global setting –
 I only want it to work for Bugzilla. So I went ahead
 and created a WEB-INF
 directory, made a new web.xml. I also set up a
 context file in the
 CATALINA/hosts as I did for my ecommerce sites.
 
 
 
 
 
 But I am confused. Bugzilla is cgi… will the
 Tomcat even recognize it?
 
 
 
 
 
 My Tomcat manager does see the Bugzilla directory as
 I placed it in the
 MYDIR/ipstring/webapps directory, however it does
 not run (obviously, is
 not Java!). When I try to “run it” I get this:
 FAIL - Application at context path /bugzilla could
 not be started
 
 
 
 
 
 Ok, I can deal with that as Bugzilla is not java.
 
 
 
 
 
 I go to my webbrowser, and it does not come up.
 
 
 
 
 
 Am I barking up the wrong tree? Should I seek a more
 java-esq bug 

Re: Tomcat Memory Leak

2006-05-25 Thread Wade Chandler
--- Rocio Alfonso Pita [EMAIL PROTECTED] wrote:

 El Jueves 25 Mayo 2006 18:51, Petkov, Rossen
 escribi�:
  The request.registerRequests=false setting goes
 in the workers.properties
  file. I already have that an it's not helping with
 the memory leak. I plan
  to upgrade Tomcat to 5.0.28 and java to 1.4.2_11
 Rossen
 
   I have a development pc with tomcat 5.0.28 and java
 1.4.2_04 and I obtain 
 out of memory too. 
I'm sure it's a different case.  If you would like to
ask a question it would be polite not to hijack
someone elses thread.  Please create your own email to
the list with a specific subject and message/question.

Thanks,

Wade

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



Re: Tomcat Memory Leak

2006-05-24 Thread Wade Chandler
--- Petkov, Rossen [EMAIL PROTECTED] wrote:

 Hello,
 I am having a problem with Tomcat 5.0.19 on
 windows with JDK
 1.4.2_03.The memory that java.exe is using keeps
 growing till the point
 that tomcat
 Runs out of memory.
 Using a profiler, doesn't seem to help me much.
 I can see the memory
 being used by certain classes go up (mainly char[]
 and byte[] and some
 tomcat classes, please see the tables below) and
 even reach all the way
 to the point that used java heap equals to the java
 heap, then GC
 probably kicks but, while running Tomcat throws an
 OutOfMemory
 exception. I have allocated -Xmx896M.   I'm now
 forcing a GC when the
 free memory drops to 15%. With every GC, the freed
 memory is less and
 less, which to me is an indication of memory leak. 
   I can't figure out where all those char[] objects
 are coming
 from or why they aren't being reclaimed by the
 garbage  collector. I
 know that something is holding memory and isn't
 letting it go, and I
 know that the leaked memory consists of char[] and
 byte[] objects (see
 below tables).  What I can't figure out is how to
 determine what's doing
 the leaking.
   After several hours of heavy usage, the GC runs and
 frees less
 memory than the previous run. This gives me on day
 of normal operation
 and I have to restart Tomcat after hours to be ready
 for the next day,
 not a really acceptable solution.
   I noticed the 3 tomcat classes:
 org.apache.tomcat.util.buf.MessageBytes,
 org.apache.tomcat.util.buf.ByteChunk and
 org.apache.tomcat.util.buf.CharChunk. The memory
 occupied my these seems
 to never be released. Can they be the cause of the
 multiple byte[] and
 char[]? 
 
 Some info about the application/environment:
- Tomcat 5.0.19 on windows with JDK 1.4.2_03.
- MVC type web application
- front Controller dispathing requests to
 business classes and
 forwards to appropriate JSP, passing necessary data
 objects in the
 request object
- heavy JDBC use and DAO/DTO components, mainly
 using
 PreparedStatement
- Oracle stored procedures and functions
 acccessed thru
 CallableStatement
- Oracle database
 
 I am doing the usual for closing all jdbc database
 related objects like
 ResultSet, PreparedStatement and connections.
 Here are some thoughts that I have, that could be
 the reason for the
 leak, these are more questions:
   1. DTO objects are being passed from the data layer
 to the
 business layer and finnaly to the JSP. After using
 the DTOs on the JSP,
 they are not explicitly set to null in the JSP. I
 see that all DTO
 declarations are in the service method of the
 compiled JSPs. Can this
 be a problem?
   2. HashMaps, HashTables and LinkedHashMaps are
 being passed the
 same way thru the layers and end up in the JSPs.
 These are  not set to
 null either. Can this be a problem?
   3. PreparedStatement and CallableStatement are
 always closed,
 but not always set to null. 
 Can any of these be the cause?
 
 
 Below are some metrics from my environemnt:
 After a several hours of heavy usage, BEFORE GC:
 
 Name  
 Instance countSize 
 char[ ]   
 2,200,184 425,721
 kB 
 byte[ ]   
 199,003   178,902
 kB 
 java.lang.String  
 1,825,003 42,773
 kB 
 java.lang.StringBuffer
 925,351   21,687
 kB 
 class[ ]
 679,935   19,181
 kB 

org.apache.naming.resources.FileDirContext$FileResourceAttributes
 122,254 8,595 kB 
 org.apache.tomcat.util.buf.MessageBytes   
 117,876   5,525
 kB 
 org.apache.tomcat.util.buf.ByteChunk  
 135,061   5,275
 kB 
 org.apache.tomcat.util.buf.CharChunk  
 132,558   5,178
 kB 
 java.util.HashMap$ValueIterator   
 97,5513,04 
 ...more
  
 
  
 AFTER GC:
 This is the top of the list, sorted by size:
  
 Name  
 Instance countSize 
 byte[ ]   
 47,866167,877
 kB 
 char[ ]   
 69,387151,906
 kB 
 org.apache.tomcat.util.buf.MessageBytes   
 117,928   5,527
 kB 
 org.apache.tomcat.util.buf.ByteChunk  
 135,120   5,278
 kB 
 org.apache.tomcat.util.buf.CharChunk  
 132,616   5,180
 kB 
 class[ ]
 71,5504,711
 kB 
 int[ ]
 22,1951,408
 kB 
 java.text.DecimalFormat7,351
 804 kB 
 java.lang.String  
 32,828769 kB 
 org.apache.tomcat.util.http.MimeHeaderField   
 28,098658 kB 
 java.util.HashMap 
 15,598609 kB 
 java.util.GregorianCalendar

Re: re-deploying war file deletes all the files

2006-05-03 Thread Wade Chandler
--- Eric Anderson [EMAIL PROTECTED] wrote:

 When I re-deploy my war file in Tomcat 5.5.16, it
 fails because the
 listener can't start. And when I look at the context
 directory contents
 all the folders are there but not the files. Anyone
 know why?
 
 Eric
I have never had any luck with re-deploy in Tomcat
except for accessing the folder where the web
applications reside and overwriting the war file and
allowing Tomcat to redeploy the file itself.  I've
used FTP on Unix and Windows Shares on Windows for
this and it has worked well.

Someone else might be able to help you more.  I know
you should be able to write a servlet to re-deploy
your web applications.  You should be able to send a
servlet a file, it open up the associated war file for
overwriting it (not appending), keep a non-shared lock
on the file when writing, and completely overwrite the
file contents with the new files bytes.

Wade

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



RE: Allow web access to /WEB-INF?

2006-05-03 Thread Wade Chandler
--- Peter Crowther [EMAIL PROTECTED]
wrote:

  From: Dong, Roland [mailto:[EMAIL PROTECTED]
 
  That is not an option. Thanks.  I am wondering if
 that can be 
  configured
  in catalina.policy? Played with it but can't make
 it work.
 
 Not to my knowledge.
 
 What you *could* do is the following:
 
 - Install a second instance of Tomcat
 - Set its webapp base to a parent directory of the
 first Tomcat's webapp
 base
 - Use WebDAV on the second Tomcat to poke at the
 first Tomcat's files.
 
   - Peter
If you are using Linux you can simply create a
symbolic link to other top level web applications from
another web applications folder.  Then you can manage
the folders that way without having two TC instances. 


You should also be able to use Apache and configure
some paths to access the same directory with Tomcat or
Apache depending on the URL you access it by.  That is
if you are using mod_jk and Apache.

Wade

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



Re: hibernate jdbc drivers question

2006-03-26 Thread Wade Chandler
Martin,

I'm pretty sure you want this documentation:
http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-hibernatejdbc

and the mailing list and forums can be subscribed to
here:
http://www.hibernate.org/20.html

Hope it helps,

Wade


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



RE: Recommended Specs for Oracle 10g db server

2006-03-26 Thread Wade Chandler
--- Mohan2005 [EMAIL PROTECTED] wrote:

 
 Thank you all kindly for these valuable comments and
 suggestions. I have
 notices somethings we have obvious problems and need
 to be addressed.
 
 We are running this 10g on a hardware RAID-5 array
 (SCSI).
 
 The 10g is at the backend of 12 tomcat servers load
 balanced thru a apache
 web server.
 
 Each tomcat has a max. connections of 40
 simulataneously.
 
 As you have said we have identified few sql
 processes overloading the CPU's.
 
 However, we cannot move back to non HT technology as
 this is not provided at
 a HW level to us.
 
 So were either planning to go for a quad (HT) with
 lots more RAM so to
 increase SGA.
 
 Thanks again for your help.
 --
 View this message in context:

http://www.nabble.com/Recommended-Specs-for-Oracle-10g-db-server-t1340651.html#a3595161
 Sent from the Tomcat - User forum at Nabble.com.

I noticed one comment sent to you was their issue with
bottle necks dealt with locks.  We had a similar issue
with an MS SQL server at my last company.  I started
studying the issue a bit and the problem was we were
doing multiple inserts, updates, deletes in a
transaction using multiple JDBC (executeUpdate)calls. 


What I did to speed this up was to create a SQL Buffer
which would stack multiple insert,update, and delete
statements in a single string which would get sent to
the backend (database) server at once instead of this
happening individually.  The only thing you lose is
the update count returned by JDBC, but what you gain
is a HUGE performance gain by allow you to shorten the
over all transaction and significantly reduce the lock
time. 

We had things which were running 30 minutes or so
before we made the buffer changes.  After adding this
buffering mechanism we added to our DAO (Data Access
Objectsthey were Plain Old Java Objects) the runs
of an individual users updates took between 30-60
seconds (1/2 minute thru 1 minute).  This was their
overall process time to perform all of the updates the
software was making to their data.  

So, our difference was better than we hoped for.  30
minutes vs 30-60 seconds is a performance gain to me
;-).  We had something like 1000-100,000 insert and
updates at a time.  What I did was come up with a
piece that would run multiple large SQL statements. 
Reason: different databases allow different buffer
sizes for the SQL which can be run at one time.  MS
SQL Server I limited the overall calling to around
1000 statements at a time.  You'll have to figure out
what happens with Oracle and how many statements can
be included at one time.  Basically:

buffer.addUpdate(INSERT..yada yada yada);
buffer.addUpdate(INSERT..yada yada yada);
buffer.addUpdate(UPDATE..yada yada yada);
buffer.addUpdate(UPDATE..yada yada yada);
buffer.addUpdate(UPDATE..yada yada yada);
buffer.addUpdate(DELETE..yada yada yada);
...etc

buffer.update();//runs the buffered SQL statements.

...every time I called addUpdate limit number of
times I added the current List to a Vector to hold
statements which would be called when update was
issued.  So...basically...update did:

//you've already gotten a Statement object s
for(int i = 0; i  vector.size();i++){
   List l = (List)vector.get(i);
   StringBuffer sql = new StringBuffer();
   for(int x = 0; x l.size();x++){
  String s = (String)l.get(i);
  sql.append(s);
  sql.append('\n');
   }
   //remeber since you have multipe statements here
   //the last call is the only call the return
   //value mentions...update count of the last
   //statement in the buffer
   s.executeUpdate(sql.toString());
}

Anyways, I've used this scheme with MySQL, MS SQL,
Firebird, Sybase, and HSQLDB, and it worked equally
well with all.  You don't have to use it with
everything, but for very large DB transactions it
seems to be the best way to get around locks and hangs
and other performance issues.  So, maybe you could get
away with locating your main long running transactions
and replacing any code there with this type of scheme
to see how it helps.  Granted this may not even be
your issue as it depends on what your software is
doing, but if you are performing many (hundreds or
thousands or hundreds of thousands) updates in a
single transaction and using multipe executeUpdate
calls from JDBC to do this updates or using EJB or
Hibernate or something else like it then I'm guessing
this is going to be a large part of your problem if
not the problem.  MS SQL server hates long running
transactions (not sure about Oracle, but guessing it's
the same..just the way locks work), and it's PIDs
would show processes locking up and dropping off the
map, never coming back, and leaving locks locked
indefinitely or for hours at a time sometimes.

Basically once you are done implementing this
buffering the only real JDBC code you'll end up with
is getting the Connection, Statement, and calling
update on your buffer which calls these buffered
statements.


Re: hibernate jdbc drivers question

2006-03-25 Thread Wade Chandler
--- Martin Gainty [EMAIL PROTECTED] wrote:

 I have a quick question with hibernate hsqldb
 drivers
 
  [java] 11:58:23,125  INFO SchemaExport:177 -
 exporting generated schema to
 database
  [java] 11:58:23,125 ERROR SchemaExport:200 -
 schema export unsuccessful
  [java] java.sql.SQLException: No suitable
 driver
  [java] at
 java.sql.DriverManager.getConnection(Unknown Source)
 
 Which hsqldb (presumably jdbc) drivers does
 Hibernate support???
 
 Thanks,
 Martin-

Isn't Hibernate a separate project with it's own
mailing list and not even an Apache project?  I just
say that because I don't think every Tomcat user = a
Hibernate user...not even sure it's a 25% margin.  My
guess would be that Hibernate doesn't simply support
JDBC drivers as you see
java.sql.DriverManager.getConnection being the culprit
and the usual factory method to obtain a database
connectionI would not even assume Hibernate has
(this huge list of JDBC drivers) packaged into it's
jar files.  I think you'll have to put the JDBC
drivers jars in your classpath (web application lib
folder).  My assumption would be that is all you have
to do to allow this to happen, and some how tell
Hibernate which driver to load
(Class.forName(yada.yada.Yada).newInstance() or new
yada.yada.Yada()maybe through config files, but I
bet their site and list has more information?  Maybe
you mistakenly sent the email to the wrong list?

Wade

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



Re: hibernate jdbc drivers question

2006-03-25 Thread Wade Chandler
--- Wade Chandler [EMAIL PROTECTED]
wrote:

 --- Martin Gainty [EMAIL PROTECTED] wrote:
 
  I have a quick question with hibernate hsqldb
  drivers
  
   [java] 11:58:23,125  INFO SchemaExport:177 -
  exporting generated schema to
  database
   [java] 11:58:23,125 ERROR SchemaExport:200 -
  schema export unsuccessful
   [java] java.sql.SQLException: No suitable
  driver
   [java] at
  java.sql.DriverManager.getConnection(Unknown
 Source)
  
  Which hsqldb (presumably jdbc) drivers does
  Hibernate support???
  
  Thanks,
  Martin-
 
 Isn't Hibernate a separate project with it's own
 mailing list and not even an Apache project?  I just
 say that because I don't think every Tomcat user = a
 Hibernate user...not even sure it's a 25% margin. 
 My
 guess would be that Hibernate doesn't simply support
 JDBC drivers as you see
 java.sql.DriverManager.getConnection being the
 culprit
 and the usual factory method to obtain a database
 connectionI would not even assume Hibernate has
 (this huge list of JDBC drivers) packaged into it's
 jar files.  I think you'll have to put the JDBC
 drivers jars in your classpath (web application lib
 folder).  My assumption would be that is all you
 have
 to do to allow this to happen, and some how tell
 Hibernate which driver to load
 (Class.forName(yada.yada.Yada).newInstance() or
 new
 yada.yada.Yada()maybe through config files, but
 I
 bet their site and list has more information?  Maybe
 you mistakenly sent the email to the wrong list?
 
 Wade
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
I suppose what you want should be located here:
http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-hibernatejdbc

Wade

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



RE: Best eclipse plugin for tomcat development

2006-03-19 Thread Wade Chandler
--- Richard Mixon [EMAIL PROTECTED] wrote:

 Dola,
 
 For the last couple of years I have used the Sysdeo
 plugin with good
 success.
 
 But since December the all-in-one bundle of Eclipse
 with the Eclipse Web
 Tools Project has been available. This is a
 completely integrated build that
 does not require installation of plugins. Not only
 does it run Tomcat with
 integrated debugger, but has decent JSP, HTML and
 Javascript editors. Also
 there was a nice step by step tutorial in a recent
 JDJ edition.
 
 Here are the links:
   

http://download.eclipse.org/webtools/downloads/drops/R-1.0-200512210855/
 
 Arguably there are better individual pieces, or even
 bundled combinations
 such as MyEclipse and others, but IMHO this is
 probably the easiest way to
 get going.
 
 HTH - Richard
  
 
 -Original Message-
 From: Dola Woolfe [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 17, 2006 9:45 AM
 To: Tom Cat
 Subject: Best eclipse plugin for tomcat development
 
 Hi,
 
 Following the advice of the mailing lists members,
 I'm trying to work with
 Eclipse. I've learned that to do tomcat development
 I need to download an
 appropriate plugin and that there are seveal to
 choose from. Can someone
 recommend a good one (or is there a best one, or the
 most common one)?
 
 Thanks!
 
 Dola

This doesn't exactly answer your question, but I use
Netbeans a lot for development of Web applications and
Java UIs.  Netbeans has built in support for Tomcat
straight out of install without adding any extra
plugins, and you can install other modules for JBoss
and Sun Application Server, and there may be others. 
You might give it a try.  I haven't used Eclipse much
myself.

Wade

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



Re: Sad: Tomcat 5.5.x crashes almost every single day.

2006-02-28 Thread Wade Chandler
--- Tomasz Nowak [EMAIL PROTECTED] wrote:

 Peter Lin [EMAIL PROTECTED] wrote:
 
  look at the dump, it looks like the permgen ran
 out of space
  
   PSPermGen   total 50304K, used 50170K
 [0x445f, 0x4771,
  0x545f)
object space 50304K, 99% used
 [0x445f,0x476ee878,0x4771)
  
  try increasing your permGen to 128Mb. Another
 option is to use a jdk
  that doesn't have permGen like JRockit.  Sun's
 PermGen is not resized
  once the JVM starts, so if the webapp has lots of
 classes, it can
  exceed the PermGen size.
  
 
 As you see at the bottom of the file I have already
 256m PermSpace.
 Another issue is that if Tomcat 5.5.x runs out of
 PermSpace, it logs:
 
   java.lang.OutOfMemoryError: PermGen space
 
 in contrary to:
 
   java.lang.OutOfMemoryError: Java heap space
 
 And heap space OOME is the one that has been logged.
 
 -- 
 T.
Have you set limits on how large your heap can get? 
If you have limited your new size or changed the
ratios any of that can have this affect as well. 
Sometimes changing the ratio to not have enough new
space and then creating too many objects too fast can
make your application eventually throw OOMEs because
it can't move the objects into older spaces quick
enough depending on what you application is doing.  I
found this happens with large applications (such as
IDEs like Netbeans, but if you web app is large enough
and depending on what you are doingsame thing
could happen).  

How much memory does your system have compared to how
much memory you have allocated to your heap?  Asking
because of the way the VM will be able to allocate
memory.  The total heap size switches are separate
from the MaxPermSize, so if your heap size is too
large and then you have bumped up your PermSize then
you could have this issue when your PermSize resizes
and your heap tries to grow as well.  MaxPermSize
doesn't set the PermSize to that size, but is merely a
limit, so it will grow as you add to your permanent
objects (classes and statics).

Wade

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



Re: Help with detecting session timeout

2006-02-20 Thread Wade Chandler
--- Klotz Jr, Dennis [EMAIL PROTECTED] wrote:

 Greetings to all.
 
 I hope everyone had a great weekend. :) I've run
 into a problem that I
 can't find any answers for and I am hopeful that one
 of you has the time
 to respond.
 
 Given:
 * Tomcat 5.5.15
 * Applet using jvm 1.5
 * An applet that has been sitting idle and tomcat
 has expired the
 session
 * User tries to click on an applet function that
 sends and requests a
 serialized object.
 
 Here is code from the APPLET I'm trying to use. This
 applet code (run
 inside a browser) always receives a status of
 HTTP_OK (200)! Any ideas
 why? From what I can tell, tomcat is trying to send
 the user to the
 forms based login but that never happens since the
 applet has control of
 the browser...
 
 URL servlet = set to a servlet URL;
 
 snip
 
 HttpURLConnection con =
 (HttpURLConnection)servlet.openConnection
 ();
 
 con.setDoInput (true);
 con.setDoOutput (true);
 con.setUseCaches (false);
 con.setRequestProperty (Content-Type,
   application/x-java-serialized-object);
 
 snip
 
 out = new ObjectOutputStream
 (con.getOutputStream ());
 out.writeObject (obj);
 out.flush ();
 out.close ();

 in = con.getInputStream ();
 
 int status = con.getResponseCode();
 
 snip // print the status
 
 // exception always occurs here. EOF on stream
 or
 // invalid stream header... 
 result = new ObjectInputStream (in);
 o = result.readObject ();
 
 return the object to caller
 
 The method call:
 
 int status = con.getResponseCode();
 
 Always returns a status of HTTP_OK (200)! Why oh why
 can't I see a
 status that indicates that the session has expired?
 :) Perhaps that the
 user is no longer authenticated? 
 
 Bueller? Bueller? :)
 
 If anyone can help I offer them a thousands thanks!
 
 -Dennis
 
It's not an error that your session has timed out and
apparently you want the user to see the login if using
a browser.  So, it is valid you are getting a status
200 as you are trying to show the user a valid page
using form login.  So, the browser needs 200 to know
it didn't get an error and should show the form. 
Basically you need to either check your return in the
applet to see if it gets back HTML (possibly could
even use different content types for your normal
applet information so you can check the content type
of the HTTP return) or what you expect and maybe place
a tag in your meta section (custom tag) which you can
parse out to tell if you need to have the user
re-login.  If you don't do something like this you're
going to have to implement your own security.  You can
do this using a Filter and implement your own security
polciies and even implement form logins.

Wade

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



RE: Session Expires At Every Request (Tomcat5.0.28/Firefox)

2006-02-16 Thread Wade Chandler
  Monitoring the HTTP headers for both IE and
 Firefox using 
  HttpAnalyzer for
  IE and LiveHttpHeaders for Firefox gives the
 following:
  1) IE
  
  (Request-Line):GET http://www.tophotelchoices.com/
 HTTP/1.1
  Accept:*/*
  Accept-Language:en-gb
  Accept-Encoding:gzip, deflate
  User-Agent:Mozilla/4.0 (compatible; MSIE 6.0;
 Windows NT 5.1; 
  SV1; .NET CLR
  1.1.4322; InfoPath.1)
  Host:www.tophotelchoices.com
  Proxy-Connection:Keep-Alive
  Pragma:no-cache
  Cookie:JSESSIONID=6F187E9E698F5D81A09DF6AD0D25115D
  
  (Status-Line):HTTP/1.0 200 OK
  Date:Thu, 16 Feb 2006 22:09:18 GMT
  Server:Apache/1.3.33 (Unix) mod_jk/1.2.15
  Cache-Control:no-cache
  Pragma:no-cache
  Expires:Wed, 31 Dec 1969 23:59:59 GMT
  Content-Type:text/html;charset=UTF-8
  X-Cache:MISS from proxy01.spidernet.net
  X-Cache-Lookup:MISS from proxy01.spidernet.net:83
  Proxy-Connection:close
  
  2) FIREFOX:
  GET http://www.tophotelchoices.com/index.jsp
 HTTP/1.1
  Host: www.tophotelchoices.com
  User-Agent: Mozilla/5.0 (Windows; U; Windows NT
 5.1; en-GB; rv:1.7.12)
  Gecko/20050919 Firefox/1.0.7
  Accept:
 

text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
 ,text/plain;q=
  0.8,image/png,*/*;q=0.5
  Accept-Language: en-gb,en;q=0.5
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 300
  Proxy-Connection: keep-alive
  Referer:
 http://www.tophotelchoices.com/timeout.jsp
  Cookie:
 JSESSIONID=3849A82D2F9B6991FE41073D771D1358
  Cache-Control: max-age=0
  
  HTTP/1.x 200 OK
  Date: Thu, 16 Feb 2006 22:12:27 GMT
  Server: Apache/1.3.33 (Unix) mod_jk/1.2.15
  Cache-Control: no-cache
  Pragma: no-cache
  Expires: Wed, 31 Dec 1969 23:59:59 GMT
  Content-Type: text/html;charset=UTF-8
  X-Cache: MISS from proxy01.spidernet.net
  X-Cache-Lookup: MISS from proxy01.spidernet.net:83
  Proxy-Connection: close
  
  Obviously, the response is the same in both cases,
 however, 
  for FireFox the
  important difference I see in Request is the one
 saying Cache-control:
  max-age=0 and also, the Keep-Alive value 300. I do
 not think 
  the Keep-Alive
  value is the problem, however, the Cache-Control:
 max-age=0 
  is suspicious.
  In my code I have 
  response.setHeader(Cache-Control,no-cache) but
 I think
  this is different.  Does anyone have a clue what
 the 
  max-age:0 is doing?
  
  Your help will be greatly appreciated.
  
  
  Thanks and regards,
  Michael
  
  -Original Message-
  From: Filip Hanik - Dev Lists
 [mailto:[EMAIL PROTECTED] 
  Sent: 15 February 2006 22:16
  To: Tomcat Users List
  Subject: Re: Session Expires At Every Request
 (Tomcat5.0.28/Firefox)
  
  George Sexton wrote:
   Does the code transparently create a new
 JSessionID value then?
  
  George,
  you might wanna rethink your comments, they don't
 shine any 
  light on the issue and they for sure don't state
 any facts, 
  let me prove you I am right. Below is the headers
 I tracked 
  with LiveHttpHeaders, as you can see, JSESSIONID
 remains 
  exactly the same in the browser request when the
 switch from 
  HTTP to HTTPS happens.
  This is Firefox on Fedora 4. The site works fine.
  
  This must be a browser issue, can you tell us a
 little bit 
  more about what version and platform your browser
 is on.
  
  1. Request to the home - non secure
 


  http://www.tophotelchoices.com/
  GET / HTTP/1.1
  Host: www.tophotelchoices.com
  User-Agent: Mozilla/5.0 (X11; U; Linux i686;
 en-US; rv:1.8.0.1)
  Gecko/20060124 Firefox/1.5.0.1
  Accept: 
 

text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,
  text/plain;q=0.8,image/png,*/*;q=0.5
  Accept-Language: en-us,en;q=0.5
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 300
  Connection: keep-alive
  Referer: http://www.tophotelchoices.com/
  
  HTTP/1.x 200 OK
  Date: Wed, 15 Feb 2006 20:08:55 GMT
  Server: Apache/1.3.33 (Unix) mod_jk/1.2.15
  Set-Cookie:
 JSESSIONID=735009FD40D725EDAA14389409CD60FF; Path=/
  Cache-Control: no-cache
  Pragma: no-cache
  Expires: Wed, 31 Dec 1969 23:59:59 GMT
  Keep-Alive: timeout=5, max=20
  Connection: Keep-Alive
  Transfer-Encoding: chunked
  Content-Type: text/html;charset=UTF-8
  
  2. Click on the request button - switch from HTTP
 to HTTPS 
 

https://www.tophotelchoices.com/bookingServlet1?hotel=ASI
  GET /bookingServlet1?hotel=ASI HTTP/1.1
  Host: www.tophotelchoices.com:443
  User-Agent: Mozilla/5.0 (X11; U; Linux i686;
 en-US; rv:1.8.0.1)
  Gecko/20060124 Firefox/1.5.0.1
  Accept: 
 

text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,
  text/plain;q=0.8,image/png,*/*;q=0.5
  Accept-Language: en-us,en;q=0.5
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 300
  Connection: keep-alive
  Referer:
 http://www.tophotelchoices.com/searchResults.jsp
  Cookie:
 JSESSIONID=735009FD40D725EDAA14389409CD60FF
  
  HTTP/1.x 200 OK
  Date: Wed, 15 Feb 

RE: No of concurrent requests per session

2006-02-14 Thread Wade Chandler
  -Original Message-
  From: Abhilash Kumar
 [mailto:[EMAIL PROTECTED] 
  Sent: Monday, February 13, 2006 9:45 PM
  To: Tomcat Users List
  Subject: RE: No of concurrent requests per session
  
  Hello:
  
  Thanking everyone for words of wisdom ..
  
  I checked with firefox 1.0.7 also. It is also
 showing the 
  same behaviour as
  with IE.
  
  thanks and regards,
  
  -- Kannan.
And did you download the Fasterfox extension to allow
it more than 2 connections to any given web server? 
By default Firefox (without the Fasterfox settings or
manipulating user.js) will only use 2 connections at
any given time to a single web server.

Wade

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



Re: webapp under different URLs with different JSP but same java classes

2006-02-10 Thread Wade Chandler
--- Lothar Krenzien [EMAIL PROTECTED] wrote:

 Hi,
 
 I'm not sure whether it is possible or not:
 
 I have a webapp which I want to access under
 different URL's with different JSP's but the same
 java classes. I know that I can define the context
 URL in the context.xml But how to define which jsp's
 to use ?
 
 Example :
 
 Context path=/a docBase=/myapp
 
 /Context
 
 Context path=/b docBase=/myapp 
 
 /Context
 
 In myapp I may have a folder jsp_a and jsp_b.  Path
 'a' should use JSPs from jsp_a and path 'b' should
 JSPs from jsp_b. Of course I can set up two
 different webapps. But the java classes and so the
 the content of the WEB-INF/classes directory will be
 identically for both webapps. I'm using Tomcat 5.5
 under Windows 2003.
 
 Thanks,
 Lothar

__
 Verschicken Sie romantische, coole und witzige
 Bilder per SMS!
 Jetzt bei WEB.DE FreeMail:
 http://f.web.de/?mc=021193
 
Why exactly can't you use /webapp/a /webapp/b and must
use /a and /b?  That would be much simpler.  Same
classes and different JSPs.

Wade

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



Re: How to install web application only on one port (both 8080 and 8443 ports opened)

2006-02-06 Thread Wade Chandler
--- Anna Krajewska [EMAIL PROTECTED] wrote:

 Hi 
 
 I wonder is it possible with apache tomcat to
 install two web-services (axis) one on port 8080
 (and only 8080) and another on 8443 (and only that)?
 I have opened both porsts. Now when I install
 web-service it's available on both ports - how to
 change that without closing any of them in
 server.xml file?
 
 Regards
 
 Ania

I may be wrong, but I think you would have to define
two separate hosts and give them different port
numbers.  Like I said...I might be wrong, but you can
try it or someone will surely correct me if I'm wrong.

Wade

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



Re: From Java to C#, ASP.NET [Off Topic]

2006-01-30 Thread Wade Chandler
--- Leon Rosenberg [EMAIL PROTECTED]
wrote:

 On 1/30/06, Tim Lucia [EMAIL PROTECTED] wrote:
  Hibernate is not J2EE based.  It just so happens
 it provides a EJB-free
  solution to a servlet container environment. 
 Hibernate does not require
  J2EE.
 
 I think hibernate supports JTA and JDBC? Ok, JDBC
 isn't J2EE since 3.0
 but was before. (Actually it should become J2EE in
 4.0, but this was
 changed).
 But JTA is J2EE as well as JMX, isn't it?
 
  Tim
 Leon.
 
 But actually it doesn't play a role..., just another
 crutch to keep
 relational databases in business :-)
 
 
Actually JDBC isn't J2EE at all.  XA transaction stuff
is J2EE.  XA can apply to a database or other
transaction types as well completely unrelated to a
database.  JDBC is a standard J2SE API.  See:
http://java.sun.com/j2se/1.5.0/docs/api/

JDBC has been in the standard edition since 1.0 or
1.1.

Everything in the docs here are standard java as of
1.5.  See the 1.4.2 docs for pre 5.0 and obviously
other versions to get pre version information for the
version you look at.  Thus, everything in this set of
documentation is standard or J2SE and is not J2EE. 
For the list of APIs which is only J2EE (thoughmany if
not most or all are available as separate API
libraries from either Sun, Apache, or some other
offering) see (this is 1.4):
http://java.sun.com/j2ee/1.4/docs/api/index.html

For a list of J2EE standards/specifications and future
ones see:
http://www.jcp.org
and sort by technologies.

and see:
http://java.sun.com/j2ee/1.4/docs/index.html#specs

Just want everyone to be clear what APIs are really
J2EE and which ones are not before we discuss it.  It
seems to much misinformation gets out accidentally. 
The best source is to read the JSRs at the JCP.  Then
see a company such as Sun which lists all of the
specifications for an easier view of the list.  Doing
that you can also see some applications and
implementations which use the specifications.

You can certainly create more than a trivial
application completely skipping J2EE altogetherit
just helps with some types of applications.  For
instance, you can take an implementation of a certain
specification such as web applications and servlets. 
Create a servlet based web application and merely
touch an API and specification not the complete J2EE
stack and really don't have to call it J2EE if you
don't want.  Refer to it as it's JSR or say Servlet
Spec 2.2, 2.3, or 2.4...pick one).  Take Tomcat web
applications for instance.  You can reuse the Tomcat
APIs to create a web application linking to the
servlet.jar available from a distribution without ever
downloading J2EE and linking to it.

I believe what we see more of is the marketing hype
and FUD confuses the use cases for many people and
recruiters and human resource departments at
organizations make it even more confusing for some
others by the fact they don't know what their
organization needs and all they know is what is on
paper and then they try to talk about things like they
know what they are talking about.  That doesn't change
the fact that one can create their own version of an
API to match a certain specification then use that for
linking and building to deploy to another system which
supports many APIs and specifications including the
one you may have targeted.  So, just to be clear.  Not
all the APIs and specifications of J2EE have to be
used to have a compliant application nor does a
developer have to install J2EE to create a J2EE
compliant application, they merely have to link to a
set of interfaces matching a subset of J2EE for any
given requirement, and sometimes this means it's
easier to just download J2EE and get it all.

I love software and programming :-D,

Wade

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



RE: From Java to C#, ASP.NET [Off Topic]

2006-01-29 Thread Wade Chandler
--- David Tonhofer, m-plify S.A.
[EMAIL PROTECTED] wrote:
 Another 2c: When doing Java, you may want to stay
 clear of J2EE. I have
 heard it's the Wooly Mammoth framework and I have so
 far worked happily
 without it. I recommend a look at Bruce Tate's
 pamphlet here:
 
 http://www.oreilly.com/catalog/bfljava/
 
 Best regards,
 
  -- David

Specifically on this one email:
http://java.sun.com/j2ee/1.4/docs/api/index.html

J2EE is an API set to support some specifications:
http://java.sun.com/j2ee/1.4/docs/index.html#specs

There isn't much to it.  It depends on what
specifically you are going to need to use.  There are
a lot of services provided by J2EE.  So, naturally
it's going to get a little complex.  J2EE is J2SE+ and
specifications.

Then on the general topic/this thread:

There is SO much mis-information put out by competing
technologies and those wanting to evangelise for their
perceived benefit.  One could argue different terms
and be correct in either direction.  Java will run on
more platforms currently, and .NET could were there to
be more runtimes for more platforms.  C# has some
language features Java doesn't have which can be both
helpful and harmful depending on view point.  Java is
much more KISS in that regard.

Some organizations want to use the same environment
across the board and might only want MS products. 
Fair enough, run with it.  Some may not want to be
limited in that regard as some organizations like to
run heavy enterprise databases on more advanced and
capable hardware.  Some like to have different OS for
different jobs.  One size doesn't always fit all for
every organization.  So, to each their own.  To say
one is better than the other is merely a point of
opinion and depending on what an organization wants to
lock in on should dictate more than anything what
technologies are used.

Personally: 
=
I prefer KISS as it helps to simplify things, so I
prefer the java language.  In C# you might have an
event handler setup using delegates or interfaces.  So
you have different ways of doing the same thing.  I
prefer one way.  I also prefer javas inheritance
language compared to C# and it's C++ syntax.  I don't
like the package naming conventions set by MS either
which makes it easy for namespace/class name
collision.  Nor do I like the new partial classes.  I
don't think certain things add to readability and aid
in an overall project as much as they might help a
single persons productivity with getting one thing
done.  

I have done plenty of things in the past which helped
me, but made it harder for other people to keep up
with me on a project as it was merely understandable
by me because I wrote it and the language supported me
doing so.  I've done this with C/C++ macros as well. 
So, some things personal and some things in the
language are good candidates for me to drop from
project usage when setting up conventions for an
organizations project.  Same thing in C++ would happen
alotso for conventions unless there was no real
way of doing something without using some complex hard
to read syntaxI always limit the usage of certain
language syntax.

Other than language issues I prefer the Java platform
all together unless .NET is a requirement imposed by
someone else.  There is no benefit which I can see in
using .NET over Java.  I would rather use one main
environment and tool set and only user another when
needed.  Were that environment to be .NET I would feel
the same way about Java.  However, I develop for
Linux, Windows, and Macintosh and occasionally flavors
of Unix, so that kind of rules out .NET.
=

As to the notion that some application runs better on
.NET vs Java or vice versareally it will all
depend on how any given application is written and
which one comes before the other: meaning...I can
write an application and John Doe can come along
behind me and improve on it and I can come along
behind him and improve on what he did and we can keep
doing this until we're exausted and neither one really
accomplish anything better than the other but we can
surely, each, convince a few others we did.  Sun and
Microsoft collaborate now days...just like before the
lawsuit...now that they settled their ordeal.  They
entered into a technology sharing agreement which was
a big news story when it first happened and was post
on their sites, so who ever really thinks they aren't
borrowing many of the same ideas from each other are
blinded by the marketing and propaganda hype natually
put out by commercial companies.  I might be able to
locate the article.

So, to sum it up.  Use what you are more confortable
with most of the time, but don't lock yourself into
any single technology as you'll certainly have to
write some code in more than one langauge on more than
one platform if you have a very long career in this
field.  Personally I prefer Java, but if I have an
oppurtunity to help my career or my situation then I
would be a fool to say 

Re: From Java to C#, ASP.NET [Off Topic]

2006-01-29 Thread Wade Chandler
For a little bit of who really cares and what's it
really matter anyways:
http://weblogs.java.net/blog/haroldcarr/archive/2006/01/introducing_jav.html

;-)

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



Re: From Java to C#, ASP.NET [Off Topic]

2006-01-26 Thread Wade Chandler
--- Tony LaPaso [EMAIL PROTECTED] wrote:

 Certainly -- $5,000 and it's yours!
 --
 Tony LaPaso
 
 
 
 - Original Message - 
 From: Leon Rosenberg
 [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Wednesday, January 25, 2006 4:00 AM
 Subject: Re: From Java to C#, ASP.NET [Off Topic]
 
 
 
  I've been programming in Java/J2EE for the past 8+
 years, most of 
  this
  time as a contractor for several companies on many
 J2EE projects. I
  even have a small (and now hopelessly out of date)
 Java web site that
  I've maintained for the past 5+ years at
 www.absolutejava.com, which
  will be removed in early May.
 
 since you don't need it anymore, can i have it? :-)
 I mean the domainname
 
 regards
 Leon
 

Squatter: If he doesn't keep renewing it then it will
be up for grabs anyways.

Wade

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



Re: Memory leaking on [un|re]load: WebappClassLoader isn't GC'ed

2006-01-25 Thread Wade Chandler
--- Davide Romanini [EMAIL PROTECTED] wrote:

 Il giorno mer, 25/01/2006 alle 15.34 +, Mike
 Fowler ha scritto:
  Good day,
  
  I have encountered a similar problem while
 deploying webapps. In my case 
  I noticed that after the sixth deployment I would
 encounter 
  OutOfMemoryError when I tried to use the
 application. After trawling the 
  archives and running the tomcat jvm with the
 -XX:+PrintGCDetails option 
  I discovered that I run out of PermSpace. Reading
 this posting
 

http://marc.theaimsgroup.com/?l=tomcat-userm=113532811904238w=2
 from 
  Rodrigo Ruiz I discover that the memory leak is
 caused by static classes 
  (aka Singletons) that are dotted all over support
 jars in my classpath. 
  For me to solve my problem I would need to go on
 one hell of an 
  anti-singleton crusade, and tempting as it, is I
 haven't the time. 
  Perhaps this is the cause of your problems as
 well?
  
  Kind regards,
  
 
 It's a known problem caused by a lot of different
 situations. It's sad
 that a lot of important applications suffer of this
 problem. I'm working
 with Axis, and just trying to reload the bundled
 webapp never release
 the old WebappClassloader.
 
 I think this is serious: hot deployment becomes
 totally useless and you
 have to restart tomcat each time you deploy a new
 version :-(
 
 Bye,
 Davide Romanini

Don't use shared libraries and you shouldn't have this
problem.  If all of the statics are in your WEB-INF
directory then you won't have an issue with unloading
classes and class loaders.

Wade

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



Re: Does tomcat 5.0 officially support JDK1.5?

2006-01-18 Thread Wade Chandler
--- HuangHao [EMAIL PROTECTED] wrote:
 Thanks. As a requirement, my application need to
 support both Tomcat 5.0 
 and 5.5. But my application requires JDK1.5 for some
 reason. 
Should be fine if it's only that you are using methods
and classes from JDK1.5 which were not available in
previous JDK/JRE.

I 
 understand it is OK with JDK1.5+Tomcat5.5, but I
 want to make sure 
 JDK1.5+Tomcat 5.0 can work too.  I can start  Tomcat
 5.0 with  JDK1.5 
 but that can't be regarded as a fully support
 certificate.
I really don't understand the question.  Maybe you
could re-form your question better and help me or
someone else better understand what it is you are
asking exactlyclients can't connect because of
some type of an SSL certificate...your web-app is
connecting to some external resource using a
certificateyou are using some key store..could
be any type of a certificate.
 
 Does apache has official announcement about this
 issue?
 
 Thanks
 
 Hao

Wade

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



Re: Does tomcat 5.0 officially support JDK1.5?

2006-01-17 Thread Wade Chandler
--- HuangHao [EMAIL PROTECTED] wrote:

 Hi folks,
  I am going to run Tomcat 5.0.* with JDK 1.5, I
 wonder whether Tomcat 5
  officially support JDK1.5 yet. I found in Apache
 site
 

http://tomcat.apache.org/tomcat-5.0-doc/appdev/installation.html
  that Tomcat 5 has been extensively tested with
 JDK 1.3.1 as well as JDK
  1.4.2, and the latter is recommended., but can't
 find anything about
  jdk1.5.
  could you please give me some guide or references,
 thanks in advance.
 
  Hewitt
 
For 1.5 specific things you'll need to be using Tomcat
5.5.x

Wade

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



Re: Threads and SocketException

2006-01-14 Thread Wade Chandler
--- Thom Hehl [EMAIL PROTECTED] wrote:

 OK, I'm using tomcat and a sevlet to launch a
 background process in a 
 separate thread. It seems to launch just fine, but
 after it runs for 
 maybe 30 seconds it dies, spitting out this error:
 
 java.net.SocketException: Connection reset
 at java.net.SocketInputStream.read(Unknown
 Source)
 at java.io.BufferedInputStream.read1(Unknown
 Source)
 at java.io.BufferedInputStream.read(Unknown
 Source)
 at java.io.BufferedInputStream.fill(Unknown
 Source)
 at java.io.BufferedInputStream.read(Unknown
 Source)
 at 

org.apache.commons.net.telnet.TelnetInputStream.__read(TelnetInputStream.java:114)
 at 

org.apache.commons.net.telnet.TelnetInputStream.run(TelnetInputStream.java:535)
 at java.lang.Thread.run(Unknown Source)
 
 Any ideas as to what may be happening, how I can
 fix?
 
 Thanks.
 
 Thom Hehl
 Heavyweight Software for Heavyweight Needs
 www.heavyweightsoftware.com
 -- 
 In every revolution, there is one man with a
 vision.--Jerome Bixby
Well what ever it is has to do with your connecting to
some service/resource and reading something.  Commons
net Telnet connections maybe?  What ever it is is
getting an exception.  I'd start there.  You can also
debug your application.  Develop in an IDE and step
through the code giving you an error.  Netbeans and
Eclipse can help you there.

Wade

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



Re: Cannot find servlet

2006-01-13 Thread Wade Chandler
--- Thom Hehl [EMAIL PROTECTED] wrote:

 Sigh, I don't know why I keep having problems like
 this. I have the 
 following servlet:
 
 package rex;
 /*
  * Copyright 2006, Heavyweight Software. All rights
 reserved.
  */
 
 import java.io.IOException;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.RequestDispatcher;
 
 import rex.IdxFileConverter;
 
 /**
  * servlet to simply launch the rex conversion
 process
  */
 public final class LaunchRex extends HttpServlet
 {
 Boring stuff here...
 }
 
 Here is my web.xml file:
 
 ?xml version=1.0 encoding=ISO-8859-1?
 web-app xmlns=http://java.sun.com/xml/ns/j2ee;


xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee 
 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;
 version=2.4
 
 display-nameLaunches the REX
 converter/display-name
 description
 Launches the REX converter
 /description
 
 servlet
 servlet-nameLaunchRex/servlet-name
 servlet-class
 rex.LaunchRex
 /servlet-class
 /servlet
 
 servlet-mapping
 servlet-nameLaunchRex/servlet-name
 url-pattern/LaunchRex/url-pattern
 /servlet-mapping
 
 /web-app
 
 I have stored LaunchRex.class in rex.jar file in the
 lib directory of my 
 webapp.  When I access
 http://localhost:81/rex/LaunchRex I get this error:
 
 javax.servlet.ServletException: Wrapper cannot find
 servlet class rex.LaunchRex or a class it depends on
 

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
 

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   java.lang.Thread.run(Unknown Source)
 
 I'm not sure where to look next. Help?
 
 Thanks.
 
 Thom Hehl
 Heavyweight Software for Heavyweight Needs
 www.heavyweightsoftware.com

Well, there isn't really a lot to go on here.  My
guess would be that you have put the class file in the
jar, but didn't put the package and class in the jar. 
Meaning: If you extract your jar using a zip utility
the top level would have simply LaunchRex.class when
it should have rex/LaunchRex.class.

Wade

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



Re: How to redirect incoming requests?

2006-01-11 Thread Wade Chandler
--- Ritchie Gillam [EMAIL PROTECTED] wrote:

 I am trying to have all requests that come to the
 Tomcat Server be redirected to another web server. 
 What is the best/easiest was to do this?
 
 I have Tomcat 5.5.7 installed and I do not have or
 want to install Apache.
 
 I have did a search through the archives and have
 found nothing.
 
 Any suggestions?
 
 Thanks in advance,
 
 Tomcat 5.5.7
 Sun Solaris 9
 
 Ritchie 

Depending on whether you really want to redirect or
perform proxying you have to do different things.  

1) A simple redirect.  You can send a redirect and
just make all requests go to your servlet using the
default web application web.xml file to map all
requests to go to a servlet.  Must be the default web
app/context.

2) Http pass through proxy like mod_proxy that Apache
can use.  You will need to create a Filter and install
it into your default web application for the given
Host or Server, or you could also use a Servlet for
this and have all requests come through that servlet
(default web app as well).  Regardless you'll have to
get your ServletRequest as an HttpServletRequest
package it all back up and then use an HttpClient
instance to proxy the request through to another
server and filter back through your single end point. 
This makes your requests go to be processed by
different systems, yet they come through one from end.
 Nothing but simple pass through. 

Someone else might know of some project which is
already doing this.  It would be nice if you could
find one that would watch a properties or xml file
with the proxy information sort of like the Apache
conf file will have for mod_proxy and then reload it
and the new rules when the file changed.

Wade

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



RE: Single Thread is deprecated?

2006-01-09 Thread Wade Chandler
--- Duan, Nick [EMAIL PROTECTED] wrote:

 Well, when I was mentioning the term user session, I
 was discussing from
 a threading/transaction perspective, not from the
 servlet object
 perspective.  It is the worker thread that
 represents a active user
 session and accesses both the session and the
 servlet object (if we want
 to be precise).
 
 Chuck was right.  It is possible to have one client
 (single browser) to
 start two concurrent sessions at the same time, both
 eligible to access
 the same HttpSession object.  Therefore, it looks
 like synchronization
 is necessary from the spec.  However, the spec does
 not define how
 HttpSession should be implemented (it's just an
 interface).  In fact,
 the session attributes were implemented as a
 Hashtable in tomcat, not a
 Hashmap (just double checked the latest 5.5.15 src
 of tomcat).  As we
 all know, Hashtable already has thread sync built
 in.  So that's why
 additional synchronization on HttpSession in tomcat
 is unnecessary.
 
 ND 
I don't know about 5.5.15, but 5.5.9 used HashMap. 
The synchronization of the session object was an issue
which caused other issues and is why there should now
be synchronization on the reading as well as writing
session attributes.  There was a  huge discussion on
this on the list as well as a bug associated with it
which could cause finite dead locks in Tomcat if
access made the session resize while it were being
read (should be able to find it in bugzilla...bugzilla
was still being used).  Session has to be synchronized
anyways, so regardless of misintrepretation/correct
interpretation of the specification arguments it would
make sense for these calls to be synchronized by what
ever server is implementing the specification.  I'm
saying: If all developers have to synchronize access
to all session access then would it not make sense for
things to be synchronized as they currently are...at
the server level?  All scopes which would need
synchronization should really be handled at the server
level (application and session).

The tomcat source code should be synchronizing these
things now.  At the time it wasn't talked about, but
the application level scope was not being synchronized
when I looked through the source code when the
synchronization bug mentioned above was being
discussed.  I don't know if this has changed or not (I
was hoping ... considering the needless long overly
exhaustive discussion that had to occur to get an
obvious bug changed back to the correct behaviour...it
was once synchronized correctly before it was
brokenthat the other pieces would be seen and
fixed as well as they would cause the same dead lock
behaviour as session access could depending on what
happened when the application scope was accessed does
a read occur when a write occurs or a write at certain
points in the resize.).  Just to clarify now before a
discussion starts again on this topic: It matters
these things are taken care of at the server level in
one place or another as JSP/EL are hard to synchronize
without breaking their use case (not to use java code
within them).  I mean, if someone knows how to
synchronize access to the session or application
scopes (use that term to represent accessing the
session from all other places and tags it can be
accessed) when using EL or setting/getting a bean in a
JSP without a specialized tag library or wrapping in
java code then please share, but I think I'm asking an
unanswerable quesiton ;-)

I wouldn't imagine that the source code is using
Hashtable as Hashtable does not allow null values, and
would have changed the currently used session access. 
Were you looking at the file:
$TOMCAT_SRC/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java
in your source?

Wade

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



RE: Single Thread is deprecated?

2006-01-09 Thread Wade Chandler
--- Wade Chandler [EMAIL PROTECTED]
wrote:

 --- Duan, Nick [EMAIL PROTECTED] wrote:
 
  Well, when I was mentioning the term user session,
 I
  was discussing from
  a threading/transaction perspective, not from the
  servlet object
  perspective.  It is the worker thread that
  represents a active user
  session and accesses both the session and the
  servlet object (if we want
  to be precise).
  
  Chuck was right.  It is possible to have one
 client
  (single browser) to
  start two concurrent sessions at the same time,
 both
  eligible to access
  the same HttpSession object.  Therefore, it looks
  like synchronization
  is necessary from the spec.  However, the spec
 does
  not define how
  HttpSession should be implemented (it's just an
  interface).  In fact,
  the session attributes were implemented as a
  Hashtable in tomcat, not a
  Hashmap (just double checked the latest 5.5.15 src
  of tomcat).  As we
  all know, Hashtable already has thread sync built
  in.  So that's why
  additional synchronization on HttpSession in
 tomcat
  is unnecessary.
  
  ND 
 I don't know about 5.5.15, but 5.5.9 used HashMap. 
 The synchronization of the session object was an
 issue
 which caused other issues and is why there should
 now
 be synchronization on the reading as well as writing
 session attributes.  There was a  huge discussion on
 this on the list as well as a bug associated with it
 which could cause finite dead locks in Tomcat if
 access made the session resize while it were being
 read (should be able to find it in
 bugzilla...bugzilla
 was still being used).  Session has to be
 synchronized
 anyways, so regardless of misintrepretation/correct
 interpretation of the specification arguments it
 would
 make sense for these calls to be synchronized by
 what
 ever server is implementing the specification.  I'm
 saying: If all developers have to synchronize access
 to all session access then would it not make sense
 for
 things to be synchronized as they currently are...at
 the server level?  All scopes which would need
 synchronization should really be handled at the
 server
 level (application and session).
 
 The tomcat source code should be synchronizing these
 things now.  At the time it wasn't talked about, but
 the application level scope was not being
 synchronized
 when I looked through the source code when the
 synchronization bug mentioned above was being
 discussed.  I don't know if this has changed or not
 (I
 was hoping ... considering the needless long overly
 exhaustive discussion that had to occur to get an
 obvious bug changed back to the correct
 behaviour...it
 was once synchronized correctly before it was
 brokenthat the other pieces would be seen and
 fixed as well as they would cause the same dead lock
 behaviour as session access could depending on what
 happened when the application scope was accessed
 does
 a read occur when a write occurs or a write at
 certain
 points in the resize.).  Just to clarify now before
 a
 discussion starts again on this topic: It matters
 these things are taken care of at the server level
 in
 one place or another as JSP/EL are hard to
 synchronize
 without breaking their use case (not to use java
 code
 within them).  I mean, if someone knows how to
 synchronize access to the session or application
 scopes (use that term to represent accessing the
 session from all other places and tags it can be
 accessed) when using EL or setting/getting a bean in
 a
 JSP without a specialized tag library or wrapping in
 java code then please share, but I think I'm asking
 an
 unanswerable quesiton ;-)
 
 I wouldn't imagine that the source code is using
 Hashtable as Hashtable does not allow null values,
 and
 would have changed the currently used session
 access. 
 Were you looking at the file:

$TOMCAT_SRC/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java
 in your source?
Ok, so after I wrote that I checked the latest
sourceit is a Hashtable.  When did the behaviour
change that a null attribute could not be used.  I
could have swore I remember using null attributes in
sessions...oh well, the way it is handled in
setAttribute works well.  Remove it so you can always
check to see if it is set or not with a getAttribute
call.  So yeah, that should do it.  I guess I'll go
ahead and check the SessionContext as well.

...

Wade

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



Re: Single Thread is deprecated?

2006-01-06 Thread Wade Chandler
--- Christian Stalp [EMAIL PROTECTED] wrote:

 Remy Maucherat wrote:
 
 It's deprecated because it is confusing, but it is
 actually very
 useful performance wise in some cases, since it
 does pooling. I will
 make sure this feature remains available in the
 future.
 
   
 
 That means, I still can use it?! Deprecated is not
 prohibited!?!! Is 
 there any alternative for such purposes?
 
 Gruss Christian
Deprecated only means the feature is not guarenteed to
be around in future releases, so you shouldn't be
upset if one day it is gone in another version.  It
doesn't mean you can't use it.  Sometimes APIs get
deprecated before their replacements are even added
(when they're getting a replacement).

For a simple definition of the word:
http://www.webopedia.com/TERM/D/deprecated.html

Wade

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



Re: Tomcat5 on FC4 problems

2006-01-02 Thread Wade Chandler
--- Bob Hartung [EMAIL PROTECTED] wrote:

 Hi all and Happy New Year
I have FC4 updated on a test server and I am new
 to java, Tomcat, 
 etc.  I was trying to install a MIRC Servr (freeware
 teaching and 
 research case file manager from the Radiological
 Society of North 
 America) that called for java-1.4.2 and tomcat4.
So like a newbie I tried to remove tomcat5.  I
 did get Tomcat4 
 running but suspect portions of Tomcat5 were
 lingering.  Eventually, 
 after about 10 days of frustration, I gave up and am
 trying to get my 
 FC4 system back to base line with Tomcat5.
 
Using yum i tried to re-install and update all
 packages.  I get the 
 following error on trying to start Tomcat5 (note
 (...) is where I 
 snipped some.  Also this is not the entire output of
 catalina.out but is 
 a representative sample of 5 similar areas.  Can
 someone help me figure 
 out what is missing or where/how to begin finding
 the missing files?
 
 I can confirm that libgcj.so.6.0.0 is installed.
 
 Thanks
 
 Bob
 
 
 catalina.out - truncated.
 
 Exception in thread main
 java.lang.NoClassDefFoundError: while 
 resolving class:
 org.apache.catalina.startup.Bootstrap
   (...)
 Caused by: java.lang.ClassNotFoundException: 
 javax.management.MBeanServer not found in 

gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/lib/jvm/java/lib/tools.jar,file:/usr/share/tomcat5/bin/bootstrap.jar,file:./],
 
 parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[],
 parent=null}}
 at
 java.net.URLClassLoader.findClass(java.lang.String) 
 (/usr/lib/libgcj.so.6.0.0)
 at
 java.lang.ClassLoader.loadClass(java.lang.String,
 boolean) 
 (/usr/lib/libgcj.so.6.0.0)
 at
 java.lang.ClassLoader.loadClass(java.lang.String) 
 (/usr/lib/libgcj.so.6.0.0)
 ...4 more
 

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

The issue is you are using GCJ and a gcj compiled
version of Tomcat.  I doubt the Tomcat list will
really answer too many questions.  If you want to be
able to install java and other versions of Tomcat
you'll have to remove the gcj java wrappers from your
bin (javac, java, maybe others).  Install java, add
it's bin to your path and set your JAVA_HOME
environment variable.  Then download tomcat and setup
your CATALINA_HOME and what ever else.  I realize
that's a little vague, but you probably could have
gotten going with the downloaded Tomcat had you had
java (not gcj wrappers) installed and linked to
correctly.  I never had much luck out of Tomcat on
gcjthat's just my experience.

Wade

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



RE: mod_jk versus mod_proxy under load ?

2005-12-29 Thread Wade Chandler
  -Original Message-
  From: news [mailto:[EMAIL PROTECTED] On Behalf
 Of Bill Barker
  Sent: Thursday, December 29, 2005 2:09 AM
  To: users@tomcat.apache.org
  Subject: Re: mod_jk versus mod_proxy under load ?
  
  One of our production servers recently started to
 suffer from very
  heavy performance troubles under load : the
 current setup is apache2 +
  mod_jk/ajp13 + tomcat5.0.25, jdk 1.4.2, 1GB
 (Xmx/Xms to 640MB) 
This will not limit the entire memory used by the
process.  Your Perm space is not limited by mx what so
ever.  Search for 
:Perm +java
on google.  You may already know this.

on a
  dual 2.4Ghz Xeon server. The maximum amount of
 requests/sec reached is
  around 15req/sec under production load, and I'd
 like to hit something
How many threads are allowed?  What are you doing
inside of your web pages? What technologies are you
using?  Have you profiled your application?  Where are
your bottleknecks?
  between 30 and 40req/sec, unfortunately, mod_cache
 is not really an
  option for our current hosting company.

Then with mod_proxy:
Proxy works good for different things.  You can round
robin or you can defer certain client requests to this
or that server.  We did this thing one time (no I
didn't say at band camp) where we were able to push
www.whatever.com/client1 */client2 */client3 to one
server and */client4 */client5 and */client6 to this
other server.  That worked well at limiting traffic on
the individual servers, but the scheme you go with
depends on customer usage.  The good part is the
request to the user looks the same and goes to a
single domain where as you use apache to split the
requests off to other servers.  I setup a separate
Apache all together for the mod_proxy machine, so it
wouldn't get bogged down and be a bottle kneck trying
to do two things.  Apache won't even try to process
the request past where it is needing to be relayed
depending on your processing rules in your conf file,
so you can really move the load around with mod_proxy.
 I think for sessions and stuff to work right if you
round robin you'll have to use clustering in tomcat or
use some type of a database session store (depends
then on will this become a bottle kneck).  If you push
this or that client here or there...depending on what
you're doing clustering won't matter because the same
users will be hitting the same server in the end.

In either case you really can't use a mod_jk vs.
mod_proxy mentality.  They both will be working
together.  I may have missed something in the question
though.

Wade

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



Re: Apache version

2005-12-28 Thread Wade Chandler
--- Franklin Phan [EMAIL PROTECTED]
wrote:

 I'm running Tomcat on Windows XP Pro.  I'm trying to
 set up PHP.  How do I tell which Apache version I'm
 running?
 
 

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

If you are only running Tomcat then you are not
running the Apache httpd web server.  The tomcat
version is usually available  by simply looking at the
directory name, and you can run PHP using the servlet
they provide...see their docs.  If you want to install
the actual Apache web server you need to see:
http://httpd.apache.org

If you have httpd already installed then go to your
bin directory for the installation from the command
line and type:
httpd -v

Which will cause it to print the version and exit.

Wade

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



Re: Apache version

2005-12-28 Thread Wade Chandler
--- Franklin Phan [EMAIL PROTECTED]
wrote:

 Oh.  Probably not.  Do I need to install Apache to
 run PHP?
 
 
 Charles Baker wrote:
  You may not be running apache. Installing tomcat
 does not install
  apache. Did you install apache?
  
  
  Charles H. Baker
  O: 864.422.5349 C: 864.201.8456
  [EMAIL PROTECTED] 
  There's nothing wrong with getting a steady
 paycheck, unless it
  interferes with your ability to earn what you're
 worth. There's the rub.
  It usually does. -- T Harv Eker
  
  -Original Message-
  From: Franklin Phan
 [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, December 28, 2005 3:13 PM
  To: Tomcat Users List
  Subject: Apache version
  
  I'm running Tomcat on Windows XP Pro.  I'm trying
 to set up PHP.  How do
  I tell which Apache version I'm running?
  
  
 

-
  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]
 
 

No the PHP documentation will show you two ways to run
PHP.  Either using a servlet and using something like
tomcat or using apache (httpd).

For setting up in Tomcat you can probably see:
http://us2.php.net/manual/en/ref.java.php#java.servlet

Wade

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



Re: Apache version

2005-12-28 Thread Wade Chandler
--- Martin Gainty [EMAIL PROTECTED] wrote:

 
 Good Afternoon Franklin-
 Running PHP on Apache would be like putting a Yugo
 engine in a McLaren
 ..ok if your users demand sluggish performance from
 their webapp server
 Martin-
 - Original Message - 
 From: Franklin Phan [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Wednesday, December 28, 2005 3:24 PM
 Subject: Re: Apache version
 
 
  Oh.  Probably not.  Do I need to install Apache to
 run PHP?
  
  
  Charles Baker wrote:
  You may not be running apache. Installing tomcat
 does not install
  apache. Did you install apache?
  
  
  Charles H. Baker
  O: 864.422.5349 C: 864.201.8456
  [EMAIL PROTECTED] 
  There's nothing wrong with getting a steady
 paycheck, unless it
  interferes with your ability to earn what you're
 worth. There's the rub.
  It usually does. -- T Harv Eker
  
  -Original Message-
  From: Franklin Phan
 [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, December 28, 2005 3:13 PM
  To: Tomcat Users List
  Subject: Apache version
  
  I'm running Tomcat on Windows XP Pro.  I'm trying
 to set up PHP.  How do
  I tell which Apache version I'm running?
  

Not sure I'm following where you're going with this. 
I've run plenty of PHP applications on Apache Httpd
and never had any issues (Do you mean he should be
using IIS?).  Definitely off topic for the list, but
come on.

Wade

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



Re: detecting a new file

2005-12-26 Thread Wade Chandler
--- Khawaja Shams [EMAIL PROTECTED] wrote:

 Hello all,
 I am curious if anyone has ever had to write a
 servlet that listens for
 new files on the server and processes them upon
 appearence.  Basically, I
 need to write a server side program that detects
 when (our automated
 process) delivers a file to the server filesystem
 and then process the
 file.  I would sincerely appreciate any pointers on
 how this can be
 accomplished from within tomcat.
 
 
 Happy Holidays.
 
 
 Sincerely,
 Khawaja Shams
 


My theory is always copy something that is working
now.  Go to www.netbeans.org,download a source zip as
available here
(http://www.netbeans.info/downloads/download.php?a=np=2)
... maybe choose a daily build ... keep following the
arrows eventually you'll get to the download and be
able to select a source download...that or figure out
how to use their CVS repository, and then follow the
source directory structure to the directory (relative
obviously):
openide\fs\src\org\openide\filesystems

see the files:
FileChangeListener.java
FileChangeAdapter.java
FileEvent.java
AbstractFolder.java (this actually has the code to
watch the directory)

also the tomcat code watches directory contents and
files as well.  I don't know exactly where, but you'll
be looking for code that watches the webapps directory
for .war files and possibly other files.  Auto-deploy
of war files works this way.

Anyways, all you're doing is watching a directory for
files and storing previous states so you can compare
later to see what has happened.  You could store state
in a DB and use SQL to determine changes or store it
in memory.  This will all depend on what you need ...
speed vs. memory usage.  SQL and connections obviously
slower than an in memory map, but it should save you
on always keeping your memory used.

Hope it helps,

Wade


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



RE: detecting a new file

2005-12-26 Thread Wade Chandler
--- Daniel Blumenthal [EMAIL PROTECTED] wrote:

 A related question to this is, how can you set up a
 process within the
 servlet that fires off at X time, or every Y
 seconds?  The equivalent of a
 cron job inside the servlet.
 
 If you have high enough traffic, there's an easy
 hack - just store a Date
 object as a servlet-level attribute, and check on
 each request if the
 current time is greater than or equal.  But is there
 a cleaner solution?
 Also, it would be nice to have a little more precise
 control than hoping
 that a user will happen to come to the site at the
 right time.
 
 I suppose you could spin off a thread that sleeps
 for X amount of time,
 wakes to check on the situation, and goes back to
 sleep when done.
 
 To the specific question - I would guess
 (incorrectly?) that there's no Java
 file system listener.  But I could certainly be
 wrong... ?
 
 Daniel
 
  -Original Message-
  From: Khawaja Shams [mailto:[EMAIL PROTECTED] 
  Sent: Monday, December 26, 2005 8:20 PM
  To: Tomcat Users List
  Subject: detecting a new file
  
  Hello all,
  I am curious if anyone has ever had to write a
 servlet 
  that listens for new files on the server and
 processes them 
  upon appearence.  Basically, I need to write a
 server side 
  program that detects when (our automated
  process) delivers a file to the server filesystem
 and then 
  process the file.  I would sincerely appreciate
 any pointers 
  on how this can be accomplished from within
 tomcat.
  
  
  Happy Holidays.
  
  
  Sincerely,
  Khawaja Shams
  
There is no standard file system watcher...at least
not in standard API's which I know of.  Yes, you have
to use a thread or java.util.Timer (uses a thread
behind the abstraction and might make it easier for
you) to do this unless you use SharedMemory or TCP/IP
and spawn off a separate process so you don't break
the rule about not creating threads in the container
(but I don't want to complicate this discussion), but
I prefer to go by what I need when I need it vs the
spec ( ;-) ) utility threads like this are needed at
times depending on what you need/have to accomplish. 
I would use a thread for this as it's pretty simple
stuff.  Just make sure you protect the tread with good
try-catch so you don't bust out of the watching thread
on some goofy error...you'll have to weigh this
obviously.  Setup a simple event mechanism like:
public interface FileChangeListener extends
java.util.EventListener {
public void fileChanged(FileChangeEvent evt);
}

public class FileChangeEvent extends
java.util.EventObject {
public static final int TYPE_NEW = 1;
public static final int TYPE_MODIFIED = 2;
private int eventType = TYPE_NEW;
private MonitoredFile source = null;
private MonitoredFile watched = null;

public FileChangeEvent(){

}

public void setSource(MonitoredFile source){
this.source = source;
}

public MonitoredFile getSource(){
return this.source;
}
//...
//put other setters here for watched and type

}

public class MonitoredFile extends File {
public void
addFileChangeListener(FileChangeListener listener){
 //if using a JDK/JRE with
javax.swing.event.EventListenerList
 then use that for holding the events...just makes it
a little easier
}

public void
removeFileChangeListener(FileChangeListener listener){
   //use your javax.swing.event.EventListenerList

}

   public FileChangeListener[]
getFileChangeListeners(){
//use your javax.swing.event.EventListenerList

}

   public void fireFileChangeEvent(FileChangeEvent
evt) throws Throwable {
//get all the listeners set for FileChangeEvent
and call fileChanged(evt)
}

}



now all you would have to do is to create a class for
watching your directory which you can do different
things...either watch a directory and all sub
directoriesif you don't watch sub directories you
can simply call File.listFiles or File.list depending
on whether you want File objects or String objects. 
If you want to watch all the directories then you can
use this code I'll give you ... what the heck.
public static void enumerateFiles(Vector out,
String dir, int howDeep) throws Throwable {
enumerateFiles(out, dir, 0, howDeep);
}

/**
 *File used to recursively run over and sort a
directory hierarchy to flatten out the directory
 *structure of a file system into an array or in
this case a Vector.
 [EMAIL PROTECTED] out the Vector the enumerated file names
will be written to.  These will be sorted with each
 *   directory listing with
java.util.Arrays.sort(File[]) so see that method for
the format of the
 *   sort
 [EMAIL PROTECTED] dir the directory we want the listing for
 [EMAIL PROTECTED] deepCounter the counter for tracking how
deep we can go.  This should be 0 in normal calls
 [EMAIL PROTECTED] howDeep the number of directory levels
deep we want to return
 */
protected static 

Re: Many questions are left unanswered.

2005-12-16 Thread Wade Chandler
--- David Delbecq [EMAIL PROTECTED] wrote:

 100% mails would get don't know answer then,
 because at there is always someone who don't know.
 Commonly on mailing lists, if nobody answer, then
 nobody has knowledege and/or time to answer your
 question.
 
 Regards,
 
 Le Vendredi 16 Décembre 2005 12:48, Prathibha,
 Bharathi a écrit :
  Hi Mark,
 
  Many questions in this forum are left unanswered
 . It would be
  nice if I , atleast, get a don't know answer to
 some of my mails!
  
  Thanks  Regards,
  Prathibha.
  
 
 -- 
 David Delbecq
 Royal Meteorological Institute of Belgium
 
 -
 Pingouins dans les champs, hiver méchant

Not too mention if every single person replied to an
email here with an I don't know our traffic would grow
exponentially.  It would be a nightmare, and I would
just quit answering any of them when I even have time.
 I'm just a user who likes to help out every now and
then.  I think this is probably about 95+% of the
list.

Wade

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



RE: How to reload jsp using ant in Tomcat 5.5

2005-12-14 Thread Wade Chandler
--- Guillermo Sobrino [EMAIL PROTECTED] wrote:

 
 I am using no context.xml so I do not set any
 parameter, including antiResourceLocking.
 
 Thanks anyway.
 
Guillermo
 
 
 
  -Mensaje original-
  De: Jan Behrens [mailto:[EMAIL PROTECTED] 
  Enviado el: lunes, 12 de diciembre de 2005 18:29
  Para: Tomcat Users List
  Asunto: RE: How to reload jsp using ant in Tomcat
 5.5
  
  
  Just a gues, but maybe you have
 antiResourceLocking turned 
  on? see -- 
 

http://issues.apache.org/bugzilla/show_bug.cgi?id=37668
  
  Jan
  
  Guillermo Sobrino [EMAIL PROTECTED] schrieb
 am 
  12.12.2005 18:09:28:
  
   
   Hello again,
   
   trying to find a solution to my problem I have
 discovered that in
   past Tomcat versions
   I had just to copy my new jsp pages in the
 installation directory to
   get them updated
   in Tomcat. There was no need to use target
 reload.
   
   So maybe I am forgetting any configuration
 parameter in Tomcat 5.5
   wich set that
   automatic jsp-reloading.
   
   Anyone could help, please?
   
   
  Guillermo
   
   
   
-Mensaje original-
De: Guillermo Sobrino
 [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 01 de diciembre de 2005
 17:11
Para: users@tomcat.apache.org
Asunto: How to reload jsp using ant in Tomcat
 5.5



Hello,

I'm using Tomcat 5.5 on wich I deploy a web
 application with
ant using:



target name=install depends=compile
 description=Install
web application

deploy url=${manager.url}
 username=${manager.username}
password=${manager.password}

path=${app.path}
   

localwar=file://${install.home}/${component.name}-${component
.version}/

/target



where
 install.home/component.name-component.version is a
local directory wich 

contains a typical structure with JSP's and a
 WEB-INF

directory wich includes lib and classes
 directories.

I get to deploy the application right, but
 when I update 
  any jsp in

my
 install.home/component.name-component.version local
 directory

I can not get Tomcat to update that file.

I've tried to use the ant reload target as
 follows:



target name=reload depends=compile
 description=Reload
web application 

reload path=${app.path}
 url=${manager.url}
username=${manager.username}
 password=${manager.password}/

/target



but it doesn't work for jsp pages.

Anyone could help me, please?

Thanks in advantage.



   Guillermo





   
   
   
   
 

-
   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]
 
 


You probably don't have the JSP's recompiling.  See
the documentation at:
http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html

See the configuration section.  Note the defaults and
attributes/parameters affecting compilation.  If you
are on a hosted web server you should be able to make
your own web.xml jasper configuration on a per web-app
basis since it's done in the global web.xml, a TC
developer can help more here.

Wade

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



Re: starting and stopping Tomcat from Java code

2005-12-14 Thread Wade Chandler
--- Bill Barker [EMAIL PROTECTED] wrote:

 Urm, something like:
tomcat.stop();
 
 where 'tomcat' is your Embedded instance?
 
 Oleg Lebedev [EMAIL PROTECTED] wrote in
 message 

news:[EMAIL PROTECTED]
 Hello,
 
 I am trying to configure, start and then shutdown
 Tomcat from my Java
 class. I am planning to have all the jars required
 by Tomcat on the
 classpath and I would like to be able to specify the
 port number and
 host using method calls. I would prefer not to ship
 Tomcat configuration
 files, such as server.xml with my application and be
 able to configure
 Tomcat from code before starting it.
 
 I tried using Boostrap class, but it requires
 catalina.home and
 catalina.base, which I would like to avoid using.
 I tried using Embed class and it worked, but I still
 had to set
 catalina.home so that it can find tomcat-users.xml.
 But, this is
 acceptable.
 
 I have not been able to shut Tomcat down from my
 Java code. Note that I
 won't have a handle to the Catalina instance
 started, because Tomcat
 needs to be started before my application starts in
 a separate VM, and
 then killed when my application exists.
 
 I would appreciate any feedback on how to do this or
 what Tomcat classes
 I should take a look at.
 
 Thanks.
 
 Oleg
 
 
 
 
 

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

I guess if you know how to do this when you do have an
instance in the same VM then you can simply use the
web application you are using in the backend.  I
assume you are connecting to this server from clients
or something.  In the code creating the instance store
the Object in a static variable in a package you
install in the extensions directory of the executing
vm or the trusted libraries for the tomcat instance. 
This way they are available to all classes in the
Tomcat instance.  Then you can shut it down from your
other application by accessing a servlet or soemthing.
 You might have to play around with the security
access for the methods though...not sure.  Anyways,
basically you just make a simple class so you can
install it like that.  It won't be something you
change much and it's sole purpose is so it's part of
your class package and system.  It could be as simple
as a single class with nothing but a static instance
of the Tomcat server so you can access it.

Just a simple idea, but should work unless you can
simply edit the security file to allow your web app
code to access the internal tomcat engine it's running
in.  Which you should be able to do that as well.

Wade

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



Re: heap size problems (speed) [2]

2005-11-28 Thread Wade Chandler
--- Cristian [EMAIL PROTECTED] wrote:

 
 - Original Message - 
 From: Duan, Nick [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Monday, November 28, 2005 7:30 PM
 Subject: RE: heap size problems (speed) [2]
 
 
  Were you using the right JVM?  There were two JDK
 download for LINUX
 on
  Sun's web site.
 
 I have downloaded : J2SE(TM) Development Kit 5.0
 Update 5
 Linux self extracting file (although I think I
 should have get the rpm).
 
 I've extrated it in a separate directory and set
 JAVA_HOME in tomcat to
 point to that dir.
 
 Does it make any difference other than the fact that
 this way it is not
 rpm compliant?
 
  The main problem may be your AMD Duron processor
 which has a very
 small
  cache size (I believe it's about 512K).  Once the
 processor cache
  reaches its limit, increasing the JVM heap size
 won't be very
 effective.
 
 This is even worse for my AMD Duron
 cache size  : 64 KB
 
 but on the other machine I have :
 cache size  : 1024 KB
 and still get the same results.
 
 Cristian
 
 
 

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

I don't think your CPU L caches are going to influence
the issues you are seeing...not noticeably..not with
todays hardware.  Cristian is resizing the java heap
to allow it to get larger than it was able before
(default or the Tomcat default setting).  In this case
heap being the amount of memory the java process is
going to be able to use for the process aside from the
static space which can not be controlled by the heap
setting being used.  

How much memory does your computer physically have
Cristian?  Are you also using -Xms512m?  I'll wait to
here about your memory first before making other
comments on that.  

The next thing I'm going to ask deals with another
issue we had on the list.  Do you also write to the
HashMap from your application?  Are you reading and
writing to this cache or your application loads this
cached data at start up and it is merely read from
that point on?  If you are writing to this data you
need to be sure to synchronize the HashMap because if
you don't you can get into some serious problems with
concurrency issues and HashMap resizing (synchronize
reads and writes).  If you load all of the data up
then only read from the application then synchronizing
the reads to the hash map won't matter (unless you
allow reading while the loading is occuring).  

The next question would be: Even if only reading and
you are are currently synchronizing the calls to this
cached data are the operations long?  If the
operations to a synchronized resource are very long
then other threads (requests in this case) will be
delayed while trying to access the HashMap.

Wade

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



Re: heap size problems (speed) [2]

2005-11-28 Thread Wade Chandler
--- Cristian [EMAIL PROTECTED] wrote:
  I don't think your CPU L caches are going to
 influence
  the issues you are seeing...not noticeably..not
 with
  todays hardware.  Cristian is resizing the java
 heap
  to allow it to get larger than it was able before
  (default or the Tomcat default setting).  In this
 case
  heap being the amount of memory the java process
 is
  going to be able to use for the process aside from
 the
  static space which can not be controlled by the
 heap
  setting being used.
 
  How much memory does your computer physically have
  Cristian?  Are you also using -Xms512m?  I'll wait
 to
  here about your memory first before making other
  comments on that.
 
 
 1G of RAM and I do not set -Xms512m
 swap space is hit ocasionaly but not all the time.
 
  The next thing I'm going to ask deals with another
  issue we had on the list.  Do you also write to
 the
  HashMap from your application?  Are you reading
 and
  writing to this cache or your application loads
 this
  cached data at start up and it is merely read from
  that point on?  If you are writing to this data
 you
  need to be sure to synchronize the HashMap because
 if
  you don't you can get into some serious problems
 with
  concurrency issues and HashMap resizing
 (synchronize
  reads and writes).  If you load all of the data up
  then only read from the application then
 synchronizing
  the reads to the hash map won't matter (unless you
  allow reading while the loading is occuring).
 
 The application only caches data at startup and
 after that it performs
 only read operations regarding this cache.
 
  The next question would be: Even if only reading
 and
  you are are currently synchronizing the calls to
 this
  cached data are the operations long?  If the
  operations to a synchronized resource are very
 long
  then other threads (requests in this case) will be
  delayed while trying to access the HashMap.
 
 I'm told that the accesses are not long ones ...
 The designer of this
 test
 just  accesses the HashMap. If it exists, OK they
 return the value.
 If not they return the name of the requested key.
 
 Please don't blame my lack of knowledge in this
 matter, this being only
 what they've told me.
 I am far away (hundreds of pages of java docs) from
 understanding the
 functionality.
 I'm only providing support on linux for tomcat
 (installation with APR
 etc).
 They wanted to test this scenario on linux because
 on windows they claim
 it worked.
 
 However I can understand advises and put them into
 practice if needed.
 Also, as I said before, I am able to read some docs
 that would
 eventually get me to the point of solving and
 understanding the problem.
 
  Wade
 
 Thanks,
 Cristian
 

I don't know really.  I've not seen issues with
HashMap in a Linux vs. Windows scenario (might check
JRE/JDK bug reports).  Since your swap isn't being hit
all the time I wouldn't say it would be that.  I don't
know really where to direct you without knowing more,
because the general issues don't seem to be the cause.
 Does the application perform badly with only a few
hits to the site?  Does the application get under
heavy load then stop working?

Wade

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



Re: AW: rueh:Problem with charsets with apache,tomcat, mysql

2005-10-13 Thread Wade Chandler
--- rueh hänä [EMAIL PROTECTED] wrote:

 Hi.
 
 I used de_DE, too, same effect.. I dont know, whats
 happening. The best
 setting until now was UTF-8, because at least the
 html-sites were displayed
 correctly. The old server uses de_DE, too, and the
 configs are set to
 iso-8859-15. Now i set this setting once again, to
 be secure. But as i
 expected, nothing changed. 
 
 
 
  Von: Marcus Franke [EMAIL PROTECTED]
  An: Tomcat Users List users@tomcat.apache.org
  Betreff: AW: rueh:Problem with charsets with
 apache,tomcat, mysql
  Datum: Thu, 13 Oct 2005 15:36:52 +0200
  
  Hi, 
  
  have the same problem with a RHEL WS4.
  
  Try using de_DE as your locale not the UTF-8
 Version
  
   -Ursprüngliche Nachricht-
   Von: rueh hänä [mailto:[EMAIL PROTECTED]
   Gesendet: Donnerstag, 13. Oktober 2005 15:32
   An: tomcat-user@jakarta.apache.org
   Betreff: rueh:Problem with charsets with
 apache,tomcat, mysql
   
   HI folks
   
   Soon i get desperate.
   
   I have a FC4 webserver, that runs apache 2.0.54
 and tomcat 5.5, mysql
  4.1.
   This server will be the replacement of our old
 FC2 webserver, that runs
   apache 2.0.48 and tomcat 5.0.18, mysql 3.23.
   
   What ive done: I took the old config from the
 FC2 server and adapted it
   for
   the new server. I also took the websites (jsp
 and html) on it.
   My problem ist, that special characters as äöü
 (im swiss) couldnt be
   displayed. Instead of them i get some unreadable
 cryptics. But i think,
   the
   charset settings are overall correct.
   
   If i configure the default charset in httpd.conf
 to UTF-8, i can read
   normal
   html-sites, that include special characters..
 withouth any problems..But
   only html-sites.. But if i use ISO-8859-1, even
 html-sites are displayed
   cryptic.
   
   The system language is set to de_DE.UTF-8, as in
 httpd.conf and
   tomcat5.conf
   (LANG=de_DE.UTF-8), but i also tried it with the
 ISO-8859-1 charset. I
   also
   tried other charsets and different variations of
 them.. always with the
   same
   result. The best setting until now was UTF-8.
 But this only works for
   only-html sites. The special characters still
 arent displayed correct on
   jsp-sites alternatively mysql database entries.
   
   Now im on this problem since about 10 hours.
 Nothing helped yet, no
   similar
   problem/solution descriptions helped. Nothing in
 google is appropriate
  to
   my
   problem.
   
   Is there anything, that i forgot, didnt
 understand, made wrong?
   
   I think, either the problem is one little thing,
 or more than one thing,
   that i have to change. I hope, its the second
 one.
   
   I really hope, you can give me am advice
   
   --
   Highspeed-Freiheit. Bei GMX supergünstig, z.B.
 GMX DSL_Cityflat,
   DSL-Flatrate für nur 4,99 Euro/Monat* 
 http://www.gmx.net/de/go/dsl
   
  

-
   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]
  
 
 -- 
 NEU: Telefon-Flatrate fürs dt. Festnetz! GMX
 Phone_Flat: 9,99 Euro/Mon.*
 Für DSL-Nutzer. Ohne Providerwechsel!
 http://www.gmx.net/de/go/telefonie
 

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

Are static characters on your html pages displayed
correctly?  I had issues with the mysql driver where I
set to set the encoding on the driver itself as part
of the connection url.  You may need to do this if you
aren't already.  What I found was the data in the
database would get inserted wrong if I did not have
the correct encoding set on the driver, so I had to
correct my database connection encoding and the data
in the database as well.

Wade

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