Re: Image Scaling Code

2006-01-12 Thread Ben Kim

Sorry, a correction to my post. I checked my server and found that Xvfb is
actually running on display 1.0. These are the processes.

Xvfb :1

bash -c export DISPLAY=:1.0; . /opt//tomcat.sh 

I'll have to dig up for the details of tweaking, but googling of "tomcat
xvfb" turned up a few like this.

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg159956.html


Regards,

Ben Kim
Developer
http://benix.tamu.edu

-- Forwarded message --
Date: Fri, 13 Jan 2006 00:53:34 -0600 (CST)
From: Ben Kim <[EMAIL PROTECTED]>
To: Tomcat Users List 
Subject: Re: Image Scaling Code


This may or may not be the case with you.

I had a similar error (X11, DISPLAY) with an earlier version of tomcat
included in a 3rd party package, on linux. 

After I installed Xvfb (x virtual frame buffer) server rpm, the error went
away. (http://www.xfree86.org/4.0.1/Xvfb.1.html) I think there was a clue
in the error log.

If you're on Fedora, you can just do yum install xorg-x11-Xvfb or do
yum search Xvfb. I don't think I had to "run" it actually. 

Don't know if it will help you, but just in case. 


Regards,

Ben Kim
Developer
http://benix.tamu.edu

On 1/12/06, Justin Jaynes <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I've written a java class to scale jpeg images.  But I can't seem to get
> it to work.  Can anyone point me in the right direction?
>
> Here is my code:
>
>
> package com.everybuddystree;
>
> import java.awt.*;
> import java.awt.image.*;
> import java.io.*;
> import javax.imageio.*;
>
> public class ImageScaler {
>
> public ImageScaler() {
> }
>
> public boolean scaleImageByWidth(String fileName, int newWidth) {
>
>   File originalImage = new File(fileName);
>   try {
>BufferedImage workingBufferedImage = ImageIO.read(originalImage);
>int width = workingBufferedImage.getWidth();
>int height = workingBufferedImage.getHeight();
>Image workingImage = workingBufferedImage;
>workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
>BufferedImage finalImage = (BufferedImage)workingImage;
>ImageIO.write(finalImage, "jpg", originalImage);
>
>return true;
>
>   } catch (IOException ex){
>
>return false;
>
>   }
>
> }
>
> }
>
> When I run the pass an image to the class using a jsp I get the
> following errors from Tomcat:
>
>
> HTTP Status 500 -
> -
> type Exception report
> message
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
> exception
> javax.servlet.ServletException: Can't connect to X11 window server using
> ':0.0' as the value of the DISPLAY variable.
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(
> PageContextImpl.java:848)
> org.apache.jasper.runtime.PageContextImpl.handlePageException(
> PageContextImpl.java:781)  org.apache.jsp.image_jsp._jspService(
> org.apache.jsp.image_jsp:158)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :322)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> :314)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause
> java.lang.InternalError: Can't connect to X11 window server using ':0.0'
> as the value of the DISPLAY variable.
> sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java
> :53)  sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java
> :142)  java.security.AccessController.doPrivileged(Native Method)
> sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
> java.lang.Class.forName0(Native Method)  java.lang.Class.forName(
> Class.java:164)  java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
> GraphicsEnvironment.java:68)  sun.awt.X11.XToolkit.(XToolkit.java
> :96)  java.lang.Class.forName0(Native Method)  java.lang.Class.forName(
> Class.java:164)  java.awt.Toolkit$2.run(Toolkit.java:821)
> java.security.AccessController.doPrivileged(Native Method)
> java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
> java.awt.Image.getScaledInstance(Image.java:158)
> com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21)
> org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :322)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> :314)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full
> stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
>
> --

Re: java.lang.VerifyError Wrong return type in function

2006-01-12 Thread Ole Chr Langfjæran




Found the problem/solution. The error occurs because Tomcat uses java
5.0 while the servlet has been compiled with java 1.4. Compiling the
servlet with 5.0 resulted in a much nicer log!

Ole Chr Langfjæran wrote:
My
servlet seems seemingly to work just fine, but running through the log
I've found a whole bunch of FATAL errors. They also seem to have risen
without me envoking the servlet and the classes involved are nothing
but apache. What could it be?
  
Errorlog:
  
  
java.lang.VerifyError: (class:
org/apache/jasper/runtime/PageContextImpl, method:
getExpressionEvaluator signature:
()Ljavax/servlet/jsp/el/ExpressionEvaluator;) Wrong return type in
function
  
    at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:99)
  
    at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:61)
  
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:32)
  
    at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
  
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
  
    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
  
    at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  
    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable
  
  
  
-
  
To unsubscribe, e-mail: [EMAIL PROTECTED]
  
For additional commands, e-mail: [EMAIL PROTECTED]
  
  



-- 





  

  
  Ole Christian Langfjæran
Systemutvikler
  
Seilmakergt. 3, 7725 Steinkjer
  [EMAIL PROTECTED]
  
Tlf.: +47 41 22 36 31
Faks: +47 74 16 25 19 
  


  
  www.advicom.no
  

  






Re: Image Scaling Code

2006-01-12 Thread Ben Kim

This may or may not be the case with you.

I had a similar error (X11, DISPLAY) with an earlier version of tomcat
included in a 3rd party package, on linux. 

After I installed Xvfb (x virtual frame buffer) server rpm, the error went
away. (http://www.xfree86.org/4.0.1/Xvfb.1.html) I think there was a clue
in the error log.

If you're on Fedora, you can just do yum install xorg-x11-Xvfb or do
yum search Xvfb. I don't think I had to "run" it actually. 

Don't know if it will help you, but just in case. 


Regards,

Ben Kim
Developer
http://benix.tamu.edu

On 1/12/06, Justin Jaynes <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I've written a java class to scale jpeg images.  But I can't seem to get
> it to work.  Can anyone point me in the right direction?
>
> Here is my code:
>
>
> package com.everybuddystree;
>
> import java.awt.*;
> import java.awt.image.*;
> import java.io.*;
> import javax.imageio.*;
>
> public class ImageScaler {
>
> public ImageScaler() {
> }
>
> public boolean scaleImageByWidth(String fileName, int newWidth) {
>
>   File originalImage = new File(fileName);
>   try {
>BufferedImage workingBufferedImage = ImageIO.read(originalImage);
>int width = workingBufferedImage.getWidth();
>int height = workingBufferedImage.getHeight();
>Image workingImage = workingBufferedImage;
>workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
>BufferedImage finalImage = (BufferedImage)workingImage;
>ImageIO.write(finalImage, "jpg", originalImage);
>
>return true;
>
>   } catch (IOException ex){
>
>return false;
>
>   }
>
> }
>
> }
>
> When I run the pass an image to the class using a jsp I get the
> following errors from Tomcat:
>
>
> HTTP Status 500 -
> -
> type Exception report
> message
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
> exception
> javax.servlet.ServletException: Can't connect to X11 window server using
> ':0.0' as the value of the DISPLAY variable.
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(
> PageContextImpl.java:848)
> org.apache.jasper.runtime.PageContextImpl.handlePageException(
> PageContextImpl.java:781)  org.apache.jsp.image_jsp._jspService(
> org.apache.jsp.image_jsp:158)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :322)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> :314)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause
> java.lang.InternalError: Can't connect to X11 window server using ':0.0'
> as the value of the DISPLAY variable.
> sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java
> :53)  sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java
> :142)  java.security.AccessController.doPrivileged(Native Method)
> sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
> java.lang.Class.forName0(Native Method)  java.lang.Class.forName(
> Class.java:164)  java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
> GraphicsEnvironment.java:68)  sun.awt.X11.XToolkit.(XToolkit.java
> :96)  java.lang.Class.forName0(Native Method)  java.lang.Class.forName(
> Class.java:164)  java.awt.Toolkit$2.run(Toolkit.java:821)
> java.security.AccessController.doPrivileged(Native Method)
> java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
> java.awt.Image.getScaledInstance(Image.java:158)
> com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21)
> org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :322)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> :314)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full
> stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
>
> -
> Apache Tomcat/5.5.12
>
>
>
>
>
>
> -
> Yahoo! Photos � Showcase holiday pictures in hardcover
> Photo Books. You design it and we'll bind it!
>



--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~


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



Where are input output files located?

2006-01-12 Thread Per Arve

Newbie running Tomcat 5.0.28 on OSX.

Hi, I am starting tomcat by running a script that runs the  
catalina.sh script. I have experienced that files that my jsp-app  
produces end up at different places depending on how tomcat is  
started. Possibly I could understand this if I knew a little about  
unix-commandfiles, but right now I'm lost. Running as a demon should  
be more robust, but I worry about where the files might end up then.  
Can I use the recipee for unix system on osx, ie.


cd $CATALINA_HOME
./bin/jsvc -Djava.endorsed.dirs=./common/endorsed -cp ./bin/ 
bootstrap.jar \

-outfile ./logs/catalina.out -errfile ./logs/catalina.err \
org.apache.catalina.startup.Bootstrap

to start tomcat as demon?

regards, Per


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



Re: PreparedStatement w/ Connection Pooling

2006-01-12 Thread Khawaja Shams
I am guessing the main attribute to change is the following:
  poolPreparedStatements="true"

Suppose that this is set to true, how do I access these pooled statement? My
setup is exactly as you described, so this modification seems minor, but I
would appreciate guidance on how to get a hold of these pooled prepared
statement.  Thanks for your help.

Sincerely,
Khawaja Shams

On 1/12/06, Marc Richards <[EMAIL PROTECTED]> wrote:
>
> If you're already using pooling then I imagine you
> already have a resource defined for the pool in either
> server.xml or in the context xml file.  To pool
> prepared statements, which is desireable, you should
> configure it to look something like this in Tomcat
> 5.5:
>
>
>  type="javax.sql.DataSource"
> auth="container"
> name="jdbc/cPool"
> username="user"
> password="pwd"
>
> driverClassName="com.ibm.as400.access.AS400JDBCDriver"
> url="jdbc:as400://serverName;extended
> dynamic=true;package
> library=pkgLib;package=pkgName;package
> add=true;package cache=true"
> initialSize="5"
> removeAbandoned="true"
> removeAbandonedTimeout="600"
> maxActive="0"
> maxIdle="10"
> minIdle="2"
> maxWait="10"
> poolPreparedStatements="true"
> logAbandoned="false"
> />
>
> Note that in this example I'm using an IBM iSeries DB2
> database driver, not my sql, but the rest of the
> config should be close to the same with the exception
> that on a production machine you'll want to have your
> initialSize, maxIdle and minIdle set much higher
> depending on the number of concurrent connections that
> you expect to make.
> Also note the url parameter - DB2's jdbc driver and
> database support dynamic package support with prepared
> statements, which can sometimes offer huge sql
> performance gains due to the system's ability to offer
> better optimization for prepared statements and cache
> the optimization so that the SQL optimizer need not be
> initialized for every subsequent statement.  I don't
> know if my sql supports this or not, but you would
> definitely want to look into it.
> Lastly, note that this configuration is only
> applicable to Tomcat 5.5 and possibly later versions.
> Tomcat 5.0 and previous require a different syntax,
> using a more structured xml format, which can be
> reviewed here:
>
> http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
> The best possible database configuration is as
> described above - using connection pooling with
> prepared statements and SQL package support - in cases
> where stored procedures are more difficult to manage.
> Stored procedures work great when you have several
> queries that are required to run in sequence (and
> usually offer better performance in such cases), but
> may end up a tad overkill from a maintenance
> perspective when you have a few isolated queries here
> and there.
>
> -marc
>
>
>
>
> --- George Sexton <[EMAIL PROTECTED]> wrote:
>
> > Generally speaking, if you were using most SQL
> > databases the approach would
> > be to use a stored procedure. The stored procedure
> > compilation saves the
> > various query plans as part of the data of the
> > stored procedure. I doubt
> > MySQL does it, but you could ask on their
> > development list.
> >
> > George Sexton
> > MH Software, Inc.
> > http://www.mhsoftware.com/
> > Voice: 303 438 9585
> >
> >
> > > -Original Message-
> > > From: Khawaja Shams [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, January 12, 2006 2:19 PM
> > > To: Tomcat Users List
> > > Subject: PreparedStatement w/ Connection Pooling
> > >
> > > Hello all,
> > > I am working on a web application that will
> > manage
> > > assignments/students/classes for the teachers at a
> > school.
> > > Most of my pages
> > > in the application need to access our mysql
> > database very
> > > frequently.  For
> > > this and for other security reason, I would like
> > to use
> > > preparedStatements.
> > > However, from what I understand, preparedStatement
> > are
> > > prepared on top of a
> > > connection.  If I am using connection pooling,
> > this seems to
> > > be useless for
> > > performance as I would be preparing a statement
> > each time I get a
> > > connection.  Is there any way to get around this?
> > Is there
> > > such thing as a
> > > preparedStatement pool? Would you recommend
> > implementing this
> > > on my own?
> > > Thanks for your time and help.
> > >
> > >
> > > Best Regards,
> > > Khawaja Shams
> > >
> >
> >
> >
> -
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> -
> T

Question reg. setting the environment variable

2006-01-12 Thread gupta vidhi
hello,
   
  i'd installed jdk-1_5_0_02-windows-i586-p-iftw and jakarta-tomcat-4.1.31 on 
desktop.but unable to set its required path.i request u to kindly help me out 
for the same and starting my Tomcat.
   
  Regards,
  Vidhi


-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.

Re: Image Scaling Code

2006-01-12 Thread Dakota Jack
You need to set a java command option so that your code won't search for a
display.  Apparently you are using this with a server that has no monitor?
I forget the option but look them up under the java command and it will be
obviously.  It ends in "less" as I recall.

On 1/12/06, Justin Jaynes <[EMAIL PROTECTED]> wrote:
>
> Hello all,
>
> I've written a java class to scale jpeg images.  But I can't seem to get
> it to work.  Can anyone point me in the right direction?
>
> Here is my code:
>
>
> package com.everybuddystree;
>
> import java.awt.*;
> import java.awt.image.*;
> import java.io.*;
> import javax.imageio.*;
>
> public class ImageScaler {
>
> public ImageScaler() {
> }
>
> public boolean scaleImageByWidth(String fileName, int newWidth) {
>
>   File originalImage = new File(fileName);
>   try {
>BufferedImage workingBufferedImage = ImageIO.read(originalImage);
>int width = workingBufferedImage.getWidth();
>int height = workingBufferedImage.getHeight();
>Image workingImage = workingBufferedImage;
>workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
>BufferedImage finalImage = (BufferedImage)workingImage;
>ImageIO.write(finalImage, "jpg", originalImage);
>
>return true;
>
>   } catch (IOException ex){
>
>return false;
>
>   }
>
> }
>
> }
>
> When I run the pass an image to the class using a jsp I get the
> following errors from Tomcat:
>
>
> HTTP Status 500 -
> -
> type Exception report
> message
> description The server encountered an internal error () that prevented it
> from fulfilling this request.
> exception
> javax.servlet.ServletException: Can't connect to X11 window server using
> ':0.0' as the value of the DISPLAY variable.
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(
> PageContextImpl.java:848)
> org.apache.jasper.runtime.PageContextImpl.handlePageException(
> PageContextImpl.java:781)  org.apache.jsp.image_jsp._jspService(
> org.apache.jsp.image_jsp:158)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :322)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> :314)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause
> java.lang.InternalError: Can't connect to X11 window server using ':0.0'
> as the value of the DISPLAY variable.
> sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java
> :53)  sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java
> :142)  java.security.AccessController.doPrivileged(Native Method)
> sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
> java.lang.Class.forName0(Native Method)  java.lang.Class.forName(
> Class.java:164)  java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
> GraphicsEnvironment.java:68)  sun.awt.X11.XToolkit.(XToolkit.java
> :96)  java.lang.Class.forName0(Native Method)  java.lang.Class.forName(
> Class.java:164)  java.awt.Toolkit$2.run(Toolkit.java:821)
> java.security.AccessController.doPrivileged(Native Method)
> java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
> java.awt.Image.getScaledInstance(Image.java:158)
> com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21)
> org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114)
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
> :322)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
> :314)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full
> stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
>
> -
> Apache Tomcat/5.5.12
>
>
>
>
>
>
> -
> Yahoo! Photos – Showcase holiday pictures in hardcover
> Photo Books. You design it and we'll bind it!
>



--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~


Re: rebuild-jar-repository error

2006-01-12 Thread Ghislain Bob Hachey
Bob,

I did the same and it worked perfectly right away.  Now I'm having
problem with OpenReports and JasperReports but that's a different story.
Good luck to you.

Cheers,

Ghislain 

On Thu, 2006-01-12 at 22:11 -0600, Bob Hartung wrote:
> Ghislain,
>I downloaded the sun tarball, the tomcat5 tarball and had both 
> installed in less than 5 minutes.  Tomcat5 tested fine with $JAVA_HOME 
> defined in /etc/profile.
>   I was the able to install the MIRC storage service in an additional 5 
> minutes.
> 
>   Now, I may have upgrade problems but after days of fruitless attemtps 
> at making this work with the rpms from jpackage and home build rpms 
> following expert advice, I am just glad to see that the case repository 
> service actually works and I can start to learn it.  As this is a test 
> setup, i will continue try and get it going on a different machine with 
> rpms but at a much slower pace.
> 
> Bob
> 
> Ghislain Bob Hachey wrote:
> > I'm having the exact same problems.  I also reinstalled FC4, jdk 1.5.05
> > and tomcat 5...still same problem.  I'm tired of this so I'm gonna try
> > NOT using the rpms.  Good luck.
> > 
> > Bob
> > 
> > On Thu, 2006-01-12 at 21:22 -0600, Bob Hartung wrote:
> > 
> >>I have installed tomcat5, with java 1.5.0.0.
> >>
> >>Now trying to start tomcat5 I get this in the output followed by an [OK]
> >>
> >>   /usr/bin/rebuild-jar-repository error "all detected jars were not 
> >>found for this jvm.
> >>
> >>I am not sure what to read at this point.
> >>
> >>TNX
> >>
> >>Bob
> >>
> >>-
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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



Re: Image Scaling Code

2006-01-12 Thread Justin Jaynes
Thanks Everyone,
 
 Your many responses were correct.  I'm on my way.  Closer anyway, I get a 
different error now, but I think I can track it down.  I'll let you know if I 
need any more help.
 
 Justin Jaynes

Wendy Smoak <[EMAIL PROTECTED]> wrote: On 1/12/06, Justin Jaynes  wrote:

> I've written a java class to scale jpeg images. But I can't seem to get it to 
> work. Can anyone point me in the right direction?

>  javax.servlet.ServletException: Can't connect to X11 window server using 
> ':0.0' as the value of the DISPLAY variable.

This looks like a variation of the 'headless' problem.  (Are you
running X11 on the server?)

Try running Tomcat with:
   CATALINA_OPTS="-Djava.awt.headless=true"

--
Wendy

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





-
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!

Re: rebuild-jar-repository error

2006-01-12 Thread Bob Hartung

Ghislain,
  I downloaded the sun tarball, the tomcat5 tarball and had both 
installed in less than 5 minutes.  Tomcat5 tested fine with $JAVA_HOME 
defined in /etc/profile.
 I was the able to install the MIRC storage service in an additional 5 
minutes.


 Now, I may have upgrade problems but after days of fruitless attemtps 
at making this work with the rpms from jpackage and home build rpms 
following expert advice, I am just glad to see that the case repository 
service actually works and I can start to learn it.  As this is a test 
setup, i will continue try and get it going on a different machine with 
rpms but at a much slower pace.


Bob

Ghislain Bob Hachey wrote:

I'm having the exact same problems.  I also reinstalled FC4, jdk 1.5.05
and tomcat 5...still same problem.  I'm tired of this so I'm gonna try
NOT using the rpms.  Good luck.

Bob

On Thu, 2006-01-12 at 21:22 -0600, Bob Hartung wrote:


I have installed tomcat5, with java 1.5.0.0.

Now trying to start tomcat5 I get this in the output followed by an [OK]

  /usr/bin/rebuild-jar-repository error "all detected jars were not 
found for this jvm.


I am not sure what to read at this point.

TNX

Bob

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



RE: PreparedStatement w/ Connection Pooling

2006-01-12 Thread George Sexton
I would try testing it. I did some informal testing with SQL server and
found that it was MUCH less useful than everyone thought.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Khawaja Shams [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 12, 2006 2:19 PM
> To: Tomcat Users List
> Subject: PreparedStatement w/ Connection Pooling
> 
> Hello all,
> I am working on a web application that will manage
> assignments/students/classes for the teachers at a school.  
> Most of my pages
> in the application need to access our mysql database very 
> frequently.  For
> this and for other security reason, I would like to use 
> preparedStatements.
> However, from what I understand, preparedStatement are 
> prepared on top of a
> connection.  If I am using connection pooling, this seems to 
> be useless for
> performance as I would be preparing a statement each time I get a
> connection.  Is there any way to get around this? Is there 
> such thing as a
> preparedStatement pool? Would you recommend implementing this 
> on my own?
> Thanks for your time and help.
> 
> 
> Best Regards,
> Khawaja Shams
> 


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



Re: rebuild-jar-repository error

2006-01-12 Thread Ghislain Bob Hachey
I'm having the exact same problems.  I also reinstalled FC4, jdk 1.5.05
and tomcat 5...still same problem.  I'm tired of this so I'm gonna try
NOT using the rpms.  Good luck.

Bob

On Thu, 2006-01-12 at 21:22 -0600, Bob Hartung wrote:
> I have installed tomcat5, with java 1.5.0.0.
> 
> Now trying to start tomcat5 I get this in the output followed by an [OK]
> 
>/usr/bin/rebuild-jar-repository error "all detected jars were not 
> found for this jvm.
> 
> I am not sure what to read at this point.
> 
> TNX
> 
> Bob
> 
> -
> 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]



rebuild-jar-repository error

2006-01-12 Thread Bob Hartung

I have installed tomcat5, with java 1.5.0.0.

Now trying to start tomcat5 I get this in the output followed by an [OK]

  /usr/bin/rebuild-jar-repository error "all detected jars were not 
found for this jvm.


I am not sure what to read at this point.

TNX

Bob

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



Re: Tomcat start but many errors in catalina.out

2006-01-12 Thread Bill Barker

"Wendy Smoak" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
On 1/12/06, Sven Gehr <[EMAIL PROTECTED]> wrote:

>> I use tomcat-5.0.30 on a suse10-system. When I start tomcat I get an long
>> error-output in catalina.out. Can anybody help me to fix this?
>...
>> Jan 13, 2006 12:19:30 AM org.apache.commons.digester.Digester error
>> SEVERE: Parse Error at line 1062 column 94: Element type 
>> "message-resources"
>> must be declared.
>> org.xml.sax.SAXParseException: Element type "message-resources" must be
>> declared.
>...
>> Jan 13, 2006 12:19:30 AM org.apache.commons.digester.Digester error
>> SEVERE: Parse Error at line 1064 column 17: The content of element type
>> "struts-config" must match
>> "(data-sources?,form-beans?,global-forwards?,action-mappings?)".
>> org.xml.sax.SAXParseException: The content of element type 
>> "struts-config"
>> must match 
>> "(data-sources?,form-beans?,global-forwards?,action-mappings?)".
>
>I can't tell which webapp it is, but one of the struts-config files is 
>broken.
>

It's Tomcat's admin webapp (which is struts-based).  It looks like it's 
broken in the 5.0 branch.

>It looks like someone has used the the  tag in a
>Struts 1.0 config file.  Look for a struts-config file (usually named
>struts-config.xml) that has this at the top:
>
>   "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
>   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
>
>and also has a  tag in it.  Most likely, you're
>really using a newer version of Struts, so fix the DOCTYPE and the
>error should go away. :)
>
>--
>Wendy 




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



Re: Recommended way to selectively RequestDispatch.include/forward to form based login?

2006-01-12 Thread Bill Barker

"Ken Johanson" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello,
>
> Does anyone have a suggested way to selectively, inside a simple JSP or 
> Servlet, cause the built-in Tomcat form-login to be presented?
>
> Currently, I'm doing the following:
>
> -Have protected URI inside my webapp, e.g. /login/, configured with a 
> security-constraint in web.xml. (this works okay; I can request that URI 
> and get the form and authenticate)
> -Inside a JSP (or controller servlet, etc) where an authenticated-user 
> action needs to occur and the user isn't already auth'd, I create a 
> request dispatcher and include("/login/").
>
> Is there a better way to selectively include the login-form? Perhaps a way 
> that doesn't require using a security-constraint? (reason below)
>
> The above seems like it should work; however I happen to get a 
> StringIndexOutOfBounds* (with tomcat 5.0.30), probably caused by RD not 
> being able to resolve the path of a protected URI (a guess) - so I'm 
> looking for another way..
>

No, it's actually because it's including a welcome-page.  TC 5.5.x handles 
this case fine.

> Thanks for any advise,
>
> ken
>
> * reported as http://issues.apache.org/bugzilla/show_bug.cgi?id=38233 
> against 5.0.30:
>
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> at java.lang.String.substring(String.java:1438)
> at java.lang.String.substring(String.java:1411)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:193)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:696)
> at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:585)
> at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
>  




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



Tomcat5 and supporting files

2006-01-12 Thread Bob Hartung

Hi all,
  I need direction to an information repository that will explain what 
I need to do to get java-1.5.0 and tomcat5 installed and running and 
then allow installation of MIRC software, that requires tomcat5 on 
jvm-1.5.0 for the newer version.


  I have spent nearly two weeks of off ours (read evenings and 
weekends) .  I still have a huge number of issues.  In the latest 
attempt, I have done the following:


1.  reinstalled FC4 as a clean install wiping all HD.
2.  updated FC4 with a simple yum update
3.  downloaded java-1.5.0-sun and rebuilt the rpms per Peter Horwarths 
articles.

4.  installed the java-1.5.0 rpms with yum installlocal *.rpm while in
/home/localuser/rpmbuild/RPMS/i586/...
5.  Installed tomcat5 with yum --enablerepo=jpackage* install tomcat5
6.  I was then able to go to http://localhost:8080 and get the tomcat page
7.  I then installed the MIRC software - which seemed to go okay,
but refused connections then I tried to go to http://localhost:8080.

I am not a Java programmer and am new to Tomcat.  Is there a concise 
information sheet on how to set this up with rpms, especially with yum 
or should I just shuck it and go with the tar.gz, which I have 
successfully used before but which are harder to upgrade?  I am about to 
wipe this computer and reinstall again so i have a clean starting field, 
but do not wish to invest any more time in dead-end goose chases.


Thanks

Bob

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



RE: PreparedStatement w/ Connection Pooling

2006-01-12 Thread Marc Richards
If you're already using pooling then I imagine you
already have a resource defined for the pool in either
server.xml or in the context xml file.  To pool
prepared statements, which is desireable, you should
configure it to look something like this in Tomcat
5.5:




Note that in this example I'm using an IBM iSeries DB2
database driver, not my sql, but the rest of the
config should be close to the same with the exception
that on a production machine you'll want to have your
initialSize, maxIdle and minIdle set much higher
depending on the number of concurrent connections that
you expect to make.  
Also note the url parameter - DB2's jdbc driver and
database support dynamic package support with prepared
statements, which can sometimes offer huge sql
performance gains due to the system's ability to offer
better optimization for prepared statements and cache
the optimization so that the SQL optimizer need not be
initialized for every subsequent statement.  I don't
know if my sql supports this or not, but you would
definitely want to look into it.
Lastly, note that this configuration is only
applicable to Tomcat 5.5 and possibly later versions. 
Tomcat 5.0 and previous require a different syntax,
using a more structured xml format, which can be
reviewed here: 
http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
The best possible database configuration is as
described above - using connection pooling with
prepared statements and SQL package support - in cases
where stored procedures are more difficult to manage. 
Stored procedures work great when you have several
queries that are required to run in sequence (and
usually offer better performance in such cases), but
may end up a tad overkill from a maintenance
perspective when you have a few isolated queries here
and there.

-marc




--- George Sexton <[EMAIL PROTECTED]> wrote:

> Generally speaking, if you were using most SQL
> databases the approach would
> be to use a stored procedure. The stored procedure
> compilation saves the
> various query plans as part of the data of the
> stored procedure. I doubt
> MySQL does it, but you could ask on their
> development list.
> 
> George Sexton
> MH Software, Inc.
> http://www.mhsoftware.com/
> Voice: 303 438 9585
>   
> 
> > -Original Message-
> > From: Khawaja Shams [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, January 12, 2006 2:19 PM
> > To: Tomcat Users List
> > Subject: PreparedStatement w/ Connection Pooling
> > 
> > Hello all,
> > I am working on a web application that will
> manage
> > assignments/students/classes for the teachers at a
> school.  
> > Most of my pages
> > in the application need to access our mysql
> database very 
> > frequently.  For
> > this and for other security reason, I would like
> to use 
> > preparedStatements.
> > However, from what I understand, preparedStatement
> are 
> > prepared on top of a
> > connection.  If I am using connection pooling,
> this seems to 
> > be useless for
> > performance as I would be preparing a statement
> each time I get a
> > connection.  Is there any way to get around this?
> Is there 
> > such thing as a
> > preparedStatement pool? Would you recommend
> implementing this 
> > on my own?
> > Thanks for your time and help.
> > 
> > 
> > Best Regards,
> > Khawaja Shams
> > 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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

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



Http11AprProtocol tomcat 5.5. page not loading with compression off

2006-01-12 Thread M A
Hi All,

My config ..

tomcat 5.5
jdk1.5._06
apr 1.2.2
tomcat-jni 1.1.0

server.xml
 

The problem is this, I have a jsp page with will result in about 14KB worth
of HTML..

with compression off .. this page doesnt not load, i keep getting a could
not load page .. if i create a html file representing the output of the jsp
... this is what i get when using wget ..

FOR THE HTML FILE ---
wget www.mydomain.com/foo.html
--22:32:38--  http://www.mydomain.com:80/foo.html
Connecting to www.mydomain.com:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 13,202 [text/html]
0K -> .. ..  [ 97%]
22:32:59 (641.20 B/s) - Read error at byte 12824/13202 (No such file or
directory). Retrying.

--22:32:59--  http://www.mydomain.com:80/foo.html
  (try: 2) =>
Connecting to www.mydomain.com:80... connected!
HTTP request sent, awaiting response... 206 Partial Content
Length: 13,202 (378 to go) [text/html]

0K -> ,, ,,  [100%]

22:32:59 (369.14 KB/s) - `foo.html.3' saved [13202/13202]

FOR THE JSP FILE -


C:\wget>wget www.mydomain.com/p.jsp?id=4
--22:36:28--  http://www.mydomain.com:80/p.jsp?id=4
   => [EMAIL PROTECTED]'
Connecting to www.mydomain.com:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

0K -> .. ..

22:36:48 (639.90 B/s) - Read error at byte 12798 (No such file or
directory).Ret
rying.

--22:36:48--  http://www.mydomain.com:80/p.jsp?id=4
  (try: 2) => [EMAIL PROTECTED]'
Connecting to www.mydomain.com:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

0K -> .. ..

22:37:09 (639.90 B/s) - Read error at byte 12798 (No such file or
directory).Ret
rying.

--22:37:09--  
http://www.mydomain.com:80/p.jsp?id=4
  (try: 3) => [EMAIL PROTECTED]'
Connecting to www.mydomain.com:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

0K -> .. ..

22:37:29 (639.90 B/s) - Read error at byte 12798 (No such file or
directory).Ret
rying.

--22:37:29--  
http://www.mydomain.com:80/p.jsp?id=4
  (try: 4) => [EMAIL PROTECTED]'
Connecting to www.mydomain.com:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

JSP WGET END --

For the JSP file it keeps looping ..

I have set no-cache for the jsp page and the page buffer is 32 kb ...

Any ideas on what could be going wrong .. like i said .. it works fine with
compression on ...

Cheers

Mo


Re: Tomcat start but many errors in catalina.out

2006-01-12 Thread Wendy Smoak
On 1/12/06, Sven Gehr <[EMAIL PROTECTED]> wrote:

> I use tomcat-5.0.30 on a suse10-system. When I start tomcat I get an long
> error-output in catalina.out. Can anybody help me to fix this?
...
> Jan 13, 2006 12:19:30 AM org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 1062 column 94: Element type "message-resources"
> must be declared.
> org.xml.sax.SAXParseException: Element type "message-resources" must be
> declared.
...
> Jan 13, 2006 12:19:30 AM org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 1064 column 17: The content of element type
> "struts-config" must match
> "(data-sources?,form-beans?,global-forwards?,action-mappings?)".
> org.xml.sax.SAXParseException: The content of element type "struts-config"
> must match "(data-sources?,form-beans?,global-forwards?,action-mappings?)".

I can't tell which webapp it is, but one of the struts-config files is broken.

It looks like someone has used the the  tag in a
Struts 1.0 config file.  Look for a struts-config file (usually named
struts-config.xml) that has this at the top:

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>

and also has a  tag in it.  Most likely, you're
really using a newer version of Struts, so fix the DOCTYPE and the
error should go away. :)

--
Wendy

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



Re: Tomcat start but many errors in catalina.out

2006-01-12 Thread Khawaja Shams
This may not be very helpful, but it is definitely something regarding a
missing parameter on your struts configuration. double check your
struts-config.xml for errors.

On 1/12/06, Sven Gehr <[EMAIL PROTECTED]> wrote:
>
> [EMAIL PROTECTED],
>
> I use tomcat-5.0.30 on a suse10-system. When I start tomcat I get an long
> error-output in catalina.out. Can anybody help me to fix this?
>
> Sorry for this long error-posting!
>
>
> Jan 13, 2006 12:18:54 AM org.apache.catalina.core.StandardHostDeployerinstall
> INFO: Installing web application at context path /webdav from URL
> file:/srv/www/tomcat5/base/webapps/webdav
> Jan 13, 2006 12:18:54 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Jan 13, 2006 12:18:54 AM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> Jan 13, 2006 12:18:54 AM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0
> time=0/21  config=/usr/share/tomcat5/conf/jk2.properties
> Jan 13, 2006 12:18:55 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 3422 ms
> Jan 13, 2006 12:19:24 AM org.apache.coyote.http11.Http11Protocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-8080
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /admin
> Jan 13, 2006 12:19:25 AM org.apache.catalina.logger.LoggerBase stop
> INFO: unregistering logger Catalina:type=Logger,path=/admin,host=localhost
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /webdav
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /servlets-examples
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /jsp-examples
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /balancer
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /tomcat-docs
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /umin
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /servlet
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path
> Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployerremove
> INFO: Removing web application at context path /manager
> Jan 13, 2006 12:19:25 AM org.apache.catalina.logger.LoggerBase stop
> INFO: unregistering logger Catalina:type=Logger,host=localhost
> Jan 13, 2006 12:19:25 AM org.apache.catalina.logger.LoggerBase stop
> INFO: unregistering logger Catalina:type=Logger
> Jan 13, 2006 12:19:25 AM org.apache.coyote.http11.Http11Protocol destroy
> INFO: Stopping Coyote HTTP/1.1 on http-8080
> Jan 13, 2006 12:19:28 AM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Jan 13, 2006 12:19:28 AM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1249 ms
> Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.0
> Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardHost getDeployer
> INFO: Create Host deployer for direct deployment ( non-jmx )
> Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardHostDeployerinstall
> INFO: Processing Context configuration file URL
> file:/etc/tomcat5/base/Catalina/localhost/balancer.xml
> Jan 13, 2006 12:19:29 AM org.apache.catalina.core.StandardHostDeployerinstall
> INFO: Processing Context configuration file URL
> file:/etc/tomcat5/base/Catalina/localhost/admin.xml
> Jan 13, 2006 12:19:30 AM org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 1062 column 94: Element type
> "message-resources"
> must be declared.
> org.xml.sax.SAXParseException: Element type "message-resources" must be
> declared.
> at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
> at
> org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown
> Sourc

Re: Tomcat 5.5 system requirements

2006-01-12 Thread Khawaja Shams
I believe all you should need is java 5.0 and the ability to listen on a few
ports >1024.  perhaps, admin rights to install the software if you are using
the installer.  I am sure others can give you a much more concrete list, but
this is a start.

Khawaja

On 1/12/06, David Schwartz <[EMAIL PROTECTED]> wrote:
>
> Is there a list of Tomcat 5.5 system requirements for a windows based
> install?
>
> David Schwartz
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Tomcat start but many errors in catalina.out

2006-01-12 Thread Sven Gehr
[EMAIL PROTECTED],

I use tomcat-5.0.30 on a suse10-system. When I start tomcat I get an long 
error-output in catalina.out. Can anybody help me to fix this?

Sorry for this long error-posting!


Jan 13, 2006 12:18:54 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /webdav from URL 
file:/srv/www/tomcat5/base/webapps/webdav
Jan 13, 2006 12:18:54 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 13, 2006 12:18:54 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Jan 13, 2006 12:18:54 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/21  config=/usr/share/tomcat5/conf/jk2.properties
Jan 13, 2006 12:18:55 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3422 ms
Jan 13, 2006 12:19:24 AM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /admin
Jan 13, 2006 12:19:25 AM org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger,path=/admin,host=localhost
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /webdav
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /servlets-examples
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /jsp-examples
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /balancer
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /tomcat-docs
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /umin
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /servlet
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path
Jan 13, 2006 12:19:25 AM org.apache.catalina.core.StandardHostDeployer remove
INFO: Removing web application at context path /manager
Jan 13, 2006 12:19:25 AM org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger,host=localhost
Jan 13, 2006 12:19:25 AM org.apache.catalina.logger.LoggerBase stop
INFO: unregistering logger Catalina:type=Logger
Jan 13, 2006 12:19:25 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jan 13, 2006 12:19:28 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 13, 2006 12:19:28 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1249 ms
Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0
Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Jan 13, 2006 12:19:28 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL 
file:/etc/tomcat5/base/Catalina/localhost/balancer.xml
Jan 13, 2006 12:19:29 AM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL 
file:/etc/tomcat5/base/Catalina/localhost/admin.xml
Jan 13, 2006 12:19:30 AM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 1062 column 94: Element type "message-resources" 
must be declared.
org.xml.sax.SAXParseException: Element type "message-resources" must be 
declared.
at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanD

Re: Question regarding tomcat class path handling

2006-01-12 Thread erh
On Mon, Jan 09, 2006 at 08:16:00PM +0200, Oded Arbel wrote:
> The problem is like this (the actual system is far more complex):
> - suppose two web applications, app1 and app2, both use some API (which 
> I developed myself). 
> - I don't want to develop the API twice on both web applications, so I 
> have a third project for the API  itself, which is a not a web 
> application and so isn't in WEB-INF/classes of neither app1 nor app2.
> - I don't want to build a jar for that API library to put in app1 and 
> app2's WEB-INF/lib because its also constantly being developed - if I 
> wanted to do this then after each commit, in addition to the build 
> stage I would have to copy the jar by hand to all the applications that 
> use it, which is an error prone process.

You've got to be kidding.  Copy by hand!?  Why?  Just build the jar
file to some predefined location, and have the build process for each app
copy it from there.  There's no need to copy it by hand, have ant, or whatever
you're using to build, do it for you.
That seems much simpler than playing with custom class loaders, or
startup classpath dependencies, or loose class files.
e.g. say you've got 4 different api's.  When you build those, a jar file
gets created in (e.g.) /myjars:
/myjars/api1.jar
/myjars/api2.jar
/myjars/api3.jar
/myjars/api4.jar

Let's say app1 uses api's 1, 3 and 4, so it has something like this 
somewhere in its build.xml:  (assuming you're using ant)



and app2 uses 2 and 4, so it instead has:


etc...

of course, if you don't want a global location for the api jar files,
you can always use a relative path.  This is what I do in my app.  I've
got a directory structure that looks like this:
   mycode/
  myapi/
build.xml   (builds the java files and creates myapi.jar)
build/myapi.jar
  myapp/
build.xml   (copies ../myapi/build/myapi.jar to build/WEB-INF/lib e.g.:

build/WEB-INF/lib/myapi.jar

eric

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



Re: how to change the APR protocol for may use keytool self-signed certificate

2006-01-12 Thread Dhaval Patel
Hi,

  I hope you have read my post a while ago (in which I explained about 
configuring SSL with APR in
Tomcat 5.5.12). If you haven't,
http://www.mail-archive.com/users%40tomcat.apache.org/msg02500.html

  If you read that post fully, you will understand basics of SSL with Tomcat. 
If you want to learn
more about it, just browse the mail-archive for Nov 2005 and Dec 2005 threads. 
There was a nice
discussion on SSL with APR on Tomcat 5.5.12. One update. It does not work for 
Verisign/Thwate
certificates (search the thread and you will find solution) but it does work 
for self-signed
certificate.

  Based upon my knowledge, APR does not work while using keytool. keytool is 
part of JSSE and APR
is designed to run with OpenSSL. OpenSSL is more standard in industry 
environment. (Tomcat gurus
please correct this if I am wrong).

  One more thing. If you search the mail-archives, before posting message, it 
would be good for
you. You will find solution by yourself which is nice. And many questions are 
answered in this
forum. You just need time and patience to find right thing.

Regards,
D

--- Iosev Perez Rivero <[EMAIL PROTECTED]> wrote:

> how to change the APR protocol for may use keytool self-signed certificate
> 
>  
> 
> Iósev Pérez Rivero
> 
> Estudiante 4to. Año
> 
> Universidad de las Ciencias Informáticas
> 
>  
> 
> 


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

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



Re: Question regarding tomcat class path handling

2006-01-12 Thread Sriram Narayanan
On 1/10/06, Oded Arbel <[EMAIL PROTECTED]> wrote:

> >
> > What you could do is to write your own WebAppClassLoader that'd add
> > these folders to its lookup list.
>
> Hmm. interesting. How can I let such a class loader implementation to be
> used instead of tomcat's WebAppClassLoader ?
>

The following links should help
http://tomcat.apache.org/tomcat-5.5-doc/config/loader.html
http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/loader/WebappLoader.html
http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java

-- Sriram

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



RE: PreparedStatement w/ Connection Pooling

2006-01-12 Thread George Sexton
Generally speaking, if you were using most SQL databases the approach would
be to use a stored procedure. The stored procedure compilation saves the
various query plans as part of the data of the stored procedure. I doubt
MySQL does it, but you could ask on their development list.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Khawaja Shams [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 12, 2006 2:19 PM
> To: Tomcat Users List
> Subject: PreparedStatement w/ Connection Pooling
> 
> Hello all,
> I am working on a web application that will manage
> assignments/students/classes for the teachers at a school.  
> Most of my pages
> in the application need to access our mysql database very 
> frequently.  For
> this and for other security reason, I would like to use 
> preparedStatements.
> However, from what I understand, preparedStatement are 
> prepared on top of a
> connection.  If I am using connection pooling, this seems to 
> be useless for
> performance as I would be preparing a statement each time I get a
> connection.  Is there any way to get around this? Is there 
> such thing as a
> preparedStatement pool? Would you recommend implementing this 
> on my own?
> Thanks for your time and help.
> 
> 
> Best Regards,
> Khawaja Shams
> 


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



help for error javax.servlet.ServletException

2006-01-12 Thread Qaiser Mehmood
Does anyone know why I am getting this error :
 
 
javax.servlet.ServletException: Servlet execution threw an exception
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:275)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
 
Thanks,
 
Qaiser

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



how to change the APR protocol for may use keytool self-signed certificate

2006-01-12 Thread Iosev Perez Rivero
how to change the APR protocol for may use keytool self-signed certificate

 

Iósev Pérez Rivero

Estudiante 4to. Año

Universidad de las Ciencias Informáticas

 



Tomcat 5.5 system requirements

2006-01-12 Thread David Schwartz
Is there a list of Tomcat 5.5 system requirements for a windows based install?

David Schwartz






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



concurrency of users on tomcat

2006-01-12 Thread vishwas kharajge
Hi we are running tomcat5.0 on sun V20z server
 Backed is mysql
Our requirement is to provide 200 concurrent hits per second
There are 300K users registration on the server
For this what is the requirement?
How much bandwidht it require for giving above concurrency?
How to configure the server?


PreparedStatement w/ Connection Pooling

2006-01-12 Thread Khawaja Shams
Hello all,
I am working on a web application that will manage
assignments/students/classes for the teachers at a school.  Most of my pages
in the application need to access our mysql database very frequently.  For
this and for other security reason, I would like to use preparedStatements.
However, from what I understand, preparedStatement are prepared on top of a
connection.  If I am using connection pooling, this seems to be useless for
performance as I would be preparing a statement each time I get a
connection.  Is there any way to get around this? Is there such thing as a
preparedStatement pool? Would you recommend implementing this on my own?
Thanks for your time and help.


Best Regards,
Khawaja Shams


connection pooling mysql (Pool Exhausted exception)

2006-01-12 Thread Khawaja Shams
Hello,
   I am consistently getting exceptions about my connection pool being
exhausted in my application.  I am curious where I can configure the number
of connections tomcat should maintain in the connection pool.  Lastly, am I
right in assuming that the only thing I need to do in order to return a
connection to the pool is to return to close the connection? Do I have to do
anything about the statements I have created using that connection? Thanks
in advance.  for your help.


Best Regards,
Khawaja Shams


Re: how to enable SSL protocol with tomcat 5.5.12

2006-01-12 Thread Dhaval Patel
http://www.mail-archive.com/users%40tomcat.apache.org/msg02500.html



--- Iosev Perez Rivero <[EMAIL PROTECTED]> wrote:

> I use the tomcat�s documentation about that but I have an error, I need 
> that someone explain
to
> me how to that
> 
> I�sev P�rez Rivero
> Estudiante 4to. A�o
> Universidad de las Ciencias Inform�ticas
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

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



problem with tomcat and SSL

2006-01-12 Thread Iosev Perez Rivero
Obtain configure the SSL protocol with tomcat,  BUT when I use this url: 
https://localhost:8443   in the browser, this is delay 
so much and the end no load the tomcat home page.

 

What I can do?

 

Iósev Pérez Rivero

Estudiante 4to. Año

Universidad de las Ciencias Informáticas

 



RE: session trakking in jsp or in Bean

2006-01-12 Thread Mike
The session is tracked by the servlet container, and
the JSP, bean, custom tag, and servlet all have access
to it.  So, I think thta's a decision that you don't
have to make.

Mike K.

--- marju jalloh <[EMAIL PROTECTED]> wrote:

> Thanks
>   I know all about java session.What I mean is
> implementing session in jsp or in bean which one is
> advisable
> 
> Fredrik Rubensson <[EMAIL PROTECTED]>
> wrote:   
> 
> > Marju wrote:
> >  I want to track a session of an input a user
> enter in my jsp page.The
> jsp page 
> >is using a bean to execute sql queries.That works
> wel.
> >  
> >  My question is it advisable to track the session
> in the jsp page or
> in the 
> >Bean.Which is better
> 
> I am not sure I follow you here. There is a session
> object you can get
> from the request that makes it possible tostore data
> through several
> request in the same session.
> request.getSession().setAttribute("akey",
> anObject) to set session attributes.
> request.getSession().getAttribute("akey") to get
> attributes. If you have
> users that log in and out you probably should set
> some user identifying
> info in the session and a filter to makes sure that
> the user is logged
> in for certain requests. 
> 
> Regards,
> Fredrik
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> 
>   
> -
> Yahoo! Photos
>  Ring in the New Year with Photo Calendars. Add
> photos, events, holidays, whatever.


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

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



Re: Image Scaling Code

2006-01-12 Thread Ryan McDonald
i believe adding this to your CATALINA_OPTS variable will solve this  
issue


-Djava.awt.headless=true


On 12-Jan-06, at 2:26 PM, Justin Jaynes wrote:


Hello all,

 I've written a java class to scale jpeg images.  But I can't seem to
get it to work.  Can anyone point me in the right direction?

 Here is my code:


package com.everybuddystree;

import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;

public class ImageScaler {

 public ImageScaler() {
 }

 public boolean scaleImageByWidth(String fileName, int newWidth) {

  File originalImage = new File(fileName);
  try {
   BufferedImage workingBufferedImage = ImageIO.read(originalImage);
   int width = workingBufferedImage.getWidth();
   int height = workingBufferedImage.getHeight();
   Image workingImage = workingBufferedImage;
   workingImage = (Image)workingImage.getScaledInstance 
(newWidth,-1,1);

   BufferedImage finalImage = (BufferedImage)workingImage;
   ImageIO.write(finalImage, "jpg", originalImage);

   return true;

  } catch (IOException ex){

   return false;

  }

 }

}

When I run the pass an image to the class using a jsp I get the
following errors from Tomcat:


 HTTP Status 500 -
-
 type Exception report
 message
 description The server encountered an internal error () that  
prevented

it from fulfilling this request.
 exception
 javax.servlet.ServletException: Can't connect to X11 window server
using ':0.0' as the value of the DISPLAY variable.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException 
(PageCont

extImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException 
(PageContex

tImpl.java:781)
org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:158)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service 
(JspServletWrapper.ja

va:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 
314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root  
cause

 java.lang.InternalError: Can't connect to X11 window server using
':0.0' as the value of the DISPLAY variable.
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
sun.awt.X11GraphicsEnvironment.access$000 
(X11GraphicsEnvironment.java:53
)  sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java: 
142)

java.security.AccessController.doPrivileged(Native Method)
sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java: 
131)

java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment 
(GraphicsEnviron

ment.java:68)  sun.awt.X11.XToolkit.(XToolkit.java:96)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
java.awt.Toolkit$2.run(Toolkit.java:821)
java.security.AccessController.doPrivileged(Native Method)
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
java.awt.Image.getScaledInstance(Image.java:158)
 com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java: 
21)

org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service 
(JspServletWrapper.ja

va:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java: 
314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The
full stack trace of the root cause is available in the Apache
Tomcat/5.5.12 logs.

-
 Apache Tomcat/5.5.12






-
Yahoo! Photos - Showcase holiday pictures in hardcover
 Photo Books. You design it and we'll bind it!




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



Re: Image Scaling Code

2006-01-12 Thread Tim Funk

FAQ .. http://tomcat.apache.org/faq/unix.html#x

-Tim

Justin Jaynes wrote:


Hello all,
 
 I've written a java class to scale jpeg images.  But I can't seem to get it to work.  Can anyone point me in the right direction?



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



Re: Image Scaling Code

2006-01-12 Thread Frank W. Zammetti

D'oh!  Now *THAT* rings a bell :)

Mark Hagger wrote:

You need to have:

-Djava.awt.headless=true

in your java start up args, this will prevent it from trying to talk to an X 
server.  Obviously some image related stuff has to talk to an X server, but 
just ImageIO stuff is fine.


Mark


On Thursday 12 January 2006 19:31, Frank W. Zammetti wrote:


I don't quite see how this is Tomcat-related, but...

Your code can't connect to your X server, which is necessary for many
Java graphics-related functions to work on a *nix system.  I dealt with
this at one point when getting DataVision working on Linux, and I recall
the solution being something to do with an environment variable, but the
exact answer eludes me.

Actually, it looks like you *have* defined the environment variable
(DISPLAY in the stack trace rings a bell).  Is X running?  I believe it
has to be for this to work.

Frank

Justin Jaynes wrote:


Hello all,

I've written a java class to scale jpeg images.  But I can't seem to get
it to work.  Can anyone point me in the right direction?

Here is my code:


package com.everybuddystree;

import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;

public class ImageScaler {

public ImageScaler() {
}

public boolean scaleImageByWidth(String fileName, int newWidth) {

 File originalImage = new File(fileName);
 try {
  BufferedImage workingBufferedImage = ImageIO.read(originalImage);
  int width = workingBufferedImage.getWidth();
  int height = workingBufferedImage.getHeight();
  Image workingImage = workingBufferedImage;
  workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
  BufferedImage finalImage = (BufferedImage)workingImage;
  ImageIO.write(finalImage, "jpg", originalImage);

  return true;

 } catch (IOException ex){

  return false;

 }

}

}

When I run the pass an image to the class using a jsp I get the
following errors from Tomcat:


HTTP Status 500 -
-
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request. exception
javax.servlet.ServletException: Can't connect to X11 window server using
':0.0' as the value of the DISPLAY variable. 
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageConte
xtImpl.java:848) 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContext
Impl.java:781) 
org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:158) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
a:322) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause

java.lang.InternalError: Can't connect to X11 window server using ':0.0'
as the value of the DISPLAY variable. 
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) 
sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142) 
java.security.AccessController.doPrivileged(Native Method) 
sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131) 
java.lang.Class.forName0(Native Method) 
java.lang.Class.forName(Class.java:164) 
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironm
ent.java:68)  sun.awt.X11.XToolkit.(XToolkit.java:96) 
java.lang.Class.forName0(Native Method) 
java.lang.Class.forName(Class.java:164) 
java.awt.Toolkit$2.run(Toolkit.java:821) 
java.security.AccessController.doPrivileged(Native Method) 
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804) 
java.awt.Image.getScaledInstance(Image.java:158)
com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21) 
org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114) 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
a:322) 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The

full stack trace of the root cause is available in the Apache
Tomcat/5.5.12 logs.

-
Apache Tomcat/5.5.12






-
Yahoo! Photos – Showcase holiday pictures in hardcover
Photo Books. You design it and we’ll bind it!



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






--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fz

Re: Problems Using Context Loader

2006-01-12 Thread Michel Costa
The major problem is not about putting hibernate in the context's lib folder, 
but as you may know, hibernate does some mapping stuff, which means it reads a 
bunch of .hbm.xml files into memory, connects and validate these mappings 
everytime the context gets reloaded, and depending on how much mappings you 
use, a bigger problem you have, about the loading time... It takes about 30 
seconds for each reload and a maximum of 4 reloads.

The difficult part of it is to make my custom ClassLoader access the webapp's 
classloader... because it must be placed in the server folder and because of 
this, it is not in the webapp's classloader hiearchy.
Mine implementation speed is a little slow, i am just trying to load the 
classes primarly, with no errors, and then is time to think about reloading... 
I think it would be much easier if I could monitorate these files directly from 
the WebApp's classloader, but this means modify tomcat's distribution.

This is all I have done so far:


import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.security.AccessControlException;
import java.util.Hashtable;

import org.apache.catalina.loader.WebappClassLoader;

public class DeployerClassLoader extends WebappClassLoader {
private static Hashtable classes = new Hashtable();
private String rootFolder;

public DeployerClassLoader(ClassLoader parent) {
super(parent);
init();
showTree(this, "");
}

private String showTree(ClassLoader cls, String pre) {
if (cls.getParent() != null) {
pre = showTree(cls.getParent(), pre);
}
System.out.println(pre + " - " + cls.getClass().toString());
return pre + " ";
}

private void init() {
System.out.println("!!!calling init!!!");
rootFolder = "/opt/tomcat/webapps/AppRoot/WEB-INF/classes/";
}

private byte[] findInPath(String name) {
String path = name.replaceAll("\\.", "/");
File fClass = new File(rootFolder + path + ".class");
if (fClass.exists()) {
try {
FileInputStream fStream = new 
FileInputStream(fClass);
byte[] all = new byte[(int) fClass.length()];
fStream.read(all);
return all;
} catch (FileNotFoundException e) {
return null;
} catch (IOException e) {
return null;
}
}
return null;
}

protected Class findLoadedClass0(String name) {
System.out.println("findLoaded: " + name);
if (name.startsWith("br.com.agem.sige")) {
// se encontrar chamar defineClass(String name, byte[] 
b, int off,
// int len)
if (classes.get(name) != null)
return classes.get(name);
}
return super.findLoadedClass0(name);
}

protected Class findClassInternal(String name) throws 
ClassNotFoundException {
byte[] data = findInPath(name);
if (data != null) {
synchronized (this) {
Class c = defineClass(name, data, 0, data.length);
classes.put(name, c);
return c;
}
}
throw new ClassNotFoundException(name);
}

public Class findClass(String name) throws ClassNotFoundException {

if (!started) throw new ClassNotFoundException(name);

// (1) Permission to define this class when using a SecurityManager
if (securityManager != null) {
int i = name.lastIndexOf('.');
if (i >= 0) {
try {
securityManager.checkPackageDefinition(name.substring(0,i));
} catch (Exception se) {
throw new ClassNotFoundException(name, se);
}
}
}

// Ask our superclass to locate this class, if possible
// (throws ClassNotFoundException if it is not found)
Class clazz = null;
try {
clazz = findClassInternal(name);
} catch(ClassNotFoundException cnfe) {
} catch(AccessControlException ace) {
throw new ClassNotFoundException(name, ace);
}
if (clazz == null) try {
clazz = super.findClass(name);
} catch(AccessControlException ace) {
throw new ClassNotFoundException(name, ace);
}
if (clazz == null) throw new ClassNotFoundException(name);

return clazz;
}
}

--

RE: Image Scaling Code

2006-01-12 Thread Lawrence, Gabriel
The environment variable is below:

JAVA_OPTS="-Djava.awt.headless=true"

Cheers,
-gabe


Gabriel Lawrence
ACT Data Security Manager, UC San Diego


-Original Message-
From: Justin Jaynes [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 11:39 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Image Scaling Code

I aked Yaov Shapira if Java Questions were ok for this list.  He said it
was fine because this is a USER list for Tomcat.  And java class
programming has a great deal to do with using Tomcat.

"Frank W. Zammetti" <[EMAIL PROTECTED]> wrote: I don't quite see how
this is Tomcat-related, but...

Your code can't connect to your X server, which is necessary for many 
Java graphics-related functions to work on a *nix system.  I dealt with 
this at one point when getting DataVision working on Linux, and I recall

the solution being something to do with an environment variable, but the

exact answer eludes me.

Actually, it looks like you *have* defined the environment variable 
(DISPLAY in the stack trace rings a bell).  Is X running?  I believe it 
has to be for this to work.

Frank

Justin Jaynes wrote:
> Hello all,
>  
> I've written a java class to scale jpeg images. But I can't seem to
get it to work. Can anyone point me in the right direction?
>  
>  Here is my code:
>  
>
> package com.everybuddystree;
> 
> import java.awt.*;
> import java.awt.image.*;
> import java.io.*;
> import javax.imageio.*;
> 
> public class ImageScaler {
> 
>  public ImageScaler() {
>  }
> 
>  public boolean scaleImageByWidth(String fileName, int newWidth) {
> 
>   File originalImage = new File(fileName);
>   try {
>BufferedImage workingBufferedImage = ImageIO.read(originalImage);
>int width = workingBufferedImage.getWidth();
>int height = workingBufferedImage.getHeight();
>Image workingImage = workingBufferedImage;
>workingImage =
(Image)workingImage.getScaledInstance(newWidth,-1,1);
>BufferedImage finalImage = (BufferedImage)workingImage;
>ImageIO.write(finalImage, "jpg", originalImage);
> 
>return true;
> 
>   } catch (IOException ex){
> 
>return false;
> 
>   }
> 
>  }
> 
> }
> 
> When I run the pass an image to the class using a jsp I get the 
> following errors from Tomcat:
> 
> 
>  HTTP Status 500 -  
> -
>  type Exception report
>  message 
>  description The server encountered an internal error () that
prevented it from fulfilling this request.
>  exception 
> javax.servlet.ServletException: Can't connect to X11 window server
using ':0.0' as the value of the DISPLAY variable.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont
extImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:781)
org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:158)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause 
> java.lang.InternalError: Can't connect to X11 window server using
':0.0' as the value of the DISPLAY variable.
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53
) sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)
java.security.AccessController.doPrivileged(Native Method)
sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnviron
ment.java:68) sun.awt.X11.XToolkit.(XToolkit.java:96)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
java.awt.Toolkit$2.run(Toolkit.java:821)
java.security.AccessController.doPrivileged(Native Method)
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
java.awt.Image.getScaledInstance(Image.java:158) 
> com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21)
org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The
full stack trace of the root cause is available in the Apache
Tomcat/5.5.12 logs.
>  
> -
>  Apache Tomcat/5.5.12 
> 
> 
>  
>  
> 
>   
> ---

Re: Image Scaling Code

2006-01-12 Thread Mark Hagger
You need to have:

-Djava.awt.headless=true

in your java start up args, this will prevent it from trying to talk to an X 
server.  Obviously some image related stuff has to talk to an X server, but 
just ImageIO stuff is fine.

Mark


On Thursday 12 January 2006 19:31, Frank W. Zammetti wrote:
> I don't quite see how this is Tomcat-related, but...
>
> Your code can't connect to your X server, which is necessary for many
> Java graphics-related functions to work on a *nix system.  I dealt with
> this at one point when getting DataVision working on Linux, and I recall
> the solution being something to do with an environment variable, but the
> exact answer eludes me.
>
> Actually, it looks like you *have* defined the environment variable
> (DISPLAY in the stack trace rings a bell).  Is X running?  I believe it
> has to be for this to work.
>
> Frank
>
> Justin Jaynes wrote:
> > Hello all,
> >
> >  I've written a java class to scale jpeg images.  But I can't seem to get
> > it to work.  Can anyone point me in the right direction?
> >
> >  Here is my code:
> >
> >
> > package com.everybuddystree;
> >
> > import java.awt.*;
> > import java.awt.image.*;
> > import java.io.*;
> > import javax.imageio.*;
> >
> > public class ImageScaler {
> >
> >  public ImageScaler() {
> >  }
> >
> >  public boolean scaleImageByWidth(String fileName, int newWidth) {
> >
> >   File originalImage = new File(fileName);
> >   try {
> >BufferedImage workingBufferedImage = ImageIO.read(originalImage);
> >int width = workingBufferedImage.getWidth();
> >int height = workingBufferedImage.getHeight();
> >Image workingImage = workingBufferedImage;
> >workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
> >BufferedImage finalImage = (BufferedImage)workingImage;
> >ImageIO.write(finalImage, "jpg", originalImage);
> >
> >return true;
> >
> >   } catch (IOException ex){
> >
> >return false;
> >
> >   }
> >
> >  }
> >
> > }
> >
> > When I run the pass an image to the class using a jsp I get the
> > following errors from Tomcat:
> >
> >
> >  HTTP Status 500 -
> > -
> >  type Exception report
> >  message
> >  description The server encountered an internal error () that prevented
> > it from fulfilling this request. exception
> >  javax.servlet.ServletException: Can't connect to X11 window server using
> > ':0.0' as the value of the DISPLAY variable. 
> > org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageConte
> >xtImpl.java:848) 
> > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContext
> >Impl.java:781) 
> > org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:158) 
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
> >a:322) 
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause
> > java.lang.InternalError: Can't connect to X11 window server using ':0.0'
> > as the value of the DISPLAY variable. 
> > sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) 
> > sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)
> >  sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142) 
> > java.security.AccessController.doPrivileged(Native Method) 
> > sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131) 
> > java.lang.Class.forName0(Native Method) 
> > java.lang.Class.forName(Class.java:164) 
> > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironm
> >ent.java:68)  sun.awt.X11.XToolkit.(XToolkit.java:96) 
> > java.lang.Class.forName0(Native Method) 
> > java.lang.Class.forName(Class.java:164) 
> > java.awt.Toolkit$2.run(Toolkit.java:821) 
> > java.security.AccessController.doPrivileged(Native Method) 
> > java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804) 
> > java.awt.Image.getScaledInstance(Image.java:158)
> > com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21) 
> > org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114) 
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
> >a:322) 
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The
> > full stack trace of the root cause is available in the Apache
> > Tomcat/5.5.12 logs.
> >
> > -
> >  Apache Tomcat/5.5.12
> >
> >
> >
> >
> >
> >
> > -
> > Yahoo! Photo

Re: Image Scaling Code

2006-01-12 Thread Wendy Smoak
On 1/12/06, Justin Jaynes <[EMAIL PROTECTED]> wrote:

>  I've written a java class to scale jpeg images.  But I can't seem to get it 
> to work.  Can anyone point me in the right direction?

>  javax.servlet.ServletException: Can't connect to X11 window server using 
> ':0.0' as the value of the DISPLAY variable.

This looks like a variation of the 'headless' problem.  (Are you
running X11 on the server?)

Try running Tomcat with:
   CATALINA_OPTS="-Djava.awt.headless=true"

--
Wendy

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



Re: Image Scaling Code

2006-01-12 Thread Justin Jaynes
I aked Yaov Shapira if Java Questions were ok for this list.  He said it was 
fine because this is a USER list for Tomcat.  And java class programming has a 
great deal to do with using Tomcat.

"Frank W. Zammetti" <[EMAIL PROTECTED]> wrote: I don't quite see how this is 
Tomcat-related, but...

Your code can't connect to your X server, which is necessary for many 
Java graphics-related functions to work on a *nix system.  I dealt with 
this at one point when getting DataVision working on Linux, and I recall 
the solution being something to do with an environment variable, but the 
exact answer eludes me.

Actually, it looks like you *have* defined the environment variable 
(DISPLAY in the stack trace rings a bell).  Is X running?  I believe it 
has to be for this to work.

Frank

Justin Jaynes wrote:
> Hello all,
>  
> I've written a java class to scale jpeg images. But I can't seem to get it to 
> work. Can anyone point me in the right direction?
>  
>  Here is my code:
>  
>
> package com.everybuddystree;
> 
> import java.awt.*;
> import java.awt.image.*;
> import java.io.*;
> import javax.imageio.*;
> 
> public class ImageScaler {
> 
>  public ImageScaler() {
>  }
> 
>  public boolean scaleImageByWidth(String fileName, int newWidth) {
> 
>   File originalImage = new File(fileName);
>   try {
>BufferedImage workingBufferedImage = ImageIO.read(originalImage);
>int width = workingBufferedImage.getWidth();
>int height = workingBufferedImage.getHeight();
>Image workingImage = workingBufferedImage;
>workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
>BufferedImage finalImage = (BufferedImage)workingImage;
>ImageIO.write(finalImage, "jpg", originalImage);
> 
>return true;
> 
>   } catch (IOException ex){
> 
>return false;
> 
>   }
> 
>  }
> 
> }
> 
> When I run the pass an image to the class using a jsp I get the 
> following errors from Tomcat:
> 
> 
>  HTTP Status 500 -  
> -
>  type Exception report
>  message 
>  description The server encountered an internal error () that prevented it 
> from fulfilling this request.
>  exception 
> javax.servlet.ServletException: Can't connect to X11 window server using 
> ':0.0' as the value of the DISPLAY variable. 
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
>  
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
>  org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:158) 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause 
> java.lang.InternalError: Can't connect to X11 window server using ':0.0' as 
> the value of the DISPLAY variable. 
> sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) 
> sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53) 
> sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142) 
> java.security.AccessController.doPrivileged(Native Method) 
> sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131) 
> java.lang.Class.forName0(Native Method) 
> java.lang.Class.forName(Class.java:164) 
> java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
>  sun.awt.X11.XToolkit.(XToolkit.java:96) java.lang.Class.forName0(Native 
> Method) java.lang.Class.forName(Class.java:164) 
> java.awt.Toolkit$2.run(Toolkit.java:821) 
> java.security.AccessController.doPrivileged(Native Method) 
> java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804) 
> java.awt.Image.getScaledInstance(Image.java:158) 
> com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21) 
> org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114) 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full 
> stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
>  
> -
>  Apache Tomcat/5.5.12 
> 
> 
>  
>  
> 
>   
> -
> Yahoo! Photos – Showcase holiday pictures in hardcover
>  Photo Books. You design it and we’ll bind it!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTE

Re: Image Scaling Code

2006-01-12 Thread Frank W. Zammetti

I don't quite see how this is Tomcat-related, but...

Your code can't connect to your X server, which is necessary for many 
Java graphics-related functions to work on a *nix system.  I dealt with 
this at one point when getting DataVision working on Linux, and I recall 
the solution being something to do with an environment variable, but the 
exact answer eludes me.


Actually, it looks like you *have* defined the environment variable 
(DISPLAY in the stack trace rings a bell).  Is X running?  I believe it 
has to be for this to work.


Frank

Justin Jaynes wrote:

Hello all,
 
 I've written a java class to scale jpeg images.  But I can't seem to get it to work.  Can anyone point me in the right direction?
 
 Here is my code:
 
   
package com.everybuddystree;


import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;

public class ImageScaler {

 public ImageScaler() {
 }

 public boolean scaleImageByWidth(String fileName, int newWidth) {

  File originalImage = new File(fileName);
  try {
   BufferedImage workingBufferedImage = ImageIO.read(originalImage);
   int width = workingBufferedImage.getWidth();
   int height = workingBufferedImage.getHeight();
   Image workingImage = workingBufferedImage;
   workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
   BufferedImage finalImage = (BufferedImage)workingImage;
   ImageIO.write(finalImage, "jpg", originalImage);

   return true;

  } catch (IOException ex){

   return false;

  }

 }

}

When I run the pass an image to the class using a jsp I get the 
following errors from Tomcat:



 HTTP Status 500 -  
-

 type Exception report
 message 
 description The server encountered an internal error () that prevented it from fulfilling this request.
 exception 
 javax.servlet.ServletException: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.  org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)  org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:158)  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause 
 java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.  sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)  sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)  sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)  java.security.AccessController.doPrivileged(Native Method)  sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)  java.lang.Class.forName0(Native Method)  java.lang.Class.forName(Class.java:164)  java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)  sun.awt.X11.XToolkit.(XToolkit.java:96)  java.lang.Class.forName0(Native Method)  java.lang.Class.forName(Class.java:164)  java.awt.Toolkit$2.run(Toolkit.java:821)  java.security.AccessController.doPrivileged(Native Method)  java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)  java.awt.Image.getScaledInstance(Image.java:158) 
 com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21)  org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114)  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
 
-
 Apache Tomcat/5.5.12 



 
 



-
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

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



Image Scaling Code

2006-01-12 Thread Justin Jaynes
Hello all,
 
 I've written a java class to scale jpeg images.  But I can't seem to get it to 
work.  Can anyone point me in the right direction?
 
 Here is my code:
 
   
package com.everybuddystree;

import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;

public class ImageScaler {

 public ImageScaler() {
 }

 public boolean scaleImageByWidth(String fileName, int newWidth) {

  File originalImage = new File(fileName);
  try {
   BufferedImage workingBufferedImage = ImageIO.read(originalImage);
   int width = workingBufferedImage.getWidth();
   int height = workingBufferedImage.getHeight();
   Image workingImage = workingBufferedImage;
   workingImage = (Image)workingImage.getScaledInstance(newWidth,-1,1);
   BufferedImage finalImage = (BufferedImage)workingImage;
   ImageIO.write(finalImage, "jpg", originalImage);

   return true;

  } catch (IOException ex){

   return false;

  }

 }

}

When I run the pass an image to the class using a jsp I get the 
following errors from Tomcat:


 HTTP Status 500 -  
-
 type Exception report
 message 
 description The server encountered an internal error () that prevented it from 
fulfilling this request.
 exception 
 javax.servlet.ServletException: Can't connect to X11 window server using 
':0.0' as the value of the DISPLAY variable.  
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
  
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
  org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:158)  
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)  
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)  
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause 
 java.lang.InternalError: Can't connect to X11 window server using ':0.0' as 
the value of the DISPLAY variable.  
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)  
sun.awt.X11GraphicsEnvironment.access$000(X11GraphicsEnvironment.java:53)  
sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:142)  
java.security.AccessController.doPrivileged(Native Method)  
sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)  
java.lang.Class.forName0(Native Method)  
java.lang.Class.forName(Class.java:164)  
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
  sun.awt.X11.XToolkit.(XToolkit.java:96)  
java.lang.Class.forName0(Native Method)  
java.lang.Class.forName(Class.java:164)  
java.awt.Toolkit$2.run(Toolkit.java:821)  
java.security.AccessController.doPrivileged(Native Method)  
java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)  
java.awt.Image.getScaledInstance(Image.java:158) 
 com.everybuddystree.ImageScaler.scaleImageByWidth(ImageScaler.java:21)  
org.apache.jsp.image_jsp._jspService(org.apache.jsp.image_jsp:114)  
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)  
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)  
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full 
stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
 
-
 Apache Tomcat/5.5.12 


 
 


-
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!

how to enable SSL protocol with tomcat 5.5.12

2006-01-12 Thread Iosev Perez Rivero
I use the tomcat´s documentation about that but I have an error, I need that 
someone explain to me how to that

Iósev Pérez Rivero
Estudiante 4to. Año
Universidad de las Ciencias Informáticas

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



Re: Question regarding tomcat class path handling

2006-01-12 Thread Oded Arbel
On Wednesday, 11 בJanuary 2006 18:38, Sriram Narayanan wrote:
> I wrote something that works for me:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=38223

Thanks. I didn't use your implementation for the reason noted in the 
comment I attached to the issue, but you pointed me in the right 
direction.

I solved the problem by also implementing a web app class loader and 
attached the source to the above issue. 

Thanks again :-)

-- 
Oded

::..
Software: Making your computer come alive so it can attack you
-- Dave Barry in Cyberspace (probably using Windows)

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



RE: tomcat and javac (UNCLASSIFIED)

2006-01-12 Thread Caldarale, Charles R
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Subject: Re: tomcat and javac (UNCLASSIFIED)
> 
> However, my  webapp does not work on Tomcat 5.5.12 
> when I put my servlet classes in  common\classes.

You shouldn't do that.  Read the servlet spec, and put the servlet
classes where they belong:

webapps//WEB-INF/classes

> In the last version of Tomcat 3.0X that I used, the class 
> files would go into webapps\ROOT\WEB-INF\classes.

ROOT is for the default application.

> My servlet class files would contain the path to the 
> properties files in ROOT\WEB-INF.

Unnecessary, non-portable, and unreliable, as you have now discovered.
You should be using something like this:

Thread.currentThread().getContextClassLoader().getResource()

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems Using Context Loader

2006-01-12 Thread Sriram Narayanan
On 1/12/06, Michel Costa <[EMAIL PROTECTED]> wrote:
> No, that is not a Tomcat problem... it's a specific application problem... I 
> saw some people complaining about the same things in applications similar to 
> mine.
>

By "No, that is not a Tomcat problem...", I believe you're saying that
there's no problem related to startup etc.

Ack on the statement that you're talking about an application specific problem.

> The big whole problem with my application is the framework usage: Hibernate 
> and Struts...
> My guess is that hibernate is not finalizing normally (i done some tests 
> restarting the context using only struts and garbage collecting and checking 
> the amount of free memory)... cause when I restart the context about 4 times 
> using hibernate and struts there is no more free memory neither memory to 
> allocate. It ends with a Heap space error.
>

Ack. So you're placing hibernate in the Context's WEB-INF/lib folder ?
I haven't used Hibernate yet, but will do so to understand this issue.

> Every time a new class is compiled during development the context must be 
> restarted to update the class reference, so now we have a problem.
>
> My way out is to make a classloader to monitor these classes in classes 
> folder and auto-update the reference...

Is this what you want ?
a) Hibernate etc are loaded just once.
b) Your apps' classes are monitored and when ever they change, a fresh
classloader is instantiated.
c) At this time, Hibernate etc are not to be reloaded.
d) Hibernate and Struts and anyone else should continue to to have
access to the latest classes.

I see a problem with Hibernate having a reference to the older classes
(perhaps in objects that are cached, etc. I don't know for sure, I'm
just speculating here). This would be an interesting problem to solve.

If you don't get this right, then let me know, I'd like to help. I'm
interesting in solving this classloader requirement as well - it'll be
a good exercise for the mind :)

> Wish me luck ;-)
>

Best of luck :)

> I will take a look at your idea... but seems you are not trying to reload the 
> classes references.
>

Correct. It was just something I put together late at night. I'm
considering adding stuff like monitoring for changes in the classes
mentioned in these paths, etc. I'll look into this. Let me know if
you'd like to see some feature.

-- Sriram

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



Re: Changing default web apps

2006-01-12 Thread Dennis Leary
The simplist way is to rename your app to ROOT. If read about creating a 
ROOT.xml in conf/Catalina/localhost and pointing the docbase to your webapp 
by I didn't have much luck with it.
- Original Message - 
From: "Marco Rossi" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Thursday, January 12, 2006 11:27 AM
Subject: Re: Changing default web apps



Ok for list archive
http://wiki.apache.org/tomcat/HowTo#head-e82228c43a0ce77f71ebe64fc99ced33c9506ffe



Marco Rossi <[EMAIL PROTECTED]> wrote: Hi all,

I'm trying to deploy a single web app to serve a whole web site on port 
80. I'm able (finally:-) to use jsv to redirect port 80 to 8080, but I'm 
wish to chanche the default application that listen on port 8080.


I noticed that the files to be server are coming from webapps/ROOT, how 
can I set as default webappas/MyApp/index.jsp in tomcat 5.5.12 ?


Thanks




-
Yahoo! Photos
Got holiday prints? See all the ways to get quality prints in your hands 
ASAP.




-
Yahoo! Photos
Got holiday prints? See all the ways to get quality prints in your hands 
ASAP. 



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



Re: Changing default web apps

2006-01-12 Thread Marco Rossi
Ok for list archive
http://wiki.apache.org/tomcat/HowTo#head-e82228c43a0ce77f71ebe64fc99ced33c9506ffe



Marco Rossi <[EMAIL PROTECTED]> wrote: Hi all,

I'm trying to deploy a single web app to serve a whole web site on port 80. I'm 
able (finally:-) to use jsv to redirect port 80 to 8080, but I'm wish to 
chanche the default application that listen on port 8080. 

I noticed that the files to be server are coming from webapps/ROOT, how can I 
set as default webappas/MyApp/index.jsp in tomcat 5.5.12 ?

Thanks



   
-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.



-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.

RE: Tomcat integegrated with Apache

2006-01-12 Thread George Sexton
Because I don't have a lot of static content.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Rafal Zawadzki [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 12, 2006 9:02 AM
> To: Tomcat Users List
> Subject: Re: Tomcat integegrated with Apache
> 
> ### "George Sexton" <[EMAIL PROTECTED]> wrote message to 
> "'Tomcat Users 
> List'"  ###
> ### this is reply for: RE: Tomcat integegrated with Apache ###
> > If I can avoid using Apache, then I run tomcat on a 
> non-privileged port and
> > use IPTables to re-direct from port 80 to the non-privileged port.
> 
> Why not use squid?
> 
> -- 
> Rafał Zawadzki
> Deploy/Release Manager
> eo Networks Sp. z o.o.
> 


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



Re: Tomcat integegrated with Apache

2006-01-12 Thread Rafal Zawadzki
### "Peter Crowther" <[EMAIL PROTECTED]> wrote message to "Tomcat 
Users List"  ###
### this is reply for: RE: Tomcat integegrated with Apache ###
> > From: Rafal Zawadzki [mailto:[EMAIL PROTECTED]
> > Why not use squid?
>
> One view: Why go through another user-level process when you can simply
> redirect the socket connections via iptables for fewer CPU cycles and
> less RAM?
>
> Another view: squid may be faster at serving static content, so
> interposing it could be useful if you suspect that is a bottleneck.
> Recent Tomcats are faster than older Tomcats at serving static content.
>
> My view: It depends on your mix of content and your webapp.  In general,
> it's not possible to know which is more efficient *in your environment*
> without benchmarking it.

Hm, sorry, my fault. I never think about small tomcat webapps. I've got 
experience only with big clustered applications, so I always think about this 
trio:
- tomcat
- apache
- squid

-- 
Rafał Zawadzki
Deploy/Release Manager
eo Networks Sp. z o.o.


pgpL3EoFSqqHE.pgp
Description: PGP signature


Re: Tomcat integegrated with Apache

2006-01-12 Thread Marco Rossi
In the pastI used a lot of proxy architectures and I lliked it. 
Despite this the statefull firewall mania brings to my atttention lots of 
people that use iptables for nearly all type of redirection. 

It's fast, it works well in linux you can change on the fly, my only objections 
are it's not an application aware solution and tracking back sources ip is not 
as easy as it seems (you can play with loggin options but after you have to 
parse iptables log files) 



Rafal Zawadzki <[EMAIL PROTECTED]> wrote: ### "George Sexton"  wrote message to 
"'Tomcat Users 
List'"  ###
### this is reply for: RE: Tomcat integegrated with Apache ###
> If I can avoid using Apache, then I run tomcat on a non-privileged port and
> use IPTables to re-direct from port 80 to the non-privileged port.

Why not use squid?

-- 
Rafał Zawadzki
Deploy/Release Manager
eo Networks Sp. z o.o.




-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.

RE: Tomcat integegrated with Apache

2006-01-12 Thread Peter Crowther
> From: Rafal Zawadzki [mailto:[EMAIL PROTECTED] 
> Why not use squid?

One view: Why go through another user-level process when you can simply
redirect the socket connections via iptables for fewer CPU cycles and
less RAM?

Another view: squid may be faster at serving static content, so
interposing it could be useful if you suspect that is a bottleneck.
Recent Tomcats are faster than older Tomcats at serving static content.

My view: It depends on your mix of content and your webapp.  In general,
it's not possible to know which is more efficient *in your environment*
without benchmarking it.

- Peter

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



Re: Tomcat integegrated with Apache

2006-01-12 Thread Rafal Zawadzki
### "George Sexton" <[EMAIL PROTECTED]> wrote message to "'Tomcat Users 
List'"  ###
### this is reply for: RE: Tomcat integegrated with Apache ###
> If I can avoid using Apache, then I run tomcat on a non-privileged port and
> use IPTables to re-direct from port 80 to the non-privileged port.

Why not use squid?

-- 
Rafał Zawadzki
Deploy/Release Manager
eo Networks Sp. z o.o.


pgp1jUpzX3aWs.pgp
Description: PGP signature


Re: running tomcat 5.0 as windows service - how do I get it to use the security manager and catalina.policy?

2006-01-12 Thread Stracchino, Peri
Thanks Mladen
 
That did the trick. I notice that not having any spaces at the start of
the line is also crucial to making this work
 
cheers
Peri

**
 
Experience the British Library online at www.bl.uk
 
Help the British Library conserve the world's knowledge. Adopt a Book. 
www.bl.uk/adoptabook
 
The Library's St Pancras site is WiFI - enabled
 
**
 
The information contained in this e-mail is confidential and may be legally 
privileged. It is intended for the addressee(s) only. If you are not the 
intended recipient, please delete this e-mail and notify the [EMAIL PROTECTED] 
: The contents of this e-mail must not be disclosed or copied without the 
sender's consent. 
 
The statements and opinions expressed in this message are those of the author 
and do not necessarily reflect those of the British Library. The British 
Library does not take any responsibility for the views of the author. 
 
**


RE: problem with keytool for ssl

2006-01-12 Thread Iosev Perez Rivero
So, how to create self signed cert to import?

Iósev Pérez Rivero
Estudiante 4to. Año
Universidad de las Ciencias Informáticas

-Original Message-
From: Ken Johanson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 12:47 AM
To: Tomcat Users List
Subject: Re: problem with keytool for ssl

You appear to be attempting to import (last step) the certificate 
request you created. Instead, you should be waiting for / getting back 
your CA's signed version of your CSR, then import that.. Otherwise, 
create self signed cert to import, if you dont need users to trust your 
claimed identity.

best,
ken

Iosev Perez Rivero wrote:
> I have a problem for configure SSL protocol using keytool 
> 
>  
> 
>  
> 
> C:\Tomcat55\webapps\ROOT>keytool -genkey -alias tomcat -keyalg RSA -keystore 
> .ke
> 
> ystore
> 
> Enter keystore password:  eileen
> 
> What is your first and last name?
> 
>   [Unknown]:  iosev
> 
> What is the name of your organizational unit?
> 
>   [Unknown]:  uci
> 
> What is the name of your organization?
> 
>   [Unknown]:  uci
> 
> What is the name of your City or Locality?
> 
>   [Unknown]:  uci
> 
> What is the name of your State or Province?
> 
>   [Unknown]:  uci
> 
> What is the two-letter country code for this unit?
> 
>   [Unknown]:  cu
> 
> Is CN=iosev, OU=uci, O=uci, L=uci, ST=uci, C=cu correct?
> 
>   [no]:  yes
> 
>  
> 
> Enter key password for 
> 
> (RETURN if same as keystore password):  eileen
> 
>  
> 
> C:\Tomcat55\webapps\ROOT>keytool -certreq -keyalg RSA -alias tomcat -file 
> certre
> 
> q.csr -keystore .keystore
> 
> Enter keystore password:  eileen
> 
>  
> 
> C:\Tomcat55\webapps\ROOT>keytool -import -alias root -keystore .keystore 
> -trustc
> 
> acerts -file chain
> 
> Enter keystore password:  eileen
> 
> Certificate was added to keystore
> 
>  
> 
> C:\Tomcat55\webapps\ROOT>keytool -import -alias tomcat -keystore .keystore 
> -trus
> 
> tcacerts -file certreq.csr
> 
> Enter keystore password:  eileen
> 
> keytool error: java.security.cert.CertificateException: 
> sun.security.pkcs.Parsin
> 
> gException: X509.ObjectIdentifier() -- data isn't an object ID (tag = 48)
> 
>  
> 
>  
> 
> please someone may help me.
> 
>  
> 
> Sorry me English because i´m Cuban.
> 
>  
> 
> Iósev Pérez Rivero
> 
> Estudiante 4to. Año
> 
> Universidad de las Ciencias Informáticas
> 
>  
> 
> 




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


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



RE: Tomcat integegrated with Apache

2006-01-12 Thread George Sexton
If I can avoid using Apache, then I run tomcat on a non-privileged port and
use IPTables to re-direct from port 80 to the non-privileged port.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Marco Rossi [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 12, 2006 8:12 AM
> To: Tomcat Users List
> Subject: RE: Tomcat integegrated with Apache
> 
> 
> George Sexton <[EMAIL PROTECTED]> wrote: I can give a 
> reason. Its called Connector de-jour. The "preferred"
> connector, changes every 6 months and they're bloody 
> impossible to configure
> and keep straight. Building a connector is impossible unless you are a
> REALLY highly skill UNIX sysadmin.
> 
> I completely agree, connectors are too much error prone for me. 
> 
> If so, which is in your opinions the fastest way to setup a 
> single tomcat web app serving a web site ?
> 
> Jsvc, connector, iptables ?
>  
> 
>   
> -
> Yahoo! Photos
>  Ring in the New Year with Photo Calendars. Add photos, 
> events, holidays, whatever.
> 


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



Changing default web apps

2006-01-12 Thread Marco Rossi
Hi all,

I'm trying to deploy a single web app to serve a whole web site on port 80. I'm 
able (finally:-) to use jsv to redirect port 80 to 8080, but I'm wish to 
chanche the default application that listen on port 8080. 

I noticed that the files to be server are coming from webapps/ROOT, how can I 
set as default webappas/MyApp/index.jsp in tomcat 5.5.12 ?

Thanks




-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.

Re: tomcat and javac (UNCLASSIFIED)

2006-01-12 Thread Zorro3692
Hi Chuck,
 
   Thanks for your reply.
Can you please help me with the following question I posted earlier.
 
 
 
Hi,
 
I recently downloaded and  installed Tomcat 5.5.12. I read the 
documentation on class loading. However, my  webapp does not work on Tomcat 
5.5.12 
when I put my servlet classes in  common\classes.
 
My webapp consists of .properties files, .class files ( servlets) and  jsp's.
 
In the last version of Tomcat 3.0X that I used, the class files would go  
into webapps\ROOT\WEB-INF\classes.
 
The properties files would be in ROOT\WEB-INF and all the jsp files in  
webapps\ROOT.
My servlet class files would contain the path to the properties files  in 
ROOT\WEB-INF.
 
Everything worked just fine.
 
Now it's totally confusing. I have recompiled my servlets to reflect the  new 
path for the properties files in webapps\ROOT\WEB-INF of the Tomcat 5.5.12  
installation. But nothing works. The error I get is that the servlet resources  
are not available.
 
I am a student and this is my former homework project.
 
Any help would be highly appreciated.
 
Regards,
 
Jimmy Wadia
 
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Subject:  Re: tomcat and javac (UNCLASSIFIED)
>  
> Can you let me know  which dir in Tomcat 5.5.12 has  the 
> java compiler?

There  are three jasper-*.jar files in common/lib.  The actual Java
compiler  appears to be in jasper-compiler-jdt.jar; I have not attempted
to use it  outside of Tomcat in any way.

-  Chuck




Re: running tomcat 5.0 as windows service - how do I get it to use the security manager and catalina.policy?

2006-01-12 Thread Mladen Turk

Stracchino, Peri wrote:

*   If I try adding the line "-Djava.security.manager
-Djava.security.policy=C:\Program Files\Apache Software
Foundation\Tomcat 5.0\conf\catalina.policy"


Add two lines
-Djava.security.manager
and
-Djava.security.policy=C:\Program Files\Apache Software 
Foundation\Tomcat 5.0\conf\catalina.policy


Each line should reflect a single cmdline directive

Regards,
Mladen.

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



running tomcat 5.0 as windows service - how do I get it to use the security manager and catalina.policy?

2006-01-12 Thread Stracchino, Peri
hi guys
 
I am trying to get tomcat 5.0 to use the security manager and
catalina.policy when running as a windows service. This works fine when
I run it from startup.bat using the normal "set CMD_LINE_ARGS=
-security" method. However I cant find any documentation - either on the
tomcat site or on the web - on how to tell it to use the security
manager when starting it up as a windows service.
 
So far I'v experimented with the following, using the  'Configure Tomcat
UI' which I assume is the correct place to start when running as a
service.

*   If I add "-security" after 'start' in the arguments field on the
startup tab, I get a message telling me the service started and then
stopped.
*   If I try adding "-security" to the java options tab on the
'Configure Tomcat UI, I get a message telling me simply that tomcat will
not start.
*   If I try adding the line "-Djava.security.manager
-Djava.security.policy=C:\Program Files\Apache Software
Foundation\Tomcat 5.0\conf\catalina.policy" to the java options tab then
tomcat starts, but a bit of experimentation with the permissions in
catalina.policy suggests that it isnt actually using it - even if I
remove essential permissions the application can still access the
relevant files.

Can anyone tell me the correct procedure for ensuring the security
manager is used and catalina.policy referred to when running as a
service in 5.0? It is running on both  XP and Windows 2000 platforms
 
Cheers
peri

**
 
Experience the British Library online at www.bl.uk
 
Help the British Library conserve the world's knowledge. Adopt a Book. 
www.bl.uk/adoptabook
 
The Library's St Pancras site is WiFI - enabled
 
**
 
The information contained in this e-mail is confidential and may be legally 
privileged. It is intended for the addressee(s) only. If you are not the 
intended recipient, please delete this e-mail and notify the [EMAIL PROTECTED] 
: The contents of this e-mail must not be disclosed or copied without the 
sender's consent. 
 
The statements and opinions expressed in this message are those of the author 
and do not necessarily reflect those of the British Library. The British 
Library does not take any responsibility for the views of the author. 
 
**


RE: info required about no of connections..

2006-01-12 Thread Caldarale, Charles R
> From: babji [mailto:[EMAIL PROTECTED] 
> Subject: info required about no of connections..
> 
> No my question is how many user can login and open session in 
> tomcat at a given point of time.

No limit, other than the max number of threads configured for the
connector.  See:
http://tomcat.apache.org/tomcat-5.5-doc/config/index.html
for details.

> second one is at a given point of time how many sessions can 
> access one servlet.

Sessions don't access servlets, threads do.  Multiple threads may be
processing requests under the same session simultaneously, so
synchronization is required where appropriate.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat integegrated with Apache

2006-01-12 Thread Marco Rossi

George Sexton <[EMAIL PROTECTED]> wrote: I can give a reason. Its called 
Connector de-jour. The "preferred"
connector, changes every 6 months and they're bloody impossible to configure
and keep straight. Building a connector is impossible unless you are a
REALLY highly skill UNIX sysadmin.

I completely agree, connectors are too much error prone for me. 

If so, which is in your opinions the fastest way to setup a single tomcat web 
app serving a web site ?

Jsvc, connector, iptables ?
 


-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.

Re: Tomcat integegrated with Apache

2006-01-12 Thread Jess Holle
Does Tomcat now have caching of LDAP authentication (i.e. for basic 
authentication)?


Does Tomcat allow a single web app (and URL therein) to be authenticated 
against multiple LDAPs (i.e. where part of the user community is defined 
by each)?


Is there a SiteMinder plug-in for Tomcat?

These sorts of things also currently drive folk to use Apache currently.

--
Jess Holle

Caldarale, Charles R wrote:

From: Gary Blomquist [mailto:[EMAIL PROTECTED] 
Subject: RE: Tomcat integegrated with Apache


Can you give any specifics as to why you think running Tomcat in front
of Apache is bad?
   


1) Extra overhead.
2) Additional complexity.
3) Added points of failure.

Certainly if you have a need for capabilities not supported by Tomcat
(such as load balancing), then front-ending it with httpd is an
inexpensive way to go.  (A hardware balancer should give you somewhat
better performance, but you may or may not need it.)

The old httpd vs. Tomcat performance difference for static content
simply isn't a factor anymore. Take a look at the study Peter Lin did:
http://tomcat.apache.org/articles/benchmark_summary.pdf

Note that this wasn't with the latest version of Tomcat, which has
improved a bit more.

- 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 



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



RE: how to suppor 30000 concurrent users

2006-01-12 Thread Caldarale, Charles R
> From: Peter Crowther [mailto:[EMAIL PROTECTED] 
> Subject: RE: how to suppor 3 concurrent users
> 
> That said, 
> http://www.theserverside.com/news/thread.tss?thread_id=38377
> may be relevant - no doubt others will come up with better links!

There's also the other Peter's excellent paper on performance monitoring
and tuning:
http://tomcat.apache.org/articles/performance.pdf

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat integegrated with Apache

2006-01-12 Thread Gary Blomquist
Thanks.

As I mentioned we are considering buying a hardware load balancer.  I
just wondered what problems I might encounter if we did choose to load
balance with Apache.  Our volume is relatively low.  We want the load
balancer so we can have hitless upgrades.

Our app. uses frames.  Could that cause a problem with load balancing
and non-sticky sessions?

Gary

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 9:34 AM
To: Tomcat Users List
Subject: RE: Tomcat integegrated with Apache

> From: Gary Blomquist [mailto:[EMAIL PROTECTED]
> Subject: RE: Tomcat integegrated with Apache
> 
> Can you give any specifics as to why you think running Tomcat in front

> of Apache is bad?

1) Extra overhead.
2) Additional complexity.
3) Added points of failure.

Certainly if you have a need for capabilities not supported by Tomcat
(such as load balancing), then front-ending it with httpd is an
inexpensive way to go.  (A hardware balancer should give you somewhat
better performance, but you may or may not need it.)

The old httpd vs. Tomcat performance difference for static content
simply isn't a factor anymore. Take a look at the study Peter Lin did:
http://tomcat.apache.org/articles/benchmark_summary.pdf

Note that this wasn't with the latest version of Tomcat, which has
improved a bit more.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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



RE: Tomcat integegrated with Apache

2006-01-12 Thread Caldarale, Charles R
> From: Gary Blomquist [mailto:[EMAIL PROTECTED] 
> Subject: RE: Tomcat integegrated with Apache
> 
> Can you give any specifics as to why you think running Tomcat in front
> of Apache is bad?

1) Extra overhead.
2) Additional complexity.
3) Added points of failure.

Certainly if you have a need for capabilities not supported by Tomcat
(such as load balancing), then front-ending it with httpd is an
inexpensive way to go.  (A hardware balancer should give you somewhat
better performance, but you may or may not need it.)

The old httpd vs. Tomcat performance difference for static content
simply isn't a factor anymore. Take a look at the study Peter Lin did:
http://tomcat.apache.org/articles/benchmark_summary.pdf

Note that this wasn't with the latest version of Tomcat, which has
improved a bit more.

 - 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat integegrated with Apache

2006-01-12 Thread George Sexton
I can give a reason. Its called Connector de-jour. The "preferred"
connector, changes every 6 months and they're bloody impossible to configure
and keep straight. Building a connector is impossible unless you are a
REALLY highly skill UNIX sysadmin.

My advice is this:

Set up your machine running tomcat. Download Jmeter, and test it. I'm
betting that tomcat can service enough data to more than adequately meet
your needs. In my App, running really complex servlets with database
interaction, I was hitting 6Mb/second throughput. Pages that didn't involve
the database, just complex servlet logic were coming out at something like
24Mb/s. This was a commodity grade P4.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Gary Blomquist [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 12, 2006 6:55 AM
> To: Tomcat Users List
> Subject: RE: Tomcat integegrated with Apache
> 
> Can you give any specifics as to why you think running Tomcat in front
> of Apache is bad?
> 
> We were considering doing that for load balancing but now we are
> thinking about using a hardware appliance instead.
> 
> Gary
>  
> 
> -Original Message-
> From: David Smith [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, January 12, 2006 7:51 AM
> To: Tomcat Users List
> Subject: Re: Tomcat integegrated with Apache
> 
> The connector is integrated into Apache Httpd 2.2 which was just
> released as stable in December.  Versions prior still require you
> download and build mod_jk.so separately.  Personally, I think 
> you should
> avoid putting Apache in front unless you have other technologies to
> support (ie PHP or Perl) and the tomcat content is only a 
> small part of
> the overall site design.
> 
> --David
> 
> Pete Alvin wrote:
> 
> >Thanks for that advice!  Sounds like I need to run the 
> compat thing to 
> >get Tomcat5.5 to work with 1.4.2.
> >
> >
> >NEW QUESTION:
> >
> >I'm trying to get Tomcat running on a new BSD box and my IT 
> guys says 
> >that a connector isn't necessary because it's integrated with Apache.
> > There is a brief mention of this in the FAQ.  Is this possible?  
> >I've always had to use a connector between the two.
> >
> >Can anyone point me to a web page that explains how to 
> configure Tomcat
> 
> >if it's integrated?
> >
> >Pete
> >
> >
> >
> >
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >  
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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



RE: Tomcat integegrated with Apache

2006-01-12 Thread Gary Blomquist
Can you give any specifics as to why you think running Tomcat in front
of Apache is bad?

We were considering doing that for load balancing but now we are
thinking about using a hardware appliance instead.

Gary
 

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 12, 2006 7:51 AM
To: Tomcat Users List
Subject: Re: Tomcat integegrated with Apache

The connector is integrated into Apache Httpd 2.2 which was just
released as stable in December.  Versions prior still require you
download and build mod_jk.so separately.  Personally, I think you should
avoid putting Apache in front unless you have other technologies to
support (ie PHP or Perl) and the tomcat content is only a small part of
the overall site design.

--David

Pete Alvin wrote:

>Thanks for that advice!  Sounds like I need to run the compat thing to 
>get Tomcat5.5 to work with 1.4.2.
>
>
>NEW QUESTION:
>
>I'm trying to get Tomcat running on a new BSD box and my IT guys says 
>that a connector isn't necessary because it's integrated with Apache.
> There is a brief mention of this in the FAQ.  Is this possible?  
>I've always had to use a connector between the two.
>
>Can anyone point me to a web page that explains how to configure Tomcat

>if it's integrated?
>
>Pete
>
>
>
>
>
>
>-
>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]



Re: Tomcat integegrated with Apache

2006-01-12 Thread David Smith
The connector is integrated into Apache Httpd 2.2 which was just 
released as stable in December.  Versions prior still require you 
download and build mod_jk.so separately.  Personally, I think you should 
avoid putting Apache in front unless you have other technologies to 
support (ie PHP or Perl) and the tomcat content is only a small part of 
the overall site design.


--David

Pete Alvin wrote:

Thanks for that advice!  Sounds like I need to run the compat thing 
to get Tomcat5.5 to work with 1.4.2.



NEW QUESTION:

I'm trying to get Tomcat running on a new BSD box and my IT guys says
that a connector isn't necessary because it's integrated with Apache.
There is a brief mention of this in the FAQ.  Is this possible?  
I've always had to use a connector between the two.


Can anyone point me to a web page that explains how to configure 
Tomcat if it's integrated?


Pete






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



Stop a file from getting cached.

2006-01-12 Thread Kamalmeet Singh
Hi,

I am using this setting in my 'web.xml' to stop all files with extesion
'abc' from getting cached. The problem is that it works fine with IE, but in
Firefox I can still see my files getting cached. How can I stop my files
from getting cached in Firefox? Is there any other way to stop caching.

 
 
 HeaderFilter
  
  
 com.myweb.services.HeaderFilter
  
  
 
Cache-Control
 
 
no-cache
 
  
   
   
  
 HeaderFilter
  
  
 *.abc
  
   


Regards

Kamal





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



Re: Last-Modified not updated when file is changed / touched.

2006-01-12 Thread Michel Costa
Some filesystems in linux/unix does not save date stuff, to speed up access...

I am not sure about what tomcat does, but I think he sends the date of the 
cached resource...

- Segue mensagem original! -

De: hanasaki <[EMAIL PROTECTED]>
Data: Wed, 11 Jan 2006 21:44:27 -0600
Para: LIST - Tomcat Users 
Assunto: Last-Modified not updated when file is changed / touched.

Running tomcat 5.5.14 on Linux with:

java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

Files are coming back with unchanged "last modified" dates even after
editing or a unix "touch"  These files are being loaded via some Ajax
(see below) - IE6 and Firefox1.5

If the browser cache is cleared, or the referenced page is hit directly,
subsequent hits to the ajaxpage do retrieve the new page off the server.

== call to ajax
Home

== Javascript / ajax
function ajaxpage(url, containerid) {
var page_request = false
if(window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
// Gecko (Firefox, Moz), KHTML (Konqueror, Safari), Opera,
Internet Explorer 7
} else if(window.ActiveXObject) {
   try{
xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");
// Internet Explorer 6
   } catch(e) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
// Internet Explorer 4,5
   }
} else {
return false;
}

xmlhttp.onreadystatechange=function() {
loadpage(page_request, containerid)
}
xmlhttp.open('GET', url, true)
xmlhttp.send(null)
}


function loadpage(page_request, containerid) {
if (xmlhttp.readyState == 4 && (xmlhttp.status==200 ||
window.location.href.indexOf("http")==-1)) {


document.getElementById(containerid).innerHTML=xmlhttp.responseText
}
}

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





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



Re: Problems Using Context Loader

2006-01-12 Thread Michel Costa
No, that is not a Tomcat problem... it's a specific application problem... I 
saw some people complaining about the same things in applications similar to 
mine.

The big whole problem with my application is the framework usage: Hibernate and 
Struts...
My guess is that hibernate is not finalizing normally (i done some tests 
restarting the context using only struts and garbage collecting and checking 
the amount of free memory)... cause when I restart the context about 4 times 
using hibernate and struts there is no more free memory neither memory to 
allocate. It ends with a Heap space error.

Every time a new class is compiled during development the context must be 
restarted to update the class reference, so now we have a problem.

My way out is to make a classloader to monitor these classes in classes folder 
and auto-update the reference...
Wish me luck ;-)

I will take a look at your idea... but seems you are not trying to reload the 
classes references.

- Segue mensagem original! -

De: Sriram Narayanan <[EMAIL PROTECTED]>
Data: Thu, 12 Jan 2006 01:59:21 +0530
Para: Tomcat Users List 
Assunto: Re: Problems Using Context Loader

On 1/11/06, Michel Costa <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I am trying to create a ClassLoader for my application so then I will not 
> have to reload all the hibernate and struts when a new class is compiled.
>

Could you please explain why this is a problem ? Is the startup time an issue ?

> Then my problems started:
> I do not know where to put my special ClassLoader.
> I got lots of classcast exceptions until I found that a instance of 
> org.apache.catalina.loader.WebappClassLoader.
> So far so good, just extended my class and apache can't find 
> org.apache.catalina.loader.WebappClassLoader.
>
I'd taken another approach. See
http://issues.apache.org/bugzilla/show_bug.cgi?id=38223

> Now I have a java.lang.ClassNotFoundException: 
> org.apache.catalina.loader.WebappClassLoader
>
> I think the error is just because I put my classloader in the wrong place 
> (which is CATALINA_HOME/common/classes) but i could not avoid this common 
> folder... Before this one, I tried webapps/MYAPP/WEB-INF/classes but java 
> didnt found my class.
> My guess is something about the ClassLoader hierarchy and visibility of the 
> classes...
>

You place your class at CATALINA_HOME/server/classes. See the bug
report that I've filed for information on how I used my own
Classloader.

-- Sriram

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





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



RE: Using Tomcat 5.5 as a standalone web server

2006-01-12 Thread Adam Johnston
Security is not a key issue for us, over and beyond observing good
general site security principles. Given that there is far from a
consensus opinion on this question, I am going to stick with Apache
2.0.46 / Tomcat 5.5.7 as an integrated solution, but do some testing on
Tomcat standalone as well to see how it performs.  I would love to go to
pure Tomcat, but I can't risk it on this particular site ... For now! I
have noted the caching solutions people have suggested - they may form
part of a future non-Apache solution if traffic continues to rise.

Thanks everyone!

Adam

-Original Message-
From: ALEX HYDE [mailto:[EMAIL PROTECTED] 
Sent: 11 January 2006 13:31
To: Tomcat Users List
Subject: RE: Using Tomcat 5.5 as a standalone web server

Adam,
  
  I think I just posted a question on nearly this same topic.
  
  I found something called Pippo for static content and would be easier
to configure as it sits in Tomcat. 
  
  Do you have security considerations? Have you had to add modules for
securing content in Apache?   

Adam Johnston <[EMAIL PROTECTED]> wrote:  I like the
sound of that idea - videos tend to change rarely, and are prime
candidates for caching. Is anyone actually using this configuration?
Thanks. 

-Original Message-
From: Wouter Boers [mailto:[EMAIL PROTECTED]
Sent: 10 January 2006 16:01
To: 'Tomcat Users List'
Subject: RE: Using Tomcat 5.5 as a standalone web server

There is quite an easy sollution. 

Run squid as you main webserver and as a web accelator in front of your
tomcat. From the squid config you can decide what your want cached and
what now. I don't understand why this is not done more often since its
A) a very easy sollution
B) does not loose any of the funtionality tomcat can offer you
C) allow to fine grain the load of tomcat completely

Only downsite, the squid cache in core memory gives of course the best
performance so as much memory as possible will help. On the other hand.
The HTML of much sites fits easily in 500MB core memory.

Regards, Wouter 

-Original Message-
From: Adam Johnston [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 10, 2006 3:43 PM
To: users@tomcat.apache.org
Subject: Using Tomcat 5.5 as a standalone web server

Hello all,
 
I am running a reasonable sized site, on Linux Red Hat + Tomcat 5.5.7.
The site is serving mainly Flash movies and servlets with streaming
video through a commercial codec, plus a full HTML version of the site.
Currently, I have Tomcat 5.5.7 integrated with Apache 2.0.46, which was
(very) difficult to set up, and now I am looking to rebuild my server
into a better configuration, I want to simplify my admin by running
Tomcat on its own to serve all content. 
 
My question is this : does anyone have experience of running a 500 000 -
1 000 000 page impressions / month site, including  elements such as I
mention above, on Tomcat alone? I want to avoid the web server
integration if Tomcat is up to it, but I would love to hear if anyone
else has been successful with Tomcat standalone before I do?
 
Many thanks!
 
Adam

 


This email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential
or otherwise protected from disclosure. Dissemination, distribution or
copying of this e-mail or the information herein by anyone other than
the intended recipient, or an employee or agent responsible for
delivering the message to the intended recipient, is prohibited. If you
have received this e-mail in error, please immediately notify us by
calling the Help Desk at +44 20 7675
9666

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




This  email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential
or otherwise protected from disclosure. Dissemination, distribution or
copying of this e-mail or the information herein by anyone other than
the intended recipient, or an employee or agent responsible for
delivering the message to the intended recipient, is prohibited. If you
have received this e-mail in error, please immediately notify us by
calling the Help Desk at +44 20 7675 9666

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





-
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with
voicemail 


This email is intended only for the person or entity to which it is addressed 
and may contain information that is privileged, confidential or otherwise 
protected from disclosure. Dissemination, distribution or copying of this 
e-mail or the information herein by anyone other than the intended recipient, 
or an employee or agent responsible for delivering the message to the intended 
recipient, is p

RE: how to suppor 30000 concurrent users

2006-01-12 Thread Peter Crowther
> From: vishwas kharajge [mailto:[EMAIL PROTECTED] 
> howmany concurrent users does tomcat support?

Depends very largely on your webapp.  How efficient is it?  How many
operations per minute is each user making?  Does it require session
state, or can you get away without it?  Can it be clustered?

I strongly suspect that you'll make much more of a difference by careful
construction of your application than you will with Tomcat's overhead.
That said, http://www.theserverside.com/news/thread.tss?thread_id=38377
may be relevant - no doubt others will come up with better links!

- Peter

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



how to suppor 30000 concurrent users

2006-01-12 Thread vishwas kharajge
howmany concurrent users does tomcat support? if i want to design a
web application for 30,000 concurrent users in pick hours
what is the step?
Which type of server it needs
How to configure the tomcat server for the same?
How many maximum concurrent hit tomcat can serve per second?

Thanks in advance.


RE: Problem with servlets from upgrade

2006-01-12 Thread Francesca Jovanovic
Thanks so much for replying.
My URL's are mapped, below is an example. 
I had this working on my old PC for the past 2 years with no problems then I 
got a new pc and installed the latest tomcat, set the environment vars and 
copied everything over to the relevant folders but things are going horribly 
wrong.
I'll read through that doc and see if anything I've missed comes to light.





 


   

   virtualward.java.CourseList
   virtualward.java.CourseList
   
.
.
.
.

   virtualward.java.CourseList
   /servlet/CourseList
   
  


-Original Message-
From: George Sexton [mailto:[EMAIL PROTECTED] 
Sent: 11 January 2006 15:56
To: 'Tomcat Users List'
Subject: RE: Problem with servlets from upgrade

Read:

http://tomcat.apache.org/tomcat-5.5-doc/RELEASE-NOTES.txt

Specifically, search for

Enabling invoker servlet:

Essentially, you need to do URL mapping in your web.xml for your servlets.


George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -Original Message-
> From: Francesca Jovanovic [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 11, 2006 3:29 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Problem with servlets from upgrade
> Importance: High
> 
> I have a new computer and I have installed the latest version 
> of Tomcat 5 and reinstalled the Sun One Studio 4 which I 
> still had a setup file. The example servlets and jsp's work 
> fine but my servlets - that worked fine on my old pc with 
> tomcat 4 - now don't work, the jsps are working fine but not 
> the servlets. I get this error:
> 
> 
> HTTP Status 404 - /servlet/PostStudentID
> 
>   _  
> 
> 
> type Status report
> 
> message /servlet/PostStudentID
> 
> description The requested resource (/servlet/PostStudentID) 
> is not available.
> 
>   _  
> 
> 
> Apache Tomcat/5.5.12
> 
> 
> I have searched endlessly to try and see what's going wrong 
> and tried all your pointers but cannot resolve it. Can you 
> please help? Is Tomcat 5.5.12 compatible with Sun one studio 4?
> 
>  
> 
>  
> 
> Francesca Jovanović
> Learning Technologist
> Learning Partnerships Development Unit (LPDU) 
> Faculty of Health
> University of Central England
> 311 Ravensbury House, Westbourne Road
> Edgbaston, Birmingham, B15 3TN
> Telephone: 0121 331 7181
> Fax: 0121 331 6009
> 
>  
> 
> 


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



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



Re: Server push

2006-01-12 Thread vineesh kumar
Dear all,
   I just need to implement a telnet thru web. ie, I am using
servelts, I can connect to a remote host and i am able to execute some
commands and i can get the results. But my problem is that, i have to
maintain the telnet session between the cleint and the servlet and has
to repeatedly execute the commands
how can i accompish this thru pushlets
the architecture is:
___   _____
   | Telnet server|<-->| Webserver |<---> |  web client  |
   -   -   
---

Thanks in advance
regards
 vineesh
On 11/30/05, Andrew.du <[EMAIL PROTECTED]> wrote:
> Yes,the "http://www.pushlets.com/"; is good!
> Thanks!
>
>
> 2005/11/25, Dhaval Patel <[EMAIL PROTECTED]>:
> >
> > Hi,
> >
> > I dont know about your environment. But I know few things about push that
> > I
> > would like to share.
> >
> > I researched "push" a while ago. Basically I was looking for server push.
> > HTTP
> > is not push enabled protocol. So the answer is you can not push from
> > server to
> > client using HTTP. Client has to poll server. (may be in low priority
> > thread).
> >
> > J2ME (MIDP 2.0) has push capabalities. I am not sure whether all phones
> > supports it the way it is written. :)
> >
> > You might want to take a look at "pushlet" (http://www.pushlets.com/)
> > which may
> > help you get going quickly.
> >
> > Hope about things help you.
> >
> >
> > Regards,
> > D
> >
> > --- "Andrew.du" <[EMAIL PROTECTED]> wrote:
> >
> > > Can somebody tell me server push?
> > >
> > > --
> > > [EMAIL PROTECTED]
> > >
> >
> >
> >
> >
> > __
> > Start your day with Yahoo! - Make it your home page!
> > http://www.yahoo.com/r/hs
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> [EMAIL PROTECTED]
>
>

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



RE: session trakking in jsp or in Bean

2006-01-12 Thread marju jalloh
Thanks
  I know all about java session.What I mean is implementing session in jsp or 
in bean which one is advisable

Fredrik Rubensson <[EMAIL PROTECTED]> wrote:   

> Marju wrote:
>  I want to track a session of an input a user enter in my jsp page.The
jsp page 
>is using a bean to execute sql queries.That works wel.
>  
>  My question is it advisable to track the session in the jsp page or
in the 
>Bean.Which is better

I am not sure I follow you here. There is a session object you can get
from the request that makes it possible tostore data through several
request in the same session. request.getSession().setAttribute("akey",
anObject) to set session attributes.
request.getSession().getAttribute("akey") to get attributes. If you have
users that log in and out you probably should set some user identifying
info in the session and a filter to makes sure that the user is logged
in for certain requests. 

Regards,
Fredrik

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





-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.

Re: problem of setting up ssl in tomcat 5.5.9

2006-01-12 Thread Siddhartha Mehta
I am not sure if anyone has replied to you on this..
   
  At least from what I understand, the error below means is that the 
certificate file server.pem is not found as specified in the server.xml 
(configuration file) entry.
   
  You will find the server.xml file in the conf folder (under tomcat installed 
directory) and search for server.pem. Then verify if the path that is specified 
in server.xml to server.pem is valid or not. See if it helps.
   
  Siddhartha

zhou jian <[EMAIL PROTECTED]> wrote:
  Jan 11, 2006 2:59:44 PM
org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 11, 2006 2:59:44 PM
org.apache.tomcat.util.net.puretls.PureTLSSocketFactory
init
INFO: Error initializing SocketFactory
java.io.FileNotFoundException: server.pem (No such
file or directory)
at java.io.FileInputStream.open(Native Method)
at
java.io.FileInputStream.(FileInputStream.java:106)
at
java.io.FileInputStream.(FileInputStream.java:66)
at
COM.claymoresystems.ptls.SSLContext.loadEAYKeyFile(SSLContext.java:200)
at
org.apache.tomcat.util.net.puretls.PureTLSSocketFactory.init(PureTLSSocketFactory.java:134)
at
org.apache.tomcat.util.net.puretls.PureTLSSocketFactory.createSocket(PureTLSSocketFactory.java:69)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)
at
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
at
org.apache.catalina.connector.Connector.initialize(Connector.java:928)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
at
org.apache.catalina.startup.Catalina.load(Catalina.java:490)
at
org.apache.catalina.startup.Catalina.load(Catalina.java:509)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
Jan 11, 2006 2:59:44 PM
org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.IOException: server.pem (No such file or
directory)
at
org.apache.tomcat.util.net.puretls.PureTLSSocketFactory.init(PureTLSSocketFactory.java:149)
at
org.apache.tomcat.util.net.puretls.PureTLSSocketFactory.createSocket(PureTLSSocketFactory.java:69)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)
at
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)

1,1 Top


--- zhou jian wrote:

> Hello everyone,
> 
> I want to configure the SSL in tomcat5 and I
> followed
> the following instructions:
>
http://tomcat.apache.org/tomcat-5.0-doc/printer/ssl-howto.html
> 
> However, after starting the tomcat without any
> problem. 
> 
> [EMAIL PROTECTED] bin]$ ps aux | grep java
> globus4 2668 2.2 6.2 296704 64436 pts/1 S 
> 17:07 0:11 /opt/jdk1.5.0_04//bin/java
>
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
>
-Djava.endorsed.dirs=/home/globus4/jakarta-tomcat-5.5.9/common/endorsed
> -classpath
>
:/home/globus4/jakarta-tomcat-5.5.9/bin/bootstrap.jar:/home/globus4/jakarta-tomca
> globus4 3137 0.0 0.0 3580 636 pts/1 S 
> 17:15 0:00 grep java
> 
> However, I could access with https://localhost:8443.
> I
> am using jdk1.5.0_04. The only step I skipped is
> JSSE.
> Do you have any ideas?
> 
> Thanks,
> --Paul
> 
> 
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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

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

  



-
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!

Tomcat error???

2006-01-12 Thread Junem Albert REpollo
  hi.
   
  i have this _javascript which writes a file into a specified directory. it 
works well outside the tomcat 5.x server. (Put the code in a htmll file, view 
it with IE then the code works). however, if i transfer the code to the tomcat 
server, i get an error "server doesnt support automation of object" what error 
is this??? how can i fix it??? here's my code:
   
  
function CreateFile(path,text){
  var fso;
  var tf;
  fso = new ActiveXObject(Scripting.FileSystemObject);
  tf = fso.CreateTextFile(path,true)
  tf.WriteLine("Scheundt");
  }
  
   
  hope i can find some solution...
   
  thanks
   
  salamat




-
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, 
whatever.

RE: session trakking in jsp or in Bean

2006-01-12 Thread Fredrik Rubensson
 

> Marju wrote:
>  I want to track a session of an input a user enter in my jsp page.The
jsp page 
>is using a bean to execute sql queries.That works wel.
>  
>  My question is it advisable to track the session in the jsp page or
in the 
>Bean.Which is better

I am not sure I follow you here. There is a session object you can get
from the request that makes it possible tostore data through several
request in the same session. request.getSession().setAttribute("akey",
anObject) to set session attributes.
request.getSession().getAttribute("akey") to get attributes. If you have
users that log in and out you probably should set some user identifying
info in the session and a filter to makes sure that the user is logged
in for certain requests. 

Regards,
Fredrik

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



Re: Tomcat integegrated with Apache

2006-01-12 Thread Rafal Zawadzki
### Pete Alvin <[EMAIL PROTECTED]> wrote message to Tomcat Users List 
 ###
### this is reply for: RE: Tomcat integegrated with Apache ###
> I'm using Tomcat 5.5.  I want to keep it simple.  It always seems to
> take me 2 days of anguish to get Apache/Tomcat working together.
>
> Is it now unnecessary to hook it up to Apache?  I need to also serve
> images and static HTML files.  Is that  efficient if I use Tomcat?

it depends on you traffic. you can always use it with squid.


-- 
Rafał Zawadzki
Deploy/Release Manager
eo Networks Sp. z o.o.


pgpu658uON2Cv.pgp
Description: PGP signature


info required about no of connections..

2006-01-12 Thread babji
Hi
i have some doubt in tomcat deployment, can some one clear that

I have one web appliation that i deployed in the tomcat and running fine. it 
uses login, and all the valid users will login and use the site. it contains 10 
servlets each will do one kind of job based on the user request.

No my question is how many user can login and open session in tomcat at a given 
point of time. is there any restriction for that? if yes can we configure that 
and where?. second one is at a given point of time how many sessions can access 
one servlet. I belive if a user asks servlet to process request it will create 
a thread for that reuest. so how many session can conact a servlet at a time to 
process the same request.

Kindly help me get clear in this.

thanks and regs,
bangs

session trakking in jsp or in Bean

2006-01-12 Thread marju jalloh
 Hi
  I want to track a session of an input a user enter in my jsp page.The  jsp 
page is using a bean to execute sql queries.That works wel.
  
  My question is it advisable to track the session in the jsp page or in the 
Bean.Which is better
  
  Thanks in advance
  


-
Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your hands ASAP.