Hijacking the coyote connector

2005-10-11 Thread Dobbins, Michael G
In tomcat 5.0.28, we were able to replace the coyote connector using a
"className" setting in the connector in server.xml.  In tomcat 5.5.9 it
looks like "className" is ignored.  Looking at the source, it looks like
the Connector is hardcoded in.  Is this the case or am I missing
something?

My next attempt, I repackaged our connector to replace the
org.apache.catalina.connector package and put that in the
-Xbootclasspath to override the released version.  With -verbose:class
set I can see my Connector being loaded, but the next class loaded is
java/lang/reflect/InvocationTargetException and the JVM terminates.  The
documentation says that this is used to wrap an exception when a method
or constructor is called by reflection.  As I said above it looks to me
like the constructor is called directly not via reflection.  Am I
missing something obvious?

I know that using the AJP connector is a cleaner way, but we estimate
the serialization overhead will cost us about 5% on our platform.

Thanks
mike

 

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



Re: useBeans problem

2005-10-05 Thread Michael Pope
Ok i found two other installations of JDK on the machine.  I'm going to 
make sure that the only JDK i have installed on here is JDK1.5.0_p2



Michael



Caldarale, Charles R wrote:

From: Michael Pope [mailto:[EMAIL PROTECTED] 
Subject: useBeans problem


I'm new to JSP and still getting used to the environment. 
I'm using FreeBSD5.4, Jakarta tomcat 5.5.9 with JDK 1.5.0_p2


When I try to use Beans it comes up with the error:
javax.servlet.ServletException: UserData (Unsupported 
major.minor version 49.0)
   



This would seem to indicate that you're not really using JDK 1.5, since
version 49 class files are those generated and loaded by 1.5.  Looks
like you have a 1.4 installed somewhere.  Either that, or you're using a
very picky and outdated classloader somehow...

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



useBeans problem

2005-10-05 Thread Michael Pope
I'm new to JSP and still getting used to the environment. 
I'm using FreeBSD5.4, Jakarta tomcat 5.5.9 with JDK 1.5.0_p2


When I try to use Beans it comes up with the error:

*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

javax.servlet.ServletException: UserData (Unsupported major.minor version 49.0)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.UnsupportedClassVersionError: UserData (Unsupported major.minor 
version 49.0)
java.lang.ClassLoader.defineClass0(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:537)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1629)

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:850)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1299)

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)

org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1210)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
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.9 logs._




Here are my files:



   What's your name? 
   What's your email address? 
   What's your age? 
   









Continue



//UserData.java
import java.io.Serializable;

public class UserData implements Serializable {

   String username;
   String email;
   int age;

   public void setUsername( String value ){
   username = value;
   }

   public void setEmail( String value ){
   email = value;
   }

   public void setAge( int value )  {
   age = value;
   }

   public String getUsername() { return username; }
   public String getEmail() { return email; }
   public int getAge() { return age; }
}






You entered
Name: <%= user.getUsername() %> 
Email: <%= user.getEmail() %>
Age: <%= user.getAge() %>



My environment variables are:
JAVA_HOME=/usr/local/jdk1.5.0; export JAVA_HOME
CATALINE_HOME="/usr/local/jakarta-tomcat5.5"; export CATALINE_HOME
CATALINE_BASE="/usr/local/jakarta-tomcat5.5"; export CATALINE_BASE
CATALINE_TMPDIR="/usr/local/jakarta-tomcat5.5/temp"; export CATALINE_TMPDIR
CLASSPATH="/usr/local/jakarta-tomcat5.5/webapps/ROOT/jsptut/WEB-INF/classes:/usr/local/jakarta-tomcat5.5/webapps/ROOT/WEB-INF/classes:/usr/local/jakarta-tomcat5.5/common/lib/servlet-api.jar:/usr/local/jakarta-tomcat5.5/common/lib/jsp-api.jar:.";export 
CLASSPATH


I've compiled UserData.java with the following command:
$ javac UserData.java

and stored the class in the directory: 
/usr/local/jakarta-tomcat5.5/webapps/ROOT/WEB-INF/classes


Why am I getting this error?
How do I get a simple javabean example working with JSP under tomcat?


-- Michael

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



VS: isapi_redirector and danish chars

2005-09-27 Thread Michael Salmon
Hi Mark,

Tomcat 5.5.9 and redirector 1.2.14 running on Win2000.


/Michael

-Oprindelig meddelelse-
Fra: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sendt: 26. september 2005 22:42
Til: Tomcat Users List
Emne: Re: isapi_redirector and danish chars

Michael Salmon wrote:
> Hi everybody
> 
>  
> 
> I have a problem with Isapi_redirector and danish chars. I have a
webapp
> downloading files with special Danish chars in the filename.
Everything
> woks fine when Tomcat is doing the hole show, but when I do the same
> thing through IIS and isapi_redirector I get and error.
> 
>  
> 
> Any help would be appreciated.

Some version numbers would be a start...



-
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: Why doesn't my context work?

2005-09-26 Thread Michael Sullivan
On Sun, 2005-09-25 at 23:21 -0700, Mark Eggers wrote:
> --- Michael Sullivan <[EMAIL PROTECTED]> wrote:
>  
> > Right now I use symlinks
> > to my individual
> > users' website directories, but now that I've
> > discovered Alias I'll
> > probably switch completely to using Aliases.
> 
> Good.  
> > I
> > created a test Alias
> > point to the ~/webspace/webapps directory in my
> > personal account, but I
> > can't seem to JkMount it, and I can't figure out
> > why.  Here is the
> > mod_jk portion of my httpd.conf file:
> > 
> > #mod_jk stuff
> > 
> > LoadModule jk_module
> > modules/mod_jk.so
> > 
> > JkMount /*.jsp wrkr
> 
> I think your JSP JkMount line will only get
> /*.jsp.  It won't match /*/*.jsp. 
> I think you'll need another line in there that says:
> 
> JkMount /*/*.jsp wrkr
> 
> > JkMount /servlet/* wrkr
> 
> You will probably have the same issue with the servlet
> matching.  Try this instead:
> 
> JkMount /*/servlet/* wrkr
> 
> Good idea here.
> 
> > # Deny direct access to WEB-INF
> > 
> >AllowOverride None
> >deny from all
> > 
> 
> Good start.
> 
> > Alias /michael /home/michael/webspace/webapps
> 
> I would probably change some of the Directory
> directives.  Since this lives outside your normal
> DocumentRoot, this Directory is not going to inherit
> the permissions you gave to DocumentRoot.
> 
> Something like the following might work better:
> 
> 
>   Options Indexes
>   Allow Override None
>   Order allow,deny
>   Allow from all
> 
> 
> > 
> > Options FollowSymLinks
> > AllowOverride None
> > 
> 
> I tend to put the Directory and Aliases before the
> JkMount statement, if I do that, then I can do the
> following:
> 
> Alias /michael /home/michael/webspace/webapps
> 
>   Options Indexes
>   Allow Override None
>   Order allow,deny
>   Allow from all
> 
> 
> JkMount /michael/*.jsp wrkr
> JkMount /michael/*/*.jsp wrkr
> JkMount /michael/*/servlet/* wrkr
> 
> Finally, make sure the user Tomcat is running as has
> read access to everything in
> /home/michael/webspace/webapps.
> 
> If there are a lot of applications, you can group all
> the  directives, followed by all the Alias
> directives, followed by all the JkMount statements.
> 
> Another way to organize your httpd.conf file is by
> application.  In other words, for each application:
> 
> 
>   # directory directives
> 
> Alias / /
> JkMount //*.jsp 
> JkMount //servlet/* 
> 
> I'm away from my system right now, but I think either
> of these methods should work fine.
> 
> The ugly thing about doing it this way is that every
> time you add a new user, you'll have to update Apache,
> which means you'll have to stop and start the server.
> 
> If you could get the user directory idea to work, then
> everything would just "happen".
> 
> HTH
> 
> /mde/


Here is my updated mod_jk section in /etc/apache2/httpd.conf:

#mod_jk stuff

LoadModule jk_module         modules/mod_jk.so

JkMount /*.jsp wrkr
JkMount /*/*.jsp wrkr
JkMount /servlet/* wrkr
JkMount /*/servlet/* wrkr
# Deny direct access to WEB-INF

   AllowOverride None
   deny from all

Alias /michael /home/michael/webspace/webapps

Options Indexes
AllowOverride None
Order allow,deny
Allow from all


JkMount /michael/*.jsp wrkr
JkMount /michael/*/*.jsp wrkr
JkMount /michael/*/servlet/* wrkr


It still doesn't work.  Everything in the directory tree from /home
to /home/michael/webspace/webapps/colors.jsp is all readable/executable.
I don't know why this isn't working.  www.espersunited.com/index.jsp
still works though, but www.espersunited.com/michael/colors.jsp gives me
Tomcat 404.


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



isapi_redirector and danish chars

2005-09-26 Thread Michael Salmon
Hi everybody

 

I have a problem with Isapi_redirector and danish chars. I have a webapp
downloading files with special Danish chars in the filename. Everything
woks fine when Tomcat is doing the hole show, but when I do the same
thing through IIS and isapi_redirector I get and error.

 

Any help would be appreciated.

 

 

Regrads

Michael Salmon



Re: Why doesn't my context work?

2005-09-25 Thread Michael Sullivan
On Fri, 2005-09-16 at 19:31 -0700, Mark Eggers wrote:
> 
> --- Michael Sullivan <[EMAIL PROTECTED]> wrote:
> 
> > OK.  For clarification I am running
> > tomcat-5.0.27-r6.  I want user's
> > tomcat files to be read from
> > /home/*/webspace/webapps.  My personal
> > account is michael so my personal tomcat directory 
> > would
> > be /home/michael/webspace/webapps .  Just for the
> > sake of arguments I
> > created a directory called user under
> > /home/michael/webspace/webapps and
> > moved my jsp files into it.
> > My /opt/tomcat5/conf/Catalina/localhost/user.xml
> > file looks like this
> > now:
> > 
> >  > docBase="/home/michael/webspace/webapps/user"
> > debug="0" privileged="true">
> > 
> 
> You don't need privledged="true", so let's remove
> that.
> 
> > I restarted Tomcat.  I am using mod_jk and when I go
> > to
> > www.espersunited.com/index.jsp I see the Tomcat
> > start page.  However,
> 
> Good, you're using mod_jk.  You will need to do some
> Apache configuration in order for this to work.
> 
> I am going to assume that /home/* lies outside of the
> DocumentRoot directory tree.
> 
> 1. Get Apache to recognize web directories outside of
> the DocumentRoot tree.  There are several ways of
> doing this.  One such way is given in the actuall
> httpd.conf file that comes with the stock Apache.
> 
> Basically you need to give a set of Directory
> directives that give Apache access to the material in
> the home directories.
> 
> If you use the userdir_module in Apache, then
> ~username/ will become a part of the web
> space (if you take the comments out).
> 
> If you do this by hand, you'll need to give both
> Directory directives and an Alias directive to move it
> into the web space that Apache serves.
> 
> 2. Once you do that, you'll need to add JkMount
> statements as well.  I suspect that JkMount statements
> will respond to Alias directives since JkMount deals
> with web space and not directories.
> 
> I don't know if JkMount interacts with the
> userdir_module.  In other words, I don't know what
> will happen if you put in a JkMount statment that
> reads:
> 
> JkMount /~*/*.jsp tomcat
> 
> It would be interesting to find out if that would end
> up mapping to /~//*.jsp where
>  is the user name and  is the
> value of UserDir.
> 
> 3. Once you do that, it's always nice to make a small
> WEB-INF/web.xml, even for plain jsp pages.  Something
> like the following should work:
> 
> 
>  "-//Sun Microsystems, Inc.//DTD Web Application
> 2.3//EN"
>  "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> Beginning JSP
> Container for quick
> jsptests
> 
>   index.jsp
> 
> 
> 
> Sorry for the wrapping.
> 
> In short, you need to do the following three steps.
> 
> 1. Make sure your Apache server knows about
> directories outside of DocumentRoot.  Use Directory
> and Alias directives or userdir_module.
> 
> 2. Use JkMount to map the expected incoming URLs to
> the Tomcat server.  Experiment to see if JkMount picks
> up on the substitutions done by userdir_module.
> 
> 3. Make a small WEB-INF/web.xml with the appropriate
> structure.  Creating a proper web application is
> useful, especially once you start adding servlets to
> the mix.
> 
> /mde/
> 


I've been wrestling the past week with the hassles of upgrading to
Apache-2.0.54-r31 on my Gentoo system.  I think I've finally got
everything working the way it's supposed to except mod_jk for my user
directories.  I tried to do the userdir thing you suggested, but I
couldn't get it to work.  Right now I use symlinks to my individual
users' website directories, but now that I've discovered Alias I'll
probably switch completely to using Aliases.  I created a test Alias
point to the ~/webspace/webapps directory in my personal account, but I
can't seem to JkMount it, and I can't figure out why.  Here is the
mod_jk portion of my httpd.conf file:

#mod_jk stuff

LoadModule jk_module         modules/mod_jk.so

JkMount /*.jsp wrkr
JkMount /servlet/* wrkr
# Deny direct access to WEB-INF

   AllowOverride None
   deny from all

Alias /michael /home/michael/webspace/webapps

Options FollowSymLinks
AllowOverride None


I don't know if I need that  stuff - It was part of a
 block that seemed to be unecessary, so I took it out.  I
tried putting my JkMount statements inside the  block, but
when I tried to restart Apache it gave me the following error:

JkMount can not have a path when defined in a location

In /home/michael/webspace/webapps there is a file called colors.jsp.
When I navigate my browser to www.espersunited.com/michael/colors.jsp I
get the Tomcat 404 error, yet when I navigate to
www.espersunited.com/index.jsp I get the Tomcat start page.  What am I
doing wrong?


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



Re: Resizing JPEG Images

2005-09-20 Thread Michael Wirz
Hello,

This is what I use for the given problem.
I found it on the web and it fits my needs, so perhaps you'd like to use
it as well

Best wishes from near Munich, Germany,
Michael Wirz



import com.sun.image.codec.jpeg.*;
import java.awt.*;
import java.awt.image.*;
import java.io.*;

public class Thumbnail {
 
  public static void resize(String infile, String outfile, int
thumbHeight, int quality) throws Exception
  {
System.out.println("Thumbnail.resize  "+infile+"  "+outfile+" 
"+thumbHeight+"  "+quality);
// load image from INFILE
Image image = Toolkit.getDefaultToolkit().getImage(infile);
MediaTracker mediaTracker = new MediaTracker(new Container());
mediaTracker.addImage(image, 0);
mediaTracker.waitForID(0);
// determine thumbnail size from WIDTH and HEIGHT

int imageWidth = image.getWidth(null);
int imageHeight = image.getHeight(null);
double imageRatio = (double) imageWidth / (double) imageHeight;
int thumbWidth = (int) ((double) thumbHeight * (double) imageRatio);
   
// draw original image to thumbnail image object and
// scale it to the new size on-the-fly
BufferedImage thumbImage = new BufferedImage(thumbWidth,
  thumbHeight, BufferedImage.TYPE_INT_RGB);
Graphics2D graphics2D = thumbImage.createGraphics();
graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
  RenderingHints.VALUE_INTERPOLATION_BILINEAR);
graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null);
// save thumbnail image to OUTFILE
BufferedOutputStream out = new BufferedOutputStream(new
  FileOutputStream(outfile));
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam param = encoder.
  getDefaultJPEGEncodeParam(thumbImage);
   
quality = Math.max(0, Math.min(quality, 100));
param.setQuality((float)quality / 100.0f, false);
encoder.setJPEGEncodeParam(param);
encoder.encode(thumbImage);
out.close();
System.out.println("Done.");
  }
 
  public static void main(String[] args) 
  {
if (args.length != 4)
{
  System.err.println("Usage: java Thumbnail INFILE OUTFILE HEIGHT
QUALITY");
  System.exit(1);
}
try
{
  resize(args[0], args[1], Integer.parseInt(args[2]),
Integer.parseInt(args[3]));
}
catch(Exception e)
{
  e.printStackTrace();
}
System.exit(0);
  }
}

>Wonder if this fits your needs, but ginp uses something similar.
>
>http://culnane.navidat.com/dc/ginp/index.jsp
>
>Features
>- Thumbnails are created and stored on the file system.
>- Pictures are sized to the browser window size to reduce bandwidth.
>
>
>Regards,
>
>Ben Kim
>Developer
>http://benix.tamu.edu
>
>-Original Message-
>From: Justin Jaynes [mailto:[EMAIL PROTECTED] 
>Sent: 20 September 2005 04:29
>To: tomcat-user@jakarta.apache.org
>Subject: Resizing JPEG Images
>
>I am accepting JPEG uploads on a website I developed in JSP and  Java Beans.
>It all runs on Tomcat.
>
>I once knew of a Java Bean that would accept a JPEG and scale and resize the
>image and save it.  I need my web-app to resize the images as it accpets
>them.
>
>That was years ago.  I can't find it any longer.  Does anyone know how or
>where I should start?  If writing my own bean would be easy using some part
>of the Enterprise Java SDK, please point me in the right direction and I'll
>do the work.
>
>I am using the lates version of the JDK.
>
>Thanks,
>
>Justin
>
>
>   
>
>
>---------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>


-- 
abs IT Service GmbH
abs Gruppe
Michael Wirz
Entwicklung

Landsberger Straße 57
82266 Stegen am Ammersee
Telefon: +49 (0)8143 999 43
Telefax: +49 (0)8143 999 49

[EMAIL PROTECTED]
www.eFonds24.de


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



Re: Cannot forward after response has been committed

2005-09-19 Thread Michael Lai
I put a 'return' statement after every 'forward' statement in all my jsp 
pages and now it seems to be working.  Thanks for your feedback.


Actually, my linebreak occurs in the <% %> tags.  I think my email 
client might have reformatted my output before sending.


[EMAIL PROTECTED] wrote:


You want the line breaks, either line-feed or carriage-return, line-feed
to occur within the java or jsp code, not within the html code.
Sometimes the html is buffered and ignored when something else puts out
headers or such.

Within HTML, line breaks do not matter much
Before HTML, any line break implies that HTML has started and you can get
default headers without doing anything.
Within JSP or Java, line breaks do not matter much.

Choice of uglies.
<%@ page ...
%><% code here

<%@ page ... %><%
code here

<%@ page %>
---there is here the line break of the above line---
<% at this point the response has been committed by outputting the above
\r\n or whatever



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



Re: Cannot forward after response has been committed

2005-09-19 Thread Michael Lai

I have an index.jsp page that checks a user's access level:

<%@ page language="java" errorPage="" %>
<%
String userid = (String)session.getAttribute("UserId");

if (userid == null) {
  pageContext.forward("login.jsp");
} else {
  String access = (String)session.getAttribute("Access");

  switch (access.charAt(0)) {
 case 'A':
pageContext.forward("admin/index.jsp");
 case 'R': case 'W':
pageContext.forward("db/index.jsp");
 default:
pageContext.forward("login.jsp");
  }
}
%>

And yet the above page works even with the <%@ page language="java" %> 
line.  I don't understand why the above code works but the doesn't work 
for another page.


What do you propose -- that I remove the <%@ page... %> line?

[EMAIL PROTECTED] wrote:


Actually, the line end after the first line is sent back to the client,
with apropriate html headers invented.
<%@ page language="java"%><%    // now the line end is in java not in html

Yep, looks ugly.
What is even worse is code that sends a redirect and does NOT do a return.

-Original Message-
From: Michael Lai [mailto:[EMAIL PROTECTED]
Sent: Monday, September 19, 2005 10:17 PM
To: Tomcat Users List
Subject: Cannot forward after response has been committed


I have a jsp page that processes a login.  The (simplified) code is 
something like this:


<%@ page language="java"%>
<%
String userid = request.getParameter("userid");
String pw = request.getParameter("pw");

/* code to check user id and password */

if (user not found)
  pageContext.forward("login.jsp");
else
  pageContext.forward("userpage.jsp");
%>

Please note that nowhere in my jsp code do I use the "out" object or 
send some outputs back to the client.  Yet, I am getting this "Cannot 
forward after response has been committed" error.  If I comment out the 
forward statements then the error disappears.  Any help is appreciated.




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



Cannot forward after response has been committed

2005-09-19 Thread Michael Lai
I have a jsp page that processes a login.  The (simplified) code is 
something like this:


<%@ page language="java"%>
<%
String userid = request.getParameter("userid");
String pw = request.getParameter("pw");

/* code to check user id and password */

if (user not found)
  pageContext.forward("login.jsp");
else
  pageContext.forward("userpage.jsp");
%>

Please note that nowhere in my jsp code do I use the "out" object or 
send some outputs back to the client.  Yet, I am getting this "Cannot 
forward after response has been committed" error.  If I comment out the 
forward statements then the error disappears.  Any help is appreciated.


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



Re: Why doesn't my context work?

2005-09-16 Thread Michael Sullivan
> >From the documentation for Tomcat 5.5.9 at
> http://localhost:8080/tomcat-docs/config/context.html:
> 
> The Document Base (also known as the Context Root) 
> directory for this web application, or the pathname
> to the web application archive file (if this web
> application is being executed directly from the WAR 
> file). You may specify an absolute pathname for this 
> directory or WAR file, or a pathname that is relative 
> to the appBase directory of the owning Host.
> 
> If you've not changed server.xml, then the appBase is
> $CATALINA_HOME/webapps.
> 
> Rather than using a combination of appBase and docBase
> 
> in your context file (and I don't think appBase is
> appropriate in a context node - at least in 5.5.9),
> you could use an absolute path for docBase:
> 
> /home/michael/webspace/webapps/user
> 
> This means that the following URL would potentially
> work.
> 
> www.espersunited.com/user/index.jsp
> 
> The next issue is one of permissions.  If you're on a
> UNIX machine, make sure that 
> 
> /home/michael/webspace/webapps/user
> 
> is readable by the owner of the process running
> Tomcat.  Otherwise you'll not be able to serve the
> files.
> 
> Finally, I notice that you're going directly at this
> URL:
> 
> http://www.espersunited.com/user/index.jsp
> 
> Unless your Tomcat is configured to run on port 80,
> you will be hitting any web server that is running,
> and not your Tomcat server.  By default, Tomcat serves
> http on port 8080.
> 
> In order to get Tomcat and Apache talking, you'll have
> to do a lot more work.  This involves getting mod_jk
> (or mod_proxy) built and installed, configuring Apache
> httpd.conf, workers.properties, and possibly
> server.xml (although the default server.xml already
> has the ajp 1.3 connector configured).
> 
> I hope that starts you down a more productive path.
> 
> /mde/
> 
> __

OK.  For clarification I am running tomcat-5.0.27-r6.  I want user's
tomcat files to be read from /home/*/webspace/webapps.  My personal
account is michael so my personal tomcat directory  would
be /home/michael/webspace/webapps .  Just for the sake of arguments I
created a directory called user under /home/michael/webspace/webapps and
moved my jsp files into it.
My /opt/tomcat5/conf/Catalina/localhost/user.xml file looks like this
now:





I restarted Tomcat.  I am using mod_jk and when I go to
www.espersunited.com/index.jsp I see the Tomcat start page.  However,
when I go to www.espersunited.com/user/index.jsp I get Tomcat 404
Resource Not Available for /user/index.jsp .  You reprinted the
paragraph from the Tomcat documentation and it made the same amount of
sense to me as it did when I read it in the Tomcat docs:  Basically
none.  I've taken the path and appBase attributes out of the my Context
tag as you see above.  The entire tree from /home/michael/webapps to the
files in /home/michael/webapps/user have been set chmod 755 (owner all,
group and others read/execute), and it still doesn't work.  Any other
ideas?  I haven't changed /opt/tomcat5/conf/server.xml at all...


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



Why doesn't my context work?

2005-09-16 Thread Michael Sullivan
I wrote in yesterday asking about how to map certain directories to
tomcat contexts.  When nobody answered me I did some Google research.  I
didn't find much that made sense to me.  I prefer man and info pages to
what I found.  Anyway, I created a file called home.xml
in /opt/tomcat5/conf/Catalina/localhost.  I made home.xml by copying
admin.xml and altering it.  Here are the contents of home.xml:





If I understand this correctly, when I ask for
www.espersunited.com/user/index.jsp, Tomcat should deliver to my browser
the contents of /home/michael/webspace/webapps/index.jsp.  I restarted
Tomcat and went to www.espersunited.com/user/index.jsp in my browser.  I
got a Tomcat 404 Resource Not Available error.  Why?  Do I not have the
syntax of my context tag right?  I would think that this would be a
pretty basic thing to do, but maybe not since no one has answered me.
What should I do?  I've looked over the Tomcat docs on the
jakarta.apache.org/tomcat website and as I said there are no man or info
pages...


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



RE: Please take my address out of your mailing list !

2005-09-16 Thread Michael Sullivan
On Fri, 2005-09-16 at 09:00 +0200, Jan Fredrik Fallsen wrote:
> place the url below in the "to" field and send it
> 
> [EMAIL PROTECTED]
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Sent: 16. september 2005 08:40
> To: Tomcat Users List
> Subject: Please take my address out of your mailing list !
> 
> Dear who-ever
> 
> every day I get more than 50 mails from people I don't know. I don't even
> know, what  tomcat means (is it a plane?).
> 
> COULD YOU PLEASE TAKE MY NAME OUT OF YOUR DISTRIBUTION LIST?
> 
> Thank you very much!
> 
> francesca villa hänni
> _
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material.  Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited.   If you received
> this in error, please contact the sender and delete the material from any
> computer.

Unsubscribe information is at the bottom of every email to this list...


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



How to define paths to inidividual user directories

2005-09-15 Thread Michael Sullivan
I've recently installed Tomcat and linked it to Apache with the mod_jk
connector.  It seems to be working - I can type a filename.jsp script
and save it in a file in /opt/tomcat5/webapps/ROOT and then navigate to
www.espersunited.com/filename.jsp and it works.  I have a number of
users at espersunited.com.  Each of these users has under their user
accounts a directory called ~/webspace/html.  Here they put their static
(and .PHP) web site files.  I would like to create a ~/webspace/tomcat
directory under each of their accounts for .jsp and/or servlet files,
but I'm not sure exactly how to map this with Tomcat.  I find Tomcat
mapping very confusing.  Can anyone help me with this?
-Michael Sullivan-


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



Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-14 Thread Michael Lai

KEREM ERKAN wrote:


OK, start with downloading and installing a binary version of Tomcat for
your OS and also download the 1.2.10 version of mod_jk. I think we should
handle the rest off list not to bother the list anymore.



Just to give you another option if you like.  I don't even use mod_jd.  
I make use of Apache's reverse proxy feature.  In my httpd.conf, I add 
the following lines in my virtual host:


ProxyPass /app http://localhost:8081/
ProxyPassReverse /app http://localhost:8081/

Just make sure you have loaded the following modules:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so

What the above does is when Apache sees an url like:

http://www.myhost.com/app

It passes all traffic to tomcat which is listening to port 8081 (on the 
same machine).  The beauty of this is that you can put this in your 
ssl.conf too and Apache will handle all encrypted traffic and passes it 
on to tomcat.  The only advantage I see from mod_jk is if you are using 
it for load balancing too.



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



Re: How to serve just JSP (was: Re: JSP on RHEL4 with Apache httpd RPM?

2005-09-14 Thread Michael Lai

Peter Flynn wrote:

If you have a tomcat webapp that serves jsp's such as 
http://localhost:8080/mywebapp, then you can map jsp requests to that 
webapp using JkMount /mywebapp/*.jsp
   



Ah...this exposes the gap in my understanding.
Where do I get a "tomcat webapp that serves jsp's"? 
This is what I need. I thought one was built into Tomcat -- in fact I

thought JSP serving was the original purpose of Tomcat.

If Tomcat doesn't have any such webapp, where do I get one?
I certainly can't write one, as I'm not a Java programmer.



I am limited in my knowledge of tomcat but from my understanding, tomcat 
can be ran either as a standalone server or behind a webserver.  In your 
case, it seems like you don't actually need a webserver in front so you 
should be able to connect to tomcat using the url:


http://localhost:8080/

Just make sure in your server.xml that you have this line:



or whatever port you want to connect to.  In fact, I don't think you 
even need mod_jk if you are using tomcat as a standalone.


Hope that helps.

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



Cannot connect to database using DataSource

2005-09-14 Thread Michael Lai
I have a MySQL database in which I created a database named, javatest, 
and I am using Tomcat 5.5.9.  I have unable to connect my database using 
Java's DataSource method.  Here is my ROOT.xml setup for my application 
context:



   
   

username
javauser


password
javadude


driverClassName
com.mysql.jdbc.Driver


url

jdbc:mysql://localhost/javatest?autoReconnect=true


   


I created a simple servlet to test the database connection:

public class TestSQL extends HttpServlet {
   private Connection conn = null;

   public void doGet(HttpServletRequest request,
 HttpServletResponse response) throws IOException, 
ServletException {
  
   response.setContentType("text/html");

   PrintWriter out = response.getWriter();

   try {
   Context ctx = new InitialContext();
   Context appContext = (Context)ctx.lookup("java:comp/env");
   DataSource ds = (DataSource)appContext.lookup("jdbc/DBTest");
   conn = ds.getConnection();
   } catch (Exception e) {
   e.printStackTrace();
   }
  
   if (conn != null) {

   out.println("Connection successful");
   } else {
   out.println("Unsuccessful");
   }
}

It prints out "Unsuccessful".  I also tried using the traditional 
DriverManager and that works.  Here is my web.xml in case it is needed 
for analysis:



http://java.sun.com/xml/ns/j2ee"; >
 
 jdbc/DBTest
 javax.sql.DataSource
 Container
 

 
   TestSQL
   TestSQL
 
 
   TestSQL
   /servlet/TestSQL
 


I would appreciate it very much if someone can have a look at this and 
tell me what I am doing wrong with the DataSource alternative.


Michael.

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



Re: Where to put context.xml?

2005-09-13 Thread Michael Lai

Caldarale, Charles R wrote:


To again quote from the Tomcat doc for the path attribute of the
 element:

"The value of this field must not be set except when statically defining
a Context in server.xml, as it will be infered [sic] from the filenames
used for either the .xml context file or the docBase."

Also note that placing  tags is server.xml is strongly
discouraged.



OK, I took out "/ROOT" from the path field and it still works.  But the 
context file must still be named ROOT.xml.  The application fails to 
work with any other filename.


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



Re: Where to put context.xml?

2005-09-13 Thread Michael Lai

Allistair Crossley wrote:


Hi,

The docBase is just the folder where your web applications are located. You 
need to have a folder in applications for your web application. For the empty 
path application this is /ROOT.

Thus




Means a folder at

/home/tomcat/applications/ROOT/META-INF/context.xml



Thanks, it works now.  I used your first method instead.

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



Re: Where to put context.xml?

2005-09-13 Thread Michael Lai

Allistair Crossley wrote:


Nearly. Rename your file ROOT.xml and a path of /ROOT and you're away. The 
other alternative is create in your web application folder META-INF/context.xml

Allistair



Thank you for your prompt replay, Allistair.  I choosed the second 
option and created the META folder.  So I now have:


/home/tomcat/applications/META-INF/context.xml

And my context.xml shows:




I restarted tomcat but with the same effect.  Is there some other 
configuration that I have to modify to inform tomcat that I have a 
project in this folder?


Michael.

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



Where to put context.xml?

2005-09-13 Thread Michael Lai
This is probably an obvious question to most but I am new with tomcat 
5.5 so I am still trying to figure things out.  I want to create a web 
project with the document base in /home/tomcat/applications as opposed 
to the normal webapps folder.  This is what I have in my server.xml:




 
   
   
 

 
   

   
 
 
   
 
   
  
 



It works when I point my browser to http://www.myhost.com:8081/ and it 
shows a customized welcome page from my index.jsp.  However, as I 
understand it,  should now be in its own xml file.  I extracted 
the  content and placed it in context.xml.  I placed 
context.xml in $CATALINA_HOME/conf/Catalina/localhost, restarted tomcat 
but now the browser shows nothing.  I also tried placing it in the conf/ 
folder but that doesn't work either.  Where does the file go?


Thanks for any help in advance.

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



RE: Memory leak in Tomcat

2005-09-12 Thread Michael Oliver
Ingrid,

I am not on the tomcat developer committer list so my reply is just an FYI
from my own experience.

I saw unstable performance myself in a very similar deployment of Struts
applications similar to yours.  I too thought there was a memory leak and
there may be, but I don't think it is in the applications themselves.  The
behavior I saw, led me to think it was related to socket allocation as after
a period of time my system began to complain and slow down and other socket
related programs began to complain about timeouts, etc.

I found that my tomcat needed to use virtual memory to avoid out of memory
exceptions.  I added physical memory and the problems all but went away,
however it still occurs just less frequently.

I am using 

j2sdk1.4.2_09
Tomcat-5.0.28

On Windows XP Pro sp1
 


Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Ingrid Morterud Rosvall [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 12, 2005 1:00 PM
To: tomcat-user@jakarta.apache.org
Subject: Memory leak in Tomcat

Hello.

We are running an application on Tomcat 4.1.30, and java 1.4.2.

Our application is using the struts framework with jsp's, and cocoon to
render the xml's. 

There seems to be a major memory leak at startup - the application seems to
constantly be using between 40 - 45 mb of the memory. We also have some
memory leak during runtime, when users log on and starts using the
application.

So far we have not been able to find anything in our code review that will
explain these memory leaks, and when we monitor the memory used, there is no
obvious reason, nor is there any connection with how the users use our
application and the amount of memory being used. 

We would highly appreciate any help on this topic, and any tips and hints
you can provide us with. 

Ingrid and Tommy


--
I am using the free version of SPAMfighter for private users.
It has removed 4102 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!



-
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: putting files with webdav

2005-09-05 Thread Michael Oliver
Look in the /webapps/webdav/WEB-INF/web.xml

You should see where you need to uncomment things to enable writing. 


Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]

-Original Message-
From: Hugo Osorio [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 05, 2005 8:35 AM
To: tomcat-user@jakarta.apache.org
Subject: putting files with webdav

Hello everybody

looking for help, i need to use webdav component in Tomcat 5.0, i am using
FreeBSD 4.11 stable I have connected Dreamweaver, and DAV Explorer to the
http://192.X.X.X:8080/webdav it do retrieves content, and i can get files,
But.. I cannot put files on it.. it says the access is denied.. 

What do i have to do in order to change this so it permit me to transfer
files?

thank you


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



Installing JavaServer Faces

2005-09-02 Thread Michael Thomsen
Hi, could someone tell me if there is any difference between
installing any of the implementaitons of JavaServer Faces in Tomcat
and doing it in Sun's Application Server? I remember reading somewhere
that their server is based on Tomcat, so I was unsure. Any help would
be appreciated.

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



Re: errors building tomcat5 from source

2005-09-01 Thread Michael P. Soulier

Tim Funk wrote:
The location to download junit may have changed or that version might 
not be available for download. See build.properties.default for where it 
is being downloaded and change it there OR copy that entry with a valid 
URL to build.properties.


Ok. Perhaps I'm missing something, but normally when you download a 
source tarball, it's full of code that does not need additional 
downloading. This build scheme seems very odd to me, and would seem to 
play havoc with load reproduceability.


Mike

--
Michael P. Soulier <[EMAIL PROTECTED]>, 613-592-2122 x2522
Linux applications development
"...the word HACK is used as a verb to indicate a massive amount of
nerd-like effort." -Harley Hahn, A Student's Guide to Unix


smime.p7s
Description: S/MIME Cryptographic Signature


Re: errors building tomcat5 from source

2005-09-01 Thread Michael P. Soulier

Caldarale, Charles R wrote:


Just curious, but why do you want to build it from source?  Tomcat is
pure Java, so the same download works on all platforms.


I'm packaging it, and I want the source included. Besides, I was trying 
to learn to use ant, so I thought I'd try building it. Imagine my surprise.


Mike

--
Michael P. Soulier <[EMAIL PROTECTED]>, 613-592-2122 x2522
Linux applications development
"...the word HACK is used as a verb to indicate a massive amount of
nerd-like effort." -Harley Hahn, A Student's Guide to Unix


smime.p7s
Description: S/MIME Cryptographic Signature


errors building tomcat5 from source

2005-08-31 Thread Michael P. Soulier

Hi,

I didn't see this in the FAQ, so I'm asking. I'm trying to build tomcat 
5.5.9 from the source tarball on my Linux box. Unfortunately, I'm 
getting this.


downloadzip:
  [get] Getting: 
http://unc.dl.sourceforge.net/sourceforge/junit/junit3.8.1.zip

  [get] To: /home/msoulier/tomcat/file.zip
[unzip] Expanding: /home/msoulier/tomcat/file.zip into 
/home/msoulier/tomcat


BUILD FAILED
/home/msoulier/temp/jakarta-tomcat-5.5.9-src/build.xml:49: The following 
error occurred while executing this line:
/home/msoulier/temp/jakarta-tomcat-5.5.9-src/jakarta-tomcat-5/build.xml:1811: 
The following error occurred while executing this line:
/home/msoulier/temp/jakarta-tomcat-5.5.9-src/jakarta-tomcat-5/build.xml:1911: 
Error while expanding /home/msoulier/tomcat/file.zip


It fails here, as apparently this zip file is not a zip file.

Any suggestions?

Thanks,
Mike

--
Michael P. Soulier <[EMAIL PROTECTED]>, 613-592-2122 x2522
Linux applications development
"...the word HACK is used as a verb to indicate a massive amount of
nerd-like effort." -Harley Hahn, A Student's Guide to Unix


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Does Tomcat run better on Linux or Windows?

2005-08-30 Thread Michael Kleinhenz

> Is Tomcat more stable on Linux or Windows 2003? What are the pros/cons
> of using it on each platform? 

If you're planning for a high-performance high-load system, don't use
Windows 2003 Standard Edition. It has serious limitations in the TCP/IP
stack. I wasn't able to open more than ~3500 concurrent network
connections to a database cluster. The common error was "no buffer space
available".

Linux on the same machine works fine. Would be interesting if Win 2003
EE or DCE has the same limitation.

The real pain was not the limitation itself, but that is _not_
documented. The error message is listed as a common error that occurs in
many different situations. Great.

-- Michael


-- 
Michael Kleinhenz
tarent GmbH . Bahnhofstr. 13 . 53123 Bonn
fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25

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



IIS connector problem

2005-08-30 Thread Michael Dillon
I'm using Tomcat 5.5.9 and IIS 6 on a Windows 2003 machine.
 
Isapi_redirect.dll (version 1.2.14) seems to work if use a full url such
as this:
 
http://localhost/jsp-examples/index.html
 
All the various jsp examples work.
 
However, if I don't fully specify a document, such as
http://localhost/jsp-examples, I get a 404 error.  If I use
http://localhost:8080/jsp-examples things work.
 
I have [uri:/jsp-examples/*] in my workers2.properties, and I thought
that should ensure that pages would be passed to Tomcat for handling.
Unless Tomcat isn't finding (or using) my configuration file...?
 
Other (probably related) symptoms:
 
I'm not getting any information into the "isapi_redirect.log" file.  The
folder where it should be exists, and its pointer is in the registry,
but nothing is getting there...  
 
No shm.file is being created in the work folder.

Also, I'm not seeing any "isapi_redirect.dll" entries in the IIS
logfiles (which should be there if IIS is passing data onwards?).  If
this wasn't a clean installation, I'd think something else was handling
jsp requests.
 
I've been trying to see if there's a detail I've missed, but sifting
through the different howto's (for older versions) has been challenging.
 
Thanks in advance,
 
Mike
 
P.S. I installed the connector using the exe installation
(isapi_redirect-1.2.14.exe)

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



SV: Virtual Hosting with WAR files

2005-08-16 Thread Michael Salmon
Hi

I am having the same problem. I tried to use Pete's recipe, but all I get is 
the default Tomcat page. I am setting up on win2003.

Thanks


Michael

-Oprindelig meddelelse-
Fra: Pete Stevens [mailto:[EMAIL PROTECTED] På vegne af Pete Stevens
Sendt: 16. august 2005 17:07
Til: Tomcat Users List
Emne: Re: Virtual Hosting with WAR files


Try reading this,

http://www.ex-parrot.com/~pete/tomcat-vhost.html

It's a receipe for setting up tomcat to do virtual hosting and behave more
like apache with regard to virtual hosts.

Yours,

Pete Stevens

On Tue, 16 Aug 2005, Mahesh S Kudva wrote:

> Hi
>
> I have setup Tomcat+Apache2+mod_jk. I have 3 application in war files
> namely flie1.war, file2.war and file3.war. To deploy, I just put them in
> the deploy folder and access then using the urls:
> http://foo.com/file1
> http://foo.com/file2
> http://foo.com/file3
> This works perfectly for me. I want to change this to simple urls as
> follows:
> http://file1.foo.com
> http://file2.foo.com
> http://file3.foo.com
>
> I have also read the notes on Virtual hosting:
> http://jakarta.apache.org/tomcat/connectors-doc-
> archive/jk2/jk2/vhosthowto.html
>
> Even though I am not able to configure Tomcat to connect to the war files
> as requested. How do I configure tomcat to connect to the correct war
> file as requested?
>
> Any help will be appreciated.
>
> Regards & Thanks
> 
> Mahesh S Kudva
>
>
>
> ---
> Robosoft Technologies - Partners in Product Development
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--
Pete Stevens
[EMAIL PROTECTED]
http://www.ex-parrot.com/~pete/

   I'm a shareware signature!  Send $2 if you use me, $10 for a manual.

-
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: session problems: www.blahblah.com versus blahblah.com

2005-08-16 Thread Michael Teter
I guess I was hoping there was some server-level redirect.

I'm not sure how I would put the meta redirect in all my pages.  My
app is a complicated mess (my fault - my lack of skill).

The issue is that my users are clicking a PayPal "Subscribe" button,
which sends them off to PayPal.  Part of the hidden information sent
to PayPal when the user clicks that button is the return path.

So if user comes to blahblah.com, clicks the Subscribe button it sends
them to PayPal with a return path of www.blahblah.com (because that's
what I'm telling PayPal to do.)  I'm thinking now I can just look at
the URL they're at now and set my PayPal return path dynamically... If
they're here as blahblah.com, I make sure to tell the PayPal form that
the return path is blahblah.com.  If www, then return to www...

Thanks for your suggestion though.  I can even continue using PayPal's
encrypted buttons - I'll just make two buttons, one for www, and
theother for just blahblah, and display the appropriate button based
on current situation.

Still, I think I was hoping that somewhere in server.xml I could say
"all requests for blahblah.com should be mapped to www.blahblah.com."

Thanks all.

On 8/16/05, Peter Rossbach <[EMAIL PROTECTED]> wrote:
> Hey Michael,
> 
> I look inside the tomcat source and find that we don't set the cookie
> hostname attribute.
> That means that the calling client/browser must made the hostname
> handling. I also
> thing the redirect way is currently right direction.
> 
> Peter
> 
> Paul Singleton schrieb:
> 
> > Michael Teter wrote:
> >
> >> If my users come to "blahblah.com", then go away, then return, they
> >> get a new session id (for www.blahblah.com).
> >>
> >> But if they come to www.blahblah.com, leave, and return (via link from
> >> external site), they keep the same session.
> >>
> >> I finally discovered that the browser (Firefox in this case) ends up
> >> with two different session cookies - one for www.blahblah.com and one
> >> for blahblah.com.
> >
> >
> > this behaviour seems reasonable to me...
> >
> >> What's the right thing to do to solve this?
> >
> >
> > it doesn't need solving, just accepting :-)
> >
> > but assuming you want www.blahblah.com and blahblah.com
> > to behave (session-wise) like one domain, which they aren't,
> > you could redirect (client-side) from www.blahblah.com
> > (which IMHO is the redundant/obsolete/legacy domain) to
> > blahblah.com, which allocates sessions and dishes out cookies.
> >
> > i.e. www.blahblah.com is a static site which just serves e.g.
> >
> > 
> >   
> > <%= a.appTitle %>: redirection page
> > http://blahblah.com"; />
> >   
> >   http://blahblah.com')">
> > 
> >   
> > 
> >
> > NB I haven't actually *tried* this :-)
> >
> > Paul Singleton
> >
> >
> 
> 
> 
> 
> -
> 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: session problems: www.blahblah.com versus blahblah.com

2005-08-15 Thread Michael Teter
Great.

I don't mean to be a bonehead, but what's the right way to redirect
based on name?

I'm not using Apache on the front, so I don't have the mod_rewrite
(nor do I understand how to use it... yet).

On 8/15/05, Dale, Matt <[EMAIL PROTECTED]> wrote:
> 
> I'm not sure if there is a technical way to do this or not as it's the 
> browser that saves the cookie based on the current URL.
> 
> The way I would do this is to not allow the user to create a session in one 
> of them in the first place. ie, if they browse to blahblah.com then just 
> redirect them to www.blahblah.com so that whenever they are interacting with 
> the webapp.
> 
> Ta
> Matt
> 
> -Original Message-
> From: Michael Teter [mailto:[EMAIL PROTECTED]
> Sent: 15 August 2005 21:05
> To: Tomcat Users List
> Cc: [EMAIL PROTECTED]
> Subject: Re: session problems: www.blahblah.com versus blahblah.com
> 
> 
> I tried that, but it's not working.
> 
> I tried:
> 
>   www.blahblah.com
> 
> 
> and I also tried:
> 
>   blahblah.com
> 
> 
> Both ways, I still got a session cookie associated with the name the
> user entered as the address.  If the user then changed the address to
> www., it created a new session and session cookie (with the new name).
> 
> On 8/15/05, Peter Rossbach <[EMAIL PROTECTED]> wrote:
> > Hmm,
> >
> > I thing  a host alias at for your tomcat configuration was helpfull :-)
> >
> > 
> > www.blahblah.com
> >
> > 
> >
> > Peter
> >
> > Michael Teter schrieb:
> >
> > >Howdy.
> > >
> > >I'm having some problems with sessions.
> > >
> > >If my users come to "blahblah.com", then go away, then return, they
> > >get a new session id (for www.blahblah.com).
> > >
> > >But if they come to www.blahblah.com, leave, and return (via link from
> > >external site), they keep the same session.
> > >
> > >I finally discovered that the browser (Firefox in this case) ends up
> > >with two different session cookies - one for www.blahblah.com and one
> > >for blahblah.com.
> > >
> > >What's the right thing to do to solve this?
> > >
> > >Thanks much.
> > >
> > >-
> > >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]
> 
>

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



Re: session problems: www.blahblah.com versus blahblah.com

2005-08-15 Thread Michael Teter
I tried that, but it's not working.

I tried:

  www.blahblah.com


and I also tried:

  blahblah.com


Both ways, I still got a session cookie associated with the name the
user entered as the address.  If the user then changed the address to
www., it created a new session and session cookie (with the new name).

On 8/15/05, Peter Rossbach <[EMAIL PROTECTED]> wrote:
> Hmm,
> 
> I thing  a host alias at for your tomcat configuration was helpfull :-)
> 
> 
> www.blahblah.com
> 
> 
> 
> Peter
> 
> Michael Teter schrieb:
> 
> >Howdy.
> >
> >I'm having some problems with sessions.
> >
> >If my users come to "blahblah.com", then go away, then return, they
> >get a new session id (for www.blahblah.com).
> >
> >But if they come to www.blahblah.com, leave, and return (via link from
> >external site), they keep the same session.
> >
> >I finally discovered that the browser (Firefox in this case) ends up
> >with two different session cookies - one for www.blahblah.com and one
> >for blahblah.com.
> >
> >What's the right thing to do to solve this?
> >
> >Thanks much.
> >
> >-
> >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]



session problems: www.blahblah.com versus blahblah.com

2005-08-15 Thread Michael Teter
Howdy.

I'm having some problems with sessions.

If my users come to "blahblah.com", then go away, then return, they
get a new session id (for www.blahblah.com).

But if they come to www.blahblah.com, leave, and return (via link from
external site), they keep the same session.

I finally discovered that the browser (Firefox in this case) ends up
with two different session cookies - one for www.blahblah.com and one
for blahblah.com.

What's the right thing to do to solve this?

Thanks much.

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



Re: jboss-tomcat bind issue

2005-08-15 Thread Michael Tria

No firewall turned on for this test.

root:/etc/init.d $>./iptables status
Firewall is stopped.

Shouldn't Tomcat either be binding to 0.0.0.0 or 127.0.0.1?

tcp0  0 0.0.0.0:8080  0.0.0.0:* 
LISTEN  17487/java


Why is netstat showing three colons (':') instead of the localhost IP 
address (see netstat output below)?



--- Wade Chandler wrote:


Got a firewall turned on?

Wade

--- Michael Tria <[EMAIL PROTECTED]> wrote:



Please let me know if you think this e-mail belongs
on a JBoss list 
instead of this one...


Problem
===
JBoss 4.0 bundled with Tomcat 5.5, out of the box,
will not bind to port 
8080 for all interfaces.  i.e.  I can telnet to the
port from the 
localhost, but not from outside.  Please let me know
how to bind to this 
port properly.


On local machine...
telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.

On remote machine... (IP address masked slightly)
telnet 208.100.x.x
Trying 208.100.x.x...
 - this will eventually time out

Running a netstat -anp | grep 8080 shows this:
Active Internet connections (servers and
established)
Proto Recv-Q Send-Q Local Address   Foreign
Address 
State   PID/Program name
tcp0  0 :::8080 :::* 
LISTEN  17487/java


From the above, I can see that java (jboss) has a
server socket 
listening on port 8080, but the local address looks

off.

System
==
OS:Linux, Fedora Core 2
JBoss: 4.0.2 w/ Tomcat 5.5 (out of the box)
Java:  1.4.2_09

server.xml
==
Here is the relevant sections of the server.xml (out
of the box)


  ...
  
  ...


I really appreciate the help.

Thanks,
Mike
[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]



jboss-tomcat bind issue

2005-08-14 Thread Michael Tria
Please let me know if you think this e-mail belongs on a JBoss list 
instead of this one...


Problem
===
JBoss 4.0 bundled with Tomcat 5.5, out of the box, will not bind to port 
8080 for all interfaces.  i.e.  I can telnet to the port from the 
localhost, but not from outside.  Please let me know how to bind to this 
port properly.


On local machine...
telnet 127.0.0.1 8080
Trying 127.0.0.1...
Connected to 127.0.0.1.

On remote machine... (IP address masked slightly)
telnet 208.100.x.x
Trying 208.100.x.x...
 - this will eventually time out

Running a netstat -anp | grep 8080 shows this:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address   Foreign Address 
State   PID/Program name
tcp0  0 :::8080 :::* 
LISTEN  17487/java


From the above, I can see that java (jboss) has a server socket 
listening on port 8080, but the local address looks off.


System
==
OS:Linux, Fedora Core 2
JBoss: 4.0.2 w/ Tomcat 5.5 (out of the box)
Java:  1.4.2_09

server.xml
==
Here is the relevant sections of the server.xml (out of the box)


  ...
  
  ...


I really appreciate the help.

Thanks,
Mike
[EMAIL PROTECTED]


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



Re: Max thread/session timeouts

2005-08-11 Thread Michael Kleinhenz
Peddireddy,

how about your project? I have finally found a solution here ;-) If the
database handles requests faster, the load on my Tomcat(s) are lower,
because of the lower count of active threads. This does not resolve the
problem induced by the apparent connection limit on Windows 2003
Standard Edition, especially in peak situations with ~3000 active
Threads. I've got the computing centre to install Red Hat Enterprise 4
on one of the servers and voila, the errors are gone!

Admittedly, it seems that Linux is a bit slower when getting into a high
thread count, it's sufficiently fast for my project. Also, it seems
faster on low thread counts (<500). A simple servlet building a XML tree
(without any database access or other 3rd party access) runs about 30%
faster on Linux than on Windows on the same machine.

I think the slower response of Linux with high thread counts is induced
by a slower thread handling. An engineer from Red Hat will try to
optimize that tomorrow..

-- Michael


On Fri, Jul 22, 2005 at 11:23:24AM +0200, Michael Kleinhenz wrote:
> Peddireddy,
> 
> > your mail is very informative.
> > we have a very similar set up (4 Xeon processors 3.5 GB Ram and
> > WIn2003 Standard edition) and hardpart is that we cant change this
> > setup and switch to Linux. 
> 
> same problem over here. The computing centre of our client can't provide
> Linux servers. I'm struggling with this problem for 3 weeks now.
> 
> > I heard about clustering on diferent boxes. Is the process of running
> > multiple tomcats on a single machine will be same??
> 
> My experience was that with a single Tomcat on a large machine, you'll
> never use that box fully. Besides that you can't get the Sun JVM to
> accept a large amount of threads while giving them enough memory, Tomcat
> seems to have performance problems with 3000+ threads busy at the same
> time. The BEA JVM (JRockit) performs better in terms of memory and
> threads but is slower than the Sun JVM. If you have rather complex
> database operations performed by your webapp, this will get you into
> trouble, because if there is a single bottleneck in the whole system,
> the requests will pile up in the server, it hits its thread limit, and
> ceases operation.
> 
> So, I have made good experiences with 4 Tomcats on a 2xXeon with 4GB.
> The server's load is somewhere between 70% and 100% while running with
> high load and can handle more concurrent requests than a single Tomcat.
> 
> > You talked about some "workarounds using esoteric registry keys", can
> > you eloborate on this or tell me where I can get details about it and
> > the details about limitations placed by windows2003  on a single
> > process in terms of number of threads, memory etc.
> 
> We use 2003 Standard Edition and get the following limitations:
> 
>  . Windows only provides 2GB memory to all applications running,
>regardless of how much memory you have. All other memory is used for
>Windows itself. With a registry key, you can extend this to 3GB. I
>don't have the key handy, but it can be found in MSDN.
> 
>  . The somewhat larger problem is the crappy TCP stack on Windows. A
>single Tomcat easily handles 1000 concurrent connections, but if I start
>4 Tomcats, I get a WSAENOBUFS error ("An operation on a socket could not
>be performed because the system lacked sufficient buffer space or
>because a queue was full") at about 3300 concurrent connections.
>Because each Tomcat runs with his own instance of the JVM, I suppose
>the problem is Windows, the network or anything else that is used by all
>Tomcats at the same time. Even worse, after such a crash, there is a
>10% chance, the Tomcats not resuming normal operation but crashes
>completely.
> 
>  . Windows has a default limit of 5000 ephemeral ports that can be used 
>fo outgoing connections. This can be changed with the MaxUserPorts
>registry key. Also, the TcpTimedWaitDelay key is relevant for network
>performance. Both are described here:
> 
>
> http://msdn.microsoft.com/library/en-us/randz/protocol/tcp_time-wait_delay.asp
> 
> I'm now really irritated by this problem. I need a capacity of about
> 15000 concurrent connections for my project. I also have 3 2xXeon
> servers here, but windows (or anything else) doesn't allow more than
> ~8000 connections until it dies.
> 
> -- Michael
> 
> -- 
> Dipl.-Technoinform. Michael Kleinhenz
> tarent GmbH . Bahnhofstr. 13 . 53123 Bonn
> fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25

-- 
Michael Kleinhenz
tarent GmbH . Bahnhofstr. 13 . 53123 Bonn
fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25

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



Strange mrf files generated in tomat temp directory

2005-07-29 Thread Holly, Michael
I am using Tomcat 4.1.29 on solaris 9.   I have files uploaded to my
site and then I write them to the temp dir using File.createTempFile()
in anticipation of moving them elsewhere. I have noticed that somthing
else is writing very larg files to this directory as well.  Some of the
files are > 3GB.  They seem to be using the same File.createTempFile()
facility because they all have a prefix followed by a 3 to 5 digit
number and then .tmp  ( mrf2393.tmp or mrf40389.tmp)   Where do these
files come from?
 
Thanks
 
Michael


Re: Max thread/session timeouts

2005-07-22 Thread Michael Kleinhenz
Peddireddy,

> your mail is very informative.
> we have a very similar set up (4 Xeon processors 3.5 GB Ram and
> WIn2003 Standard edition) and hardpart is that we cant change this
> setup and switch to Linux. 

same problem over here. The computing centre of our client can't provide
Linux servers. I'm struggling with this problem for 3 weeks now.

> I heard about clustering on diferent boxes. Is the process of running
> multiple tomcats on a single machine will be same??

My experience was that with a single Tomcat on a large machine, you'll
never use that box fully. Besides that you can't get the Sun JVM to
accept a large amount of threads while giving them enough memory, Tomcat
seems to have performance problems with 3000+ threads busy at the same
time. The BEA JVM (JRockit) performs better in terms of memory and
threads but is slower than the Sun JVM. If you have rather complex
database operations performed by your webapp, this will get you into
trouble, because if there is a single bottleneck in the whole system,
the requests will pile up in the server, it hits its thread limit, and
ceases operation.

So, I have made good experiences with 4 Tomcats on a 2xXeon with 4GB.
The server's load is somewhere between 70% and 100% while running with
high load and can handle more concurrent requests than a single Tomcat.

> You talked about some "workarounds using esoteric registry keys", can
> you eloborate on this or tell me where I can get details about it and
> the details about limitations placed by windows2003  on a single
> process in terms of number of threads, memory etc.

We use 2003 Standard Edition and get the following limitations:

 . Windows only provides 2GB memory to all applications running,
   regardless of how much memory you have. All other memory is used for
   Windows itself. With a registry key, you can extend this to 3GB. I
   don't have the key handy, but it can be found in MSDN.

 . The somewhat larger problem is the crappy TCP stack on Windows. A
   single Tomcat easily handles 1000 concurrent connections, but if I start
   4 Tomcats, I get a WSAENOBUFS error ("An operation on a socket could not
   be performed because the system lacked sufficient buffer space or
   because a queue was full") at about 3300 concurrent connections.
   Because each Tomcat runs with his own instance of the JVM, I suppose
   the problem is Windows, the network or anything else that is used by all
   Tomcats at the same time. Even worse, after such a crash, there is a
   10% chance, the Tomcats not resuming normal operation but crashes
   completely.

 . Windows has a default limit of 5000 ephemeral ports that can be used 
   fo outgoing connections. This can be changed with the MaxUserPorts
   registry key. Also, the TcpTimedWaitDelay key is relevant for network
   performance. Both are described here:

   
http://msdn.microsoft.com/library/en-us/randz/protocol/tcp_time-wait_delay.asp

I'm now really irritated by this problem. I need a capacity of about
15000 concurrent connections for my project. I also have 3 2xXeon
servers here, but windows (or anything else) doesn't allow more than
~8000 connections until it dies.

-- Michael

-- 
Dipl.-Technoinform. Michael Kleinhenz
tarent GmbH . Bahnhofstr. 13 . 53123 Bonn
fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25

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



Re: Max thread/session timeouts

2005-07-21 Thread Michael Kleinhenz

>  We're running an application on Tomcat that often hits the limit of
> 150 threads.  Can someone with experience changing this value give me
> advice on it?  How big can you make this number?  How much extra memory
> do I need if I say change it to, say, 500?  Thanks.

just a few facts on threads in Tomcat:

  . you'll need (Xss*max_threads)+Xmx+x memory in your box, where x is
the memory needed by the basic JVM tasks besides the thread space
(say, 100MB).

  . on ia32/Windows, you can only assign 1.6GB (Xmx-)memory to a single
JVM. A value above it will break the 2GB barrier and will not run.

  . you need to find the balance between max_threads and Xmx. A lower Xmx
gives you a higher max_threads and vice versa.

  . Tomcat on Windows doesn't scale well. Use multiple Tomcat instances
on one box if you have a large box. In my setup, I run 4 Tomcats on a
2xXeon system with 4GB memory. Each Tomcat gets 1000 threads and
512MB. This is _much_ faster than a single Tomcat with all
memory and 4000 threads.

  . Windows 2003 Server, at least the Standard Edition has major
limitations in both TCP connections and memory. There are some
workarounds using esoteric registry keys, but none of them works
well. Windows is a crippled desktop os that wants to be on the
server. If you want really high performance on large boxes, use
Linux (Kernel 2.6!). You even get a better administration
interface. Hate this inefficient administration-by-clicking ;-)

-- Michael

-- 
Dipl.-Technoinform Michael Kleinhenz
tarent GmbH . Bahnhofstraße 13 . 53123 Bonn
fon: +49 (228) / 52 67 5-0
fax: +49 (228) / 52 67 5-25


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



Re: java.library.path when running as a service

2005-07-13 Thread Michael Ivanov
Excellent!  You've pointed me in the right direction.  It turns out I
had PATH set correctly in the User Variables but not in System
Variables.  Works great now.  Thank you very much.

On 7/13/05, Benson Margulies <[EMAIL PROTECTED]> wrote:
> It can only be set in the system environment for all services as once.
> The tomcat service integration does not include any help in this area.
> 
> -Original Message-
> From: Michael Ivanov [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 13, 2005 12:51 PM
> To: Benson Margulies; tomcat-user@jakarta.apache.org
> Subject: Re: java.library.path when running as a service
> 
> Thank you for the reply.  I was not aware, is the PATH variable
> different for each service?  How can it be set?  This would likely be
> the cause of my problem if it's true.
> 
> On 7/13/05, Benson Margulies <[EMAIL PROTECTED]> wrote:
> > Are all your dependents in  $CATALINA_HOME\common\lib? Are you sure
> > that the PATH for the service is, indeed, including that dir? PATH
> > management for services is a pain.
> >
> > Look up -delayload in the Win32 link.exe doc, and follow from there
> > into the hooks.
> >
> >
> > -Original Message-
> > From: Michael Ivanov [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 12, 2005 10:02 PM
> > To: Benson Margulies; tomcat-user@jakarta.apache.org
> > Subject: Re: java.library.path when running as a service
> >
> > My PATH variable already includes $CATALINA_HOME\common\lib, and it
> > definitely has worked in the past.  Wouldn't this also affect Tomcat
> > launched from the command line?  My problem only occurs when Tomcat is
> 
> > a service.  Also, can you elaborate on what the delay loader hook is?
> > Thank you.
> >
> > On 7/12/05, Benson Margulies <[EMAIL PROTECTED]> wrote:
> > > Due to a bug in the JRE/JVM, your dependent DLLs have to either be
> > > in PATH or in the directory containing java.exe. My personal
> > > favorite solution to this is to use the delay loader hook to get
> around it.
> > >
> > > -Original Message-
> > > From: Michael Ivanov [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, July 12, 2005 7:13 PM
> > > To: tomcat-user@jakarta.apache.org
> > > Subject: java.library.path when running as a service
> > >
> > > I have been running a servlet with Tomcat 5.5.7 for a few months, I
> > > left it alone for a while, and now I get an UnsatisfiedLinkError
> > > when the servlet tries to load a native DLL.  The error says the DLL
> 
> > > cannot
> >
> > > be found in java.library.path.  The DLL I want to load is located in
> 
> > > $CATALINA_HOME\common\lib.  When I just run Tomcat from the command
> > > line, everything works great, no complaints.  When run as a service,
> 
> > > I
> >
> > > get this problem.  I tried setting java.library.path via the
> > > JvmOptions in service.bat, but in that case I get an
> > > UnsatisfiedLinkError which refers to dependent libraries for the
> DLL.
> > > Thanks in advance for any suggestions.
> > >
> > > Michael Ivanov
> > >
> > > Tomcat 5.5.7
> > > Windows XP
> > >
> > > 
> > > - 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: java.library.path when running as a service

2005-07-13 Thread Michael Ivanov
Thank you for the reply.  I was not aware, is the PATH variable
different for each service?  How can it be set?  This would likely be
the cause of my problem if it's true.

On 7/13/05, Benson Margulies <[EMAIL PROTECTED]> wrote:
> Are all your dependents in  $CATALINA_HOME\common\lib? Are you sure that
> the PATH for the service is, indeed, including that dir? PATH management
> for services is a pain.
> 
> Look up -delayload in the Win32 link.exe doc, and follow from there into
> the hooks.
> 
> 
> -Original Message-
> From: Michael Ivanov [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 12, 2005 10:02 PM
> To: Benson Margulies; tomcat-user@jakarta.apache.org
> Subject: Re: java.library.path when running as a service
> 
> My PATH variable already includes $CATALINA_HOME\common\lib, and it
> definitely has worked in the past.  Wouldn't this also affect Tomcat
> launched from the command line?  My problem only occurs when Tomcat is a
> service.  Also, can you elaborate on what the delay loader hook is?
> Thank you.
> 
> On 7/12/05, Benson Margulies <[EMAIL PROTECTED]> wrote:
> > Due to a bug in the JRE/JVM, your dependent DLLs have to either be in
> > PATH or in the directory containing java.exe. My personal favorite
> > solution to this is to use the delay loader hook to get around it.
> >
> > -Original Message-
> > From: Michael Ivanov [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 12, 2005 7:13 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: java.library.path when running as a service
> >
> > I have been running a servlet with Tomcat 5.5.7 for a few months, I
> > left it alone for a while, and now I get an UnsatisfiedLinkError when
> > the servlet tries to load a native DLL.  The error says the DLL cannot
> 
> > be found in java.library.path.  The DLL I want to load is located in
> > $CATALINA_HOME\common\lib.  When I just run Tomcat from the command
> > line, everything works great, no complaints.  When run as a service, I
> 
> > get this problem.  I tried setting java.library.path via the
> > JvmOptions in service.bat, but in that case I get an
> > UnsatisfiedLinkError which refers to dependent libraries for the DLL.
> > Thanks in advance for any suggestions.
> >
> > Michael Ivanov
> >
> > Tomcat 5.5.7
> > Windows XP
> >
> > -
> > 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: java.library.path when running as a service

2005-07-12 Thread Michael Ivanov
My PATH variable already includes $CATALINA_HOME\common\lib, and it
definitely has worked in the past.  Wouldn't this also affect Tomcat
launched from the command line?  My problem only occurs when Tomcat is
a service.  Also, can you elaborate on what the delay loader hook is? 
Thank you.

On 7/12/05, Benson Margulies <[EMAIL PROTECTED]> wrote:
> Due to a bug in the JRE/JVM, your dependent DLLs have to either be in
> PATH or in the directory containing java.exe. My personal favorite
> solution to this is to use the delay loader hook to get around it.
> 
> -Original Message-
> From: Michael Ivanov [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 12, 2005 7:13 PM
> To: tomcat-user@jakarta.apache.org
> Subject: java.library.path when running as a service
> 
> I have been running a servlet with Tomcat 5.5.7 for a few months, I
> left it alone for a while, and now I get an UnsatisfiedLinkError when
> the servlet tries to load a native DLL.  The error says the DLL cannot
> be found in java.library.path.  The DLL I want to load is located in
> $CATALINA_HOME\common\lib.  When I just run Tomcat from the command
> line, everything works great, no complaints.  When run as a service, I
> get this problem.  I tried setting java.library.path via the
> JvmOptions in service.bat, but in that case I get an
> UnsatisfiedLinkError which refers to dependent libraries for the DLL.
> Thanks in advance for any suggestions.
> 
> Michael Ivanov
> 
> Tomcat 5.5.7
> Windows XP
> 
> -
> 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]



java.library.path when running as a service

2005-07-12 Thread Michael Ivanov
I have been running a servlet with Tomcat 5.5.7 for a few months, I
left it alone for a while, and now I get an UnsatisfiedLinkError when
the servlet tries to load a native DLL.  The error says the DLL cannot
be found in java.library.path.  The DLL I want to load is located in
$CATALINA_HOME\common\lib.  When I just run Tomcat from the command
line, everything works great, no complaints.  When run as a service, I
get this problem.  I tried setting java.library.path via the
JvmOptions in service.bat, but in that case I get an
UnsatisfiedLinkError which refers to dependent libraries for the DLL. 
Thanks in advance for any suggestions.

Michael Ivanov

Tomcat 5.5.7
Windows XP

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



Re: Problem when a click a button that it execute a servlet "n" times

2005-07-11 Thread Michael Jouravlev
On 7/11/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> If you are not script-averse, the solution to this that I've always used
>   is to disable the button client-side before submitting the form.
> 
> It's not a perfect solution though, as there is no way to re-submit if a
> problem occurs (i.e., if it hangs for a long time... outright
> server-side errors would still occur as usual of course), but in many
> situations it's fine.  Note that PayPal is one example of a major site
> that does this.
> 
> Frank

I agree, something like this works pretty well, but you still need to
check for resubmits, if resubmitting must not be allowed at all.


  function SubmitForm(){
document.getElementById('sub').disabled = true;
document.forms['msgform'].submit();
return true;
  }



  ...
  


Michael.

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



Re: generate image by servlet for large amount of requests

2005-07-08 Thread Michael Jouravlev
On 7/7/05, Tony Smith <[EMAIL PROTECTED]> wrote:
> Let's think about maps.yahoo.com. I do not know how
> they handle
> millions of request and generate the map pictures
> quickly.

For simpler and more formal images like bar charts you can return
javascript and render image in browser.

Michael.

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



Re: Tomcat login & logout hook ?

2005-07-08 Thread Michael Echerer
Dongsheng Song wrote:
> Hello,
> 
> Can I hook a function after user login & before user logout ?

I assume that logout usually goes hand in hand with a session
invalidation, then Servlet 2.4. spec is your friend:

SRV.10.2.1 Event Types and Listener Interfaces

javax.servlet.http.HttpSessionListener


Cheers,
Michael
> 
> Dongsheng Song
> 
> -
> 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: Turning off jsessionid on URL?

2005-07-07 Thread Michael Jouravlev
See my question about two weeks ago on how to detect jsessionid in the
URL. Looks like it is not directly possible, but you can use our own
request parameter to find this out. After you detect that jsessionid
is in the URL (the harder part), make another redirect to the same
location, and URL will come clean.

Michael.

On 7/7/05, William Stranathan <[EMAIL PROTECTED]> wrote:
> Is there a configuration parameter to ONLY send the jsessionid by
> cookie, not on the URL bar?
> 
> Picture this, user goes to your site http://www.yoursite.com/yourapp
> yoursite redirects to the menu page, which gives a jsessionid.  That
> page is under an auth-constraint and requires login, so you get
> displayed the login page, but the URL you've been redirected to
> includes the jsessionid - like:
> http://www.yoursite.com/yourapp/Menu.do;jessionid=D2DC09EB64CBC7690BCEA68CA484B4C3
> User wants to share the site with their friends, so they copy/paste
> from the URL bar.  Then they log in - their session is now logged in,
> AND they have the same session ID.
> 
> And yes, this does work - I'm able to copy/paste between different
> browsers (exploder and firefox) and the session works fine.
> 
> Is there a way to turn that feature off?

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



Re: No more than 500 threads on Windows 2003?

2005-07-01 Thread Michael Kleinhenz

mmh..

"You may hear the terms "green threads" and "native threads". This
refers to the Unix implementations of Java. When Java 1.0 first
came out on Solaris, it did not use the native Solaris library
libthread.so to support threads. Instead it used runtime thread
support that had been written in Java for an earlier project
code-named "Green." That thread library came to be known as "green
threads."

"Thread support on Windows used the native libraries from the start,
but on Solaris green threads were used. That meant that threaded
programs running on Solaris didn't get the benefit of the native
libraries. In particular, if your Java program was executing on a
multi processor Solaris system, it was never the case that different
threads could execute truly in parallel by being dispatched on
different processors. There are other benefits too, to do with more
efficient mapping of I/O system calls."

-> Just Java 2, Fourth Edition, by Peter van der Linden

So Windows always uses native threads. Seems to me like a Windows system
or license limit. I have already asked tech support of the hosting
provider who installed the server, but no answer yet.

-- Michael


On Fri, Jul 01, 2005 at 11:02:44AM +0200, delbd wrote:
> I may be wrong, but as far as my knowledge goes on green threads, this is 
> just a matter of 
> dedactivating native system thread to use an internal threading / sheduling 
> system in the jvm.
> I see no reason why this wouldn't exist on windows version of jvm.
> 
> Le Vendredi 1 Juillet 2005 10:39, Michael Kleinhenz a écrit :
> > 
> > as far as I know, the concept of green and native threads only applies
> > to Unix systems...?
> > 
> > -- Michael
> > 
> > 
> > On Fri, Jul 01, 2005 at 10:44:38AM +0200, delbd wrote:
> > > Maybe you could switch the jvm to green threads ?
> > > Le Vendredi 1 Juillet 2005 09:57, Michael Kleinhenz a écrit :
> > > > 
> > > > maybe. I can't confirm, because it fails so fast, I can't take a look 
> > > > in 
> > > > the manager app to see the exact number of threads when it begins 
> > > > hanging.
> > > > 
> > > > I experienced the problem with Tomcat 5.0.28+JDK1.4.2 and Tomcat 
> > > > 5.5.9+JDK1.5.0 while my (somewhat slower) notebook can do 800+ threads 
> > > > with Debian and 5.0.28+1.4.2 without problems.
> > > > 
> > > > Seems to me like a Windows problem, but I can't find anything in the 
> > > > docs nor via Google.. ;-(
> > > > 
> > > > Windows sucks..
> > > > 
> > > > -- Michael
> > > > 
> > > > delbd schrieb:
> > > > > Just by curiosity, does it have something like '511 Threads is ok but 
> > > > > 512 fails?' :D
> > > > > Le Jeudi 30 Juin 2005 15:09, Michael Kleinhenz a écrit :
> > > > > 
> > > > >>Hi,
> > > > >>
> > > > >>I'm currently integrating a SOAP-based middleware on Tomcat (5.5.9) 
> > > > >>with
> > > > >>Sun JDK 1.5.0_02 and get into problems when using maxThreads with a
> > > > >>value greater than 500.
> > > > >>
> > > > >>Tomcat locks up completely without getting back to normal operations
> > > > >>after a while. No exception or error is reported in the logs, it just
> > > > >>stops. All connections are refused after the lockup. Tomcat has enough
> > > > >>memory (>1GB) assigned with the JVM options.
> > > > >>
> > > > >>If I use maxThreads="500", the server runs fine, but 500 is not enough
> > > > >>for my project ;-(
> > > > >>
> > > > >>I tried to increase the stack size, but this doesn't help..
> > > > >>
> > > > >>The connector is defined as:
> > > > >>
> > > > >> > > > >>   minSpareThreads="50" maxSpareThreads="150" enableLookups="false"
> > > > >>   redirectPort="8443" acceptCount="200" connectionTimeout="2"
> > > > >>   disableUploadTimeout="true"/>
> > > > >>
> > > > >>If I change 500 to 700 or more, Tomcat locks up. Is this a Windows
> > > > >>problem?? 
> > > > >>
> > > > >>Hardware is not an issue, I think.. (dual Xeon 3,4GHz, 4GB)..
> > > > >>
> > > > >>Thanks,
> > > > >>Michael
> > > > >>
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > 
> > > -- 
> > > David Delbecq
> > > Royal Meteorological Institute of Belgium
> > > 
> > > -
> > > Is there life after /sbin/halt -p?
> > > 
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > 
> > 
> 
> -- 
> David Delbecq
> Royal Meteorological Institute of Belgium
> 
> -
> Is there life after /sbin/halt -p?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Michael Kleinhenz
tarent GmbH . Bahnhofstr. 13 . 53123 Bonn
fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25

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



Re: No more than 500 threads on Windows 2003?

2005-07-01 Thread Michael Kleinhenz

as far as I know, the concept of green and native threads only applies
to Unix systems...?

-- Michael


On Fri, Jul 01, 2005 at 10:44:38AM +0200, delbd wrote:
> Maybe you could switch the jvm to green threads ?
> Le Vendredi 1 Juillet 2005 09:57, Michael Kleinhenz a écrit :
> > 
> > maybe. I can't confirm, because it fails so fast, I can't take a look in 
> > the manager app to see the exact number of threads when it begins hanging.
> > 
> > I experienced the problem with Tomcat 5.0.28+JDK1.4.2 and Tomcat 
> > 5.5.9+JDK1.5.0 while my (somewhat slower) notebook can do 800+ threads 
> > with Debian and 5.0.28+1.4.2 without problems.
> > 
> > Seems to me like a Windows problem, but I can't find anything in the 
> > docs nor via Google.. ;-(
> > 
> > Windows sucks..
> > 
> > -- Michael
> > 
> > delbd schrieb:
> > > Just by curiosity, does it have something like '511 Threads is ok but 512 
> > > fails?' :D
> > > Le Jeudi 30 Juin 2005 15:09, Michael Kleinhenz a écrit :
> > > 
> > >>Hi,
> > >>
> > >>I'm currently integrating a SOAP-based middleware on Tomcat (5.5.9) with
> > >>Sun JDK 1.5.0_02 and get into problems when using maxThreads with a
> > >>value greater than 500.
> > >>
> > >>Tomcat locks up completely without getting back to normal operations
> > >>after a while. No exception or error is reported in the logs, it just
> > >>stops. All connections are refused after the lockup. Tomcat has enough
> > >>memory (>1GB) assigned with the JVM options.
> > >>
> > >>If I use maxThreads="500", the server runs fine, but 500 is not enough
> > >>for my project ;-(
> > >>
> > >>I tried to increase the stack size, but this doesn't help..
> > >>
> > >>The connector is defined as:
> > >>
> > >> > >>   minSpareThreads="50" maxSpareThreads="150" enableLookups="false"
> > >>   redirectPort="8443" acceptCount="200" connectionTimeout="2"
> > >>   disableUploadTimeout="true"/>
> > >>
> > >>If I change 500 to 700 or more, Tomcat locks up. Is this a Windows
> > >>problem?? 
> > >>
> > >>Hardware is not an issue, I think.. (dual Xeon 3,4GHz, 4GB)..
> > >>
> > >>Thanks,
> > >>Michael
> > >>
> > > 
> > > 
> > 
> > 
> 
> -- 
> David Delbecq
> Royal Meteorological Institute of Belgium
> 
> -
> Is there life after /sbin/halt -p?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Michael Kleinhenz
tarent GmbH . Bahnhofstr. 13 . 53123 Bonn
fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25

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



Re: No more than 500 threads on Windows 2003?

2005-07-01 Thread Michael Kleinhenz

maybe. I can't confirm, because it fails so fast, I can't take a look in 
the manager app to see the exact number of threads when it begins hanging.

I experienced the problem with Tomcat 5.0.28+JDK1.4.2 and Tomcat 
5.5.9+JDK1.5.0 while my (somewhat slower) notebook can do 800+ threads 
with Debian and 5.0.28+1.4.2 without problems.

Seems to me like a Windows problem, but I can't find anything in the 
docs nor via Google.. ;-(

Windows sucks..

-- Michael

delbd schrieb:
> Just by curiosity, does it have something like '511 Threads is ok but 512 
> fails?' :D
> Le Jeudi 30 Juin 2005 15:09, Michael Kleinhenz a écrit :
> 
>>Hi,
>>
>>I'm currently integrating a SOAP-based middleware on Tomcat (5.5.9) with
>>Sun JDK 1.5.0_02 and get into problems when using maxThreads with a
>>value greater than 500.
>>
>>Tomcat locks up completely without getting back to normal operations
>>after a while. No exception or error is reported in the logs, it just
>>stops. All connections are refused after the lockup. Tomcat has enough
>>memory (>1GB) assigned with the JVM options.
>>
>>If I use maxThreads="500", the server runs fine, but 500 is not enough
>>for my project ;-(
>>
>>I tried to increase the stack size, but this doesn't help..
>>
>>The connector is defined as:
>>
>>>   minSpareThreads="50" maxSpareThreads="150" enableLookups="false"
>>   redirectPort="8443" acceptCount="200" connectionTimeout="2"
>>   disableUploadTimeout="true"/>
>>
>>If I change 500 to 700 or more, Tomcat locks up. Is this a Windows
>>problem?? 
>>
>>Hardware is not an issue, I think.. (dual Xeon 3,4GHz, 4GB)..
>>
>>Thanks,
>>Michael
>>
> 
> 


-- 
Dipl.-Technoinform Michael Kleinhenz
tarent GmbH . Bahnhofstraße 13 . 53123 Bonn
fon: +49 (228) / 52 67 5-0
fax: +49 (228) / 52 67 5-25



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



No more than 500 threads on Windows 2003?

2005-06-30 Thread Michael Kleinhenz
Hi,

I'm currently integrating a SOAP-based middleware on Tomcat (5.5.9) with
Sun JDK 1.5.0_02 and get into problems when using maxThreads with a
value greater than 500.

Tomcat locks up completely without getting back to normal operations
after a while. No exception or error is reported in the logs, it just
stops. All connections are refused after the lockup. Tomcat has enough
memory (>1GB) assigned with the JVM options.

If I use maxThreads="500", the server runs fine, but 500 is not enough
for my project ;-(

I tried to increase the stack size, but this doesn't help..

The connector is defined as:



If I change 500 to 700 or more, Tomcat locks up. Is this a Windows
problem?? 

Hardware is not an issue, I think.. (dual Xeon 3,4GHz, 4GB)..

Thanks,
Michael

-- 
Michael Kleinhenz
tarent GmbH . Bahnhofstr. 13 . 53123 Bonn
fon +49 (228) / 52 67 5-0 . fax +49 (228) / 52 67 5-25

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



Re: how to replace j_security_check

2005-06-26 Thread Michael Echerer
Marten Lehmann wrote:
> Hello,

> So far, this is not a problem. Looking up users through jdbc isn't a
> problem as well. But how can I inform the container about a successful
> login, so that calls to request.getRemoteUser() and
> request.isUserInRole("manager") will behave as if I logged in through
> the common j_security_check?
You can't replace j_security_check as it's part of the servlet spec. You
could e.g. try to set the security principal yourself and use
org.apache.catalina.HttpRequest to cast your HttpServletRequest and
build something custom around the declarative security.

Cheers
Michael


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



Re: http session lost between struts action

2005-06-23 Thread Michael Jouravlev
On 6/23/05, angelina zh <[EMAIL PROTECTED]> wrote:
> -- If I open a IE 6.0 browser and log into the web site we are developing

How do you log in? Do you navigate to static HTML page, to JSP page,
to Struts login action? Who generates this page or where this page is
being forwarded from?

> In the login action class, we set some attributes into the session.
> If I click on any of the links, I got null pointer exception in next
> action class when we try to get attributes from the session. ...
> If I keep that browser open and go to the log in page again. After
> I log in, I get into the welcome page and if I click any of the
> links now, the session of the request is not null and I can go to
> any links without any problem. The null pointer did not occur in
> the following action class.

Seems that session was not established when you accessed the link from
the welcome page. Are you sure that this page is generated by action
class, or from a JSP page with cleared "session" attribute of "page"
directive?

You can use static HTML welcome page, if:
* you forward to it from action class or JSP, and
* you created session object in the action class or JSP, or
* you do not clear "session" attribute of "page" directive

Session is created in action class, if you access session object and
set it to auto-create, if session is not there yet. Session is created
in JSP, if you do not explicitly clear "session" attribute of "page"
directive; by default "session" attribute is set.

Michael.

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



pooling for "java.net.SocketException: Broken pipe" connections?

2005-06-23 Thread Michael Zurke

hi, i wonder what tomcats connection pool does when an

 org.postgresql.util.PSQLException: An IO erro occured while sending to 
the backend - Exception: java.net.SocketException: Broken pipe


exception occurs. will the pool recognize this and get rid of the broken 
connection?


thanx,
mischa

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



Re: Is Tomcat is an application server ?

2005-06-22 Thread Michael Echerer

>>There is no meaning in saying that one can plug in required
>>services to Tomcat. My question is by design is it an application
>>server ?. My opinion is that Tomcat in the shipped form is not an
>>application server. At the minimum it should provide transaction and
>>persistence services, method level security is also preferred.
>>One can add all the above mentioned features to any servlet engine
>>by deploying JAR files of the required services(JNDI,JTA,persistence
>>and even EJB). So any servlet engine becomes an application server. Am
>>I right ?
> 
> 
> I think you are getting your terms mixed up... Your arguments could be
> used in regards to a full J2EE container, which Tomcat isn't on it's
> own but an application server just needs to serve applications and
> Tomcat certainly does that.
> 

Agree. Tomcat is an application server, e.g. JBoss aswell, but JBoss is
a J2EE 1.x compliant application server as all parts of the spec are
implemented, Tomcat is not as only parts are covered.

Cheers,
Michael



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



and in-server forward from included resource

2005-06-21 Thread Michael Jouravlev
Hello! I sent this message to dev list a week ago and did not get an
answer, so I thought that I might come across someone in the user
list, who might help me. I also had raised this question about three
months ago, and was assured by a member of dev group, that my concerns
would be shared with JSP spec group, so I would like to check on the
progress.

In short, I want to make a change in JSP spec, and I don't know where
should I address my concern. Tomcat is a reference implementation of
JSP spec, so I thought this might be a right place. I cannot comment
on JSR53 either.

Here is my situation: I have a resource, included in JSP page. The
included resource (in my case a struts action, but this does not
matter) performs in-server forward (or redirect and then forward) to a
location with actual content (in my case it is JSP page). The problem
I am having is that response stream is closed after my included
resource is processed, and the rest part of parent page is not
processed.

I was pointed to the spec: JSP version 2.4, section 8.4 reads: "Before
the forward method of the RequestDispatcher interface returns, the
response content must be sent and committed, and closed by the servlet
container." I would like it to be updated to something like this:
"Before the forward method of the RequestDispatcher interface returns,
the response content must be sent and committed, and closed by the
servlet container, IF REQUEST WAS NOT INCLUDED INTO ANOTHER REQUEST."

Here is the reason: I want to be able to create components in JSP
using jsp:include. I want to be able to include serlvets or Struts
actions or other request-processing modules, which then would forward
to actual content - a result page, which would become a piece in the
main page. And I want to separate the modules. But I cannot apply
clean MVC model using current JSP spec, because included resource must
generate output itself, and must not perform a forward.

Tomcat is a reference implementation of JSP spec, and it does not
behave like I want. On the other hand, Resin and Jetty work pretty
much how I expected. It would be great if Tomcat could do this too.
Maybe with some kind of switch or setting.

If anyone from this group has a chance to influence JSP spec, or can
point me the direction where I can address my concerns, I would be
grateful for help.

Thanks,
  Michael.

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



Re: isRequestedSessionIdFromURL() returns false

2005-06-17 Thread Michael Jouravlev
I already tried it, and it did not work. Session ID is separated by
semicolon, not by question mark or ampersand. It is treated
differently and is not shown as URL parameter.

Thanks anyway.

On 6/16/05, Jon Wingfield <[EMAIL PROTECTED]> wrote:
> Something like this maybe:
> 
> String url = request.getRequestURL().toString();
> if (url.indexOf("jsessionid")>-1
>  && url.indexOf(request.getRequestedSessionId())>-1) {
>  // do redirect
> }
> 
> Jon

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



Re: isRequestedSessionIdFromURL() returns false

2005-06-16 Thread Michael Jouravlev
If both methods return true, they would identify the first request
after session has been established with browser which supports
cookies. I try to keep GET requests clean to encourage browser to keep
its page history from growing. When I detect this request, I perform a
redirect to the same location to clean URL up. After redirection URL
will be clean, because session ID will be contained in cookie only. I
need to do this only once.

With isRequestedSessionIdFromURL() returning false I cannot do what I
need :-( Any ideas?

Michael.

> Interesting question.
> 
> The Servlet 2.3 spec says:
> "
> public boolean isRequestedSessionIdFromURL()
> Checks whether the requested session ID came in as part of the request URL.
> Returns: true if the session ID came in as part of a URL; otherwise,
> false"
> 
> I would interpret it this way: if the session id, which should be used
> was extracted from the URL, then return true.
> If however the cookie contains the same id and was checked first (which
> is default I think) then the requested session id came from the cookie!
> Imagine what would happen if always both would be checked and URL and
> cookie would contain 2 different ids.

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



isRequestedSessionIdFromURL() returns false

2005-06-16 Thread Michael Jouravlev
Hi, I hope am I in the right mail-list with this question. I guess
that if I use Tomcat, then HttpRequest.isRequestedSessionIdFromURL()
is implemented by Tomcat.

I have a request, which contains *both* session ID in cookie *and*
session ID in the rewritten URL. isRequestedSessionIdFromCookie()
return true, but isRequestedSessionIdFromURL() returns false. It seems
that isRequestedSessionIdFromURL() should return true. Is this a bug?

I am using Tomcat 4.1.31.

Michael.

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



Re: Concurrent login detection - how?

2005-06-14 Thread Michael Mehrle
That actually goes to the heart of my question: HOW do I detect when their 
session times out? ;-)
I know the 'strategy' of doing this, but I don't know how to capture a 
timed-out session - technically. Any input would be welcome.


TIA,

Michael

- Original Message - 
From: "David Rickard" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, June 14, 2005 9:53 AM
Subject: Re: Concurrent login detection - how?




Remove IDs from the List when users log out (and add a
ServletContextListener to catch people who leave the site without logging
out--remove their IDs when their sessions time out);

At 09:22 AM 6/14/2005, you wrote:
What is the best way to detect two people being logged in concurrently 
using

the same account? This is one aspect of my efforts to restrict fraudulent
access. Again, I don't want to use Acegi since it seems to break the rest 
of

my app. So, what's the best way to do this 'traditionally'?

Thanks!

Michael


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




--

David Rickard
Software Engineer

TechBooks/GTS
Your Single Source Solution!
Los Angeles CA * York, PA * Boston,MA * New Delhi, India
Visit us on the World Wide Web
<http://www.techbooks.com>http://www.techbooks.com

[EMAIL PROTECTED]
5650 Jillson St., Los Angeles, CA 90040
(323) 888-8889 x331
(323) 888-1849 (Fax)





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



Concurrent login detection - how?

2005-06-14 Thread Michael Mehrle

What is the best way to detect two people being logged in concurrently using
the same account? This is one aspect of my efforts to restrict fraudulent
access. Again, I don't want to use Acegi since it seems to break the rest of
my app. So, what's the best way to do this 'traditionally'?

Thanks!

Michael


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



Re: tomcat causes servlet malfunction???

2005-06-08 Thread Michael Echavez
it is located in the "\web\WEB-INF\classes\chapter2" directory.

On 6/9/05, Ben Souther <[EMAIL PROTECTED]> wrote:
> 
> Where is the servlet's class file?
> 
> 
> On Wed, 2005-06-08 at 11:35, Michael Echavez wrote:
> > i didnt use the invoker here. ive explicitly mapped my servlet with
> > that url. below is a part of my web.xml
> >
> > 
> > ParameterServlet
> > 
> > This servlet retrieves the parameters sent to it and returns
> > the parameters and their values back to the client.
> > 
> > chapter2.ParameterServlet
> > 
> > 5
> > 
> >
> > 
> > ParameterServlet
> > /servlet/chapter2.ParameterServlet
> > 
> >
> > I actually thought that there was some kind of an agreement to use
> > "/servlet" for servlet urls. Thank you for the links. I actually
> > learned a lot from them.
> >
> > Yes, the browser does download the file. it says that it has found a
> > PARAMETERSERVLET file since the url is
> > ...\servlet\chapter2.ParameterServlet
> > It actually thinks that ParameterServlet is an extension. I'm really
> > lost now cause i have a couple of other servlets that is in the same
> > directory and they work properly. this is the only one that doesnt.
> >
> > On 6/8/05, Ben Souther <[EMAIL PROTECTED]> wrote:
> > If the browser can see the .class file and download it, then
> > it's not in
> > the right place.
> >
> > Also: action="servlet/chapter2.ParameterServlet"
> > The "servlet/" section in the URL is an outdated way of
> > invoking a
> > servlet. It uses the deprecated (and disabled in current
> > versions of
> > Tocmat) Invoker servlet.
> >
> > You will need to map your servlets in web.xml or disable the
> > invoker in
> > order to run them.
> >
> > On the InvokerServlet:
> > http://jakarta.apache.org/tomcat/faq/misc.html#evil
> > http://faq.javaranch.com/view?InvokerServlet
> >
> >
> > On Wed, 2005-06-08 at 11:10, Michael Echavez wrote:
> > > Hi Ben,
> > > It is so nice of you to respond so quickly.
> > > Actually, I've already deployed a few simple servlets
> > already and I am
> > > sure that the .class file for the servlet is in the right
> > directory. I
> > > was just wasnt sure why tomcat couldnt load the class file
> > correctly.
> > > Also, I already read the tomcat documentation you pointed me
> > to before
> > > i posted my question.
> > > I really appreciate the link with the example applications.
> > I think it
> > > will help me a lot with practicing on servlets, jsps and
> > beans. Again,
> > > Thank you so much!
> > > Regards,
> > > Michael
> > >
> > > On 6/8/05, Ben Souther <[EMAIL PROTECTED]> wrote:
> > > Michael,
> > >
> > > Have a look at the documentation for classloading in
> > TC to
> > > find out
> > > where your class files need to go.
> > >
> > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
> > >
> > > You'll also need to map your servlet in your web.xml
> > file.
> > >
> > >
> > > I have some example applications that are packaged
> > as war
> > > files that you
> > > can use as a reference if you like:
> > > http://simple.souther.us.
> > >
> > > -Ben
> > >
> > >
> > >
> > > On Wed, 2005-06-08 at 10:58, Michael Echavez wrote:
> > > > Hi Everyone!
> > > > There is a servlet i found from a book that
> > utilizes the
> > > parameters from
> > > > servlets but whenever i run it the browser doesnt
> > seem to
> > > open the class
> > > > properly and instead it only downloads the .class
> > file. I
> > > think the problem
> > > > here has something to do with the new Tomcat
> > version. Can
> > > someone try
> > > > deploying the application so that I'll be able to
> > find out
> > > whether what the
> > > > problem really is. Below are the codes i used:
> > > >
> > > > the code below is for Form.html where i have to
> > enter the
> > > information that
> > > > will be passed onto the servlet:
> > > > 
> > > > 
> > > > 
> > > > Parameter Servlet Form
> > > > 
> > > > 
> > > > 
> > > >
>

tomcat causes servlet malfunction???

2005-06-08 Thread Michael Echavez
Hi Everyone!
There is a servlet i found from a book that utilizes the parameters from 
servlets but whenever i run it the browser doesnt seem to open the class 
properly and instead it only downloads the .class file. I think the problem 
here has something to do with the new Tomcat version. Can someone try 
deploying the application so that I'll be able to find out whether what the 
problem really is. Below are the codes i used:

the code below is for Form.html where i have to enter the information that 
will be passed onto the servlet:



Parameter Servlet Form







Name: 


SSN:





Age:



email:





 
  
  











and here is the code for ParamterServlet.java:
package chapter2;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;

public class ParameterServlet extends HttpServlet {

public void init(ServletConfig config) throws ServletException {
// Always pas the ServletConfig object to the super class
super.init(config);
}

// Process the HTTP Get request
public void doGet (HttpServletRequest request, HttpServletResponse response) 
throws ServletException, IOException {
doPost(request, response);
}

// Process the HTTP Post request
public void doPost (HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {
response.setContentType("html/text");
PrintWriter out = response.getWriter();

out.println("");
out.println("");
out.println("Parameter Servlet");
out.println("");
out.println("");

// Get an enumeration of the parameter names
Enumeration parameters = request.getParameterNames();

String param = null;

// Iterate over the parameter names,
// getting the parameters values
while(parameters.hasMoreElements()) {
param = (String)parameters.nextElement();
out.println(param + " : " + request.getParameter(param) + "");
}

out.println("");
out.close();
}
}

Thank you and Good day!
Regards,
michael


RE: Servlet Concurrency Issues

2005-06-08 Thread Michael Pasko
Thanks Chuck, that was exactly the problem.  I was under the very poor
assumption that a new thread and newly instantiated servlet object was
created every time a request was made, instead of all threads working on
only one instance of an object.  To mimic the desired behavior I've fixed
the problem by adding this (implements SingleThreadModel)...

public class ServletName implements SingleThreadModel

Now it would seem that if several 100 people were to access a servlet that
every time the following code was hit by a new thread:

PrintWriter out = response.getWriter();

It would direct all output (using out.println()) from all threads to the
most recent person to access the servlet.  

Follow up question:  With this in mind, what is the most common method of
writing thread safe code?  

Thank you very much for your help.

-Mike

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 07, 2005 1:15 PM
To: Tomcat Users List
Subject: RE: Servlet Concurrency Issues

> From: Michael Pasko [mailto:[EMAIL PROTECTED] 
> Subject: Servlet Concurrency Issues
> 
> I started allowing other users on it, I stumbled on some problems.
> Basically what happens, when user A submits the form, and then 2 
> seconds later user B submits the same form.  User A stops getting 
> results, and User B receives the output for his request as well as
> the end of User A's request.

Probably not a configuration problem but rather implementation errors in
your servlet or some related object (such as the DB connection).
There's normally only one copy of the servlet object, and it will be
used concurrently by multiple threads.  Make sure you're not storing
request-specific information in there.

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



Servlet Concurrency Issues

2005-06-07 Thread Michael Pasko
I've recently developed a servlet that connects to an AS/400, and returns
results off an sql query based off criteria submitted by a form.  I've had
pretty much exclusive use of the Tomcat server during development, but when
I started allowing other users on it, I stumbled on some problems.
Basically what happens, when user A submits the form, and then 2 seconds
later user B submits the same form.  User A stops getting results, and User
B receives the output for his request as well as the end of User A's
request.  User A is on a different computer than B and both have different
session ID's.  I'm sure this is a configuration error on my part, but would
appreciate a direction on where to look.
 
PS - I create a session if it doesn't exist, and store the username and DB
connection in it.  (Will use JNDI later) 
 
 
 
 
I'm using Tomcat 5.5.7


Re: ssl traffic between apache and tomcat via mod_jk

2005-06-05 Thread Michael Echerer
Liz Donaldson wrote:
> Hi,
> 
> I have a apache https enabled webserver and tomcat server an and am
> using the mod_jk connection module. From all the documentation I have
> read, it indicates that apache handles all the SSL negotiations and that
> the traffic between apache and tomcat is clear text. How can I enable
Well in fact the traffic uses ajp13, a protocol which is not really
"clear text". It's a binary format for optimization reasons.
Nevertheless it's of course not crypted (if you know the protocol), but
it might suffice for "minor" security demands as you cannot simply read
it using sniffer tools.
> communications between apache and tomcat to be encrpypted.
For mod_jk and Tomcat I doubt you can encrypt it. I never
heard/read/seen anything in the docu, too.
You could maybe try things with an ssl tunnel like stunnel.org, but
that's just a guess...

BTW: Why is the communication between Apache and Tomcat an issue at all?
Usually/Hopefully you're already in a "secure" environment with your
Apache behind a firewall etc.

Cheers,
Michael
> 
> Thank You in advance,
> Liz
> 
> 
> -
> 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]



tomcat newbie : cant make a simple servlet work

2005-06-04 Thread Michael Echavez
Greetings everyone!
I'm a newbie with Tomcat and i've already been trying out a simple server 
example for about 2 days now and still it wouldnt work. I really hope 
someone would help me out. 

Specifications:
1. operating system : windows xp sp2
2. java : jdk 1.5
3. tomcat : version 5.5
*i'm using ant for compiling and building

Here is the code for the servlet i'm trying to run:

package chapter2;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class SimpleServlet extends HttpServlet {
public void init(ServletConfig config)
throws ServletException {
// Always pass the ServletConfig object to the super class
super.init(config);
}
//Process the HTTP Get request
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doPost(request, response);
}
//Process the HTTP Post request
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("");
out.println("Simple Servlet");
out.println("");
// Outputs the address of the calling client
out.println("Your address is " + request.getRemoteAddr()
+ "\n");
out.println("");
out.close();
}
}

Yes, this is an example from the book "Mastering Jakarta Struts". The tomcat 
version used in the book is really a lot older, so i had to read the 
documentation of version 5.5 and did everything written there. I structured 
the directory hierarchy correctly and even exercised the proper source code 
management.

Here is my web.xml code:



http://java.sun.com/dtd/web-app_2_3.dtd";
>






wileyapp

This is my first ever servlet and i hope it will
finally work. Please Lord, make it work...



webmaster
[EMAIL PROTECTED]

The EMAIL address of the administrator to whom questions
and comments about this application should be addressed.




SimpleServlet

This servlet plays the "controller" role in the MVC architecture
used in this application. It is generally mapped to the ".do"
filename extension with a servlet-mapping element, and all form
submits in the app will be submitted to a request URI like
"saveCustomer.do", which will therefore be mapped to this servlet.

The initialization parameter namess for this servlet are the
"servlet path" that will be received by this servlet (after the
filename extension is removed). The corresponding value is the
name of the action class that will be used to process this request.

chapter2.SimpleServlet

5



30 




To my desperation I even added a context path to the server.xml which was 
practiced for older versions of tomcat. I also checked whether the web 
application was deployed and the tomcat manager indicated that, yes, it was 
already deployed. But i can't seem to make the servlet work. I kept 
accessing it at http:/localhost:8080/wileyapp/servlet/chapter2.SimpleServlet 
but it just doesnt work. I even tried the other tutorials available online 
but these also didnt work. what seems to be the problem here? Im actually 
considering using an older version of tomcat because there are more 
tutorials and pointers for using them.


Could not find a worker error

2005-06-03 Thread Michael Thompson
I am trying to configure mod_jk 1.2.11 to work with apache httpd 2.0.54
and tomcat 5.5 and having difficulties.  It seems the worker is not
configured correctly.  

The jk_mod log shows the following error:
[Fri Jun 03 10:33:37 2005] [info]  jk_handler::mod_jk.c (1976): Could
not find a worker for worker name=live

My workers.properties file:
workers.tomcat_home=/usr/local/tomcat_live
workers.java_home=/usr/java14_64
ps=/
#
worker.list=live
worker.live.type=ajp13
worker.live.port=8109
worker.live.host=localhost

My jk config in httpd.conf:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile   /usr/local/apache2/conf/workers.properties
JkLogFile   /usr/local/apache2/logs/mod_jk.log
JkLogLevel  info
JkMount /servlet/*  live
Alias /servlet "/usr/local/tomcat_live/webapps/ROOT/WEB-INF/lib"

My server.xml:


  


  

  






  
  


  


   













Can anyone point me in the right direction?  

Thank you very much for any help you can give.  
Michael Thompson

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



Re: [Tomcat] Web Traffic Analisys Tool

2005-05-21 Thread Michael Echerer
Omar Adobati wrote:
> Good Morning all,
>   I'm looking for a free and good web traffic analyzer to use with
> tomcat 5.x but searching on the net I can't find anything good.
> Does anyone know a good tool? (if it exists)
> 
> Thanks in advice
> 
What about analog, webalizer or awstats?
http://awstats.sourceforge.net/docs/awstats_compare.html

Cheers
Michael


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



Re: {Problems getting Tomcat running on OS 10.3.9)

2005-05-19 Thread Michael Mehrle
Have you installed that extra lib that allows one to run tomcat 5.5.x on jdk 
1.4.x? Otherwise you'll need to update to jdk 1.5...

Michael
- Original Message - 
From: "Christopher Barbee" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, May 19, 2005 6:11 PM
Subject: {Problems getting Tomcat running on OS 10.3.9)



Begin forwarded message:
From: Christopher Barbee <[EMAIL PROTECTED]>
Date: May 19, 2005 6:08:44 PM PDT
To: tomcat-user@jakarta.apache.org
Subject:
Mime-Version: 1.0 (Apple Message framework v622)
Bcc: Christopher Barbee <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <[EMAIL PROTECTED]>
Content-Transfer-Encoding: 7bit
I am having difficulty getting Tomcat to run on OS 10.3.9 with latest
1.4.2 java.
I am able to get $CATALINA_HOME/bin/catalina.sh version to work,  but
startup doesn't seem to want to work.
Any suggestions from other MAc users would be appreciated.
Chris

Christopher-Barbees-Computer:~/Desktop christopherbarbee$
$CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE:
/Users/christopherbarbee/Desktop/jakarta-tomcat-5.5.7
Using CATALINA_HOME:
/Users/christopherbarbee/Desktop/jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR:
/Users/christopherbarbee/Desktop/jakarta-tomcat-5.5.7/temp
Using JRE_HOME:   /usr
Christopher-Barbees-Computer:~/Desktop christopherbarbee$
Christopher Barbee
Senior Software Engineer
SenySoft
3153 South Court
Palo Alto,  CA 94306
[EMAIL PROTECTED]

Christopher Barbee
Senior Software Engineer
SenySoft
3153 South Court
Palo Alto,  CA 94306
[EMAIL PROTECTED]

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


Re: Can a servlet receive its own request?

2005-05-18 Thread Michael Mehrle
Yes, I'm now going the HttpClient route - and yes, I also realized that the 
object to be launched doesn't have to be a servlet at all. I was just 
anchored in thinking along those lines since I thought that the servlet 
would be the one receiving its own response. Anyway, I think I'm on the 
right track now.

Many thanks to everyone who replied to my post - every input was very 
valuable.

Michael
- Original Message - 
From: "Robert r. Sanders" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, May 18, 2005 1:08 PM
Subject: Re: Can a servlet receive its own request?


I've done something a little similar w/ the HTTPClient.  What I ended up 
w/ was a Object that was run in the Servlet container but was not itself a 
servlet.  Nit-picking.  Anyway, you can do this, you just have to use 
other libraries (like the Commons HTTPClient).

Michael Mehrle wrote:
Thanks for your elaborate reply - actually, someone else also suggested 
to use commons HTTPClient. I might have over-explained all this - the 
major difference is that the servlet is being launched by Quartz, not by 
an outside HTTP request. Thus, it is the servlet that needs to be able to 
receive the response to its own request, and it appears that HTTPClient 
might enable the servlet to do this.

Michael

--
   Robert r. Sanders
   Chief Technologist
   iPOV
   (334) 821-5412
   www.ipov.net
-
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: Can a servlet receive its own request?

2005-05-18 Thread Michael Mehrle
Thanks for your elaborate reply - actually, someone else also suggested to 
use commons HTTPClient. I might have over-explained all this - the major 
difference is that the servlet is being launched by Quartz, not by an 
outside HTTP request. Thus, it is the servlet that needs to be able to 
receive the response to its own request, and it appears that HTTPClient 
might enable the servlet to do this.

Michael
- Original Message - 
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Cc: "Tomcat Users List" 
Sent: Wednesday, May 18, 2005 10:05 AM
Subject: Re: Can a servlet receive its own request?

If however, as I suspect might be the case, your servlet is going to
actually be awaiting a reply from the outside server, then you should look
at using Commons HTTPClient.  I'm relatively sure it supports SSL
connections, and then all your doing is making a remote request, awaiting
the response and processing accordingly.  It'd be just like using the
standard URL object, but it's more robust than that.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

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


CORRECTION: Can a servlet receive a response to its own request?

2005-05-18 Thread Michael Mehrle
Simple question, but it's driving me nuts. I really don't want to get into 
the whole web service business - all I need is for a servlet to be the 
recipient of its own request. Or - in other words - can a servlet act like a 
web browser - just without the GUI?

Use case:
- Servlet issues https request to an outside server (via 
getServletContext().getRequestDispatcher(https://www.someoutsideserver/) )
- Outside server processes request and responds with POST response (also via 
https).
- Servlet [somehow] is able to be the recipient of the response.
- Servlet parses the response and stores data to the database.

Notes:
- The servlet is not the default servlet on that tomcat instance.
- Everything happens via https and I expect the outside server will listen 
on 443 and tomcat on 8443

ANY suggestions would be very helpful - this seems to be a tricky one.
TIA,
Michael
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Can a servlet receive its own request?

2005-05-18 Thread Michael Mehrle
Simple question, but it's driving me nuts. I really don't want to get into 
the whole web service business - all I need is for a servlet to be the 
recipient of its own request. Or - in other words - can a servlet act like a 
web browser - just without the GUI?

Use case:
- Servlet issues https request to an outside server (via 
getServletContext().getRequestDispatcher(https://www.someoutsideserver/) )
- Outside server processes request and responds with POST response (also via 
https).
- Servlet [somehow] is able to be the recipient of the response.
- Servlet parses the response and stores data to the database.

Notes:
- The servlet is not the default servlet on that tomcat instance.
- Everything happens via https and I expect the outside server will listen 
on 443 and tomcat on 8443

ANY suggestions would be very helpful - this seems to be a tricky one.
TIA,
Michael

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


Re: Tomcat vs Apache

2005-05-18 Thread Michael Mehrle
Apache is not a J2EE container - you are off-roading on this one ;-)
Michael
- Original Message - 
From: "Chris" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, May 18, 2005 7:37 AM
Subject: Tomcat vs Apache


I've been working with Tomcat for a while now, but I haven't messed with 
Apache yet.  Could someone explain or point me to something explaining 
the differences between Tomcat and Apache?  I have a large applet hosted 
on Tomcat, and am investigating using Apache instead.  Is this feasable? 
TIA.

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


Scheduled task in tomcat - how?

2005-05-17 Thread Michael Mehrle
I need to create an automated task in tomcat that gets launched every two
hours or so, does its work and then sleeps again. The task needs to send
some request values via a secure (https) POST to a cgi script running on an
outside server, then receive the response, parse it and put it into the
database. The response doesn't return the values as request parameters, but
instead simply returns records in CSV (comma separated values) format, one
record per line.
So, here's what I'm pondering:
 a.. What's the best way to create that automated (scheduled) task and run
it as a servlet under tomcat (5.5.9)?
 b.. You guys might laugh, but the last time I parsed CSV as part of the
HTTP response was in my Perl days (looong ago) - is there some servlet
support for doing this, or do I need to code alll this stuff myself from
scratch?
 c.. Finally, what's the best approach to 'receiving' the response? The
servlet issueing the request is obviously the requester, but since this is
running inside of tomcat, how do I route the response to that servlet? Maybe
I'm overthinking this, but I'm not sure how a servlet can be the recipient
of its own request. Hope this makes sense.
Any input on one or more of these questions would be appreciated.
Michael
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Scheduled task in tomcat - how? 2

2005-05-17 Thread Michael Mehrle
I was just thinking this: IF there would be another tomcat instance running, 
on a different port, then this one could issue the request and when called 
back the default servlet would pick up the response. Of course that's not 
what I'd like to do - wasting resources on a separate tomcat instance would 
be my very last resort...

Michael
- Original Message - 
From: "Michael Mehrle" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Tuesday, May 17, 2005 3:32 PM
Subject: Scheduled task in tomcat - how?


I need to create an automated task in tomcat that gets launched every two 
hours or so, does its work and then sleeps again. The task needs to send 
some request values via a secure (https) POST to a cgi script running on an 
outside server, then receive the response, parse it and put it into the 
database. The response doesn't return the values as request parameters, but 
instead simply returns records in CSV (comma separated values) format, one 
record per line.

So, here's what I'm pondering:
 a.. What's the best way to create that automated (scheduled) task and run 
it as a servlet under tomcat (5.5.9)?
 b.. You guys might laugh, but the last time I parsed CSV as part of the 
HTTP response was in my Perl days (looong ago) - is there some servlet 
support for doing this, or do I need to code alll this stuff myself from 
scratch?
 c.. Finally, what's the best approach to 'receiving' the response? The 
servlet issueing the request is obviously the requester, but since this is 
running inside of tomcat, how do I route the response to that servlet? 
Maybe I'm overthinking this, but I'm not sure how a servlet can be the 
recipient of its own request. Hope this makes sense.
Any input on one or more of these questions would be appreciated.

Michael

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


Scheduled task in tomcat - how?

2005-05-17 Thread Michael Mehrle
I need to create an automated task in tomcat that gets launched every two 
hours or so, does its work and then sleeps again. The task needs to send 
some request values via a secure (https) POST to a cgi script running on an 
outside server, then receive the response, parse it and put it into the 
database. The response doesn't return the values as request parameters, but 
instead simply returns records in CSV (comma separated values) format, one 
record per line.

So, here's what I'm pondering:
 a.. What's the best way to create that automated (scheduled) task and run 
it as a servlet under tomcat (5.5.9)?
 b.. You guys might laugh, but the last time I parsed CSV as part of the 
HTTP response was in my Perl days (looong ago) - is there some servlet 
support for doing this, or do I need to code alll this stuff myself from 
scratch?
 c.. Finally, what's the best approach to 'receiving' the response? The 
servlet issueing the request is obviously the requester, but since this is 
running inside of tomcat, how do I route the response to that servlet? Maybe 
I'm overthinking this, but I'm not sure how a servlet can be the recipient 
of its own request. Hope this makes sense.
Any input on one or more of these questions would be appreciated.

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


Re: No such list! s (AM I THE ONLY ONE GETTING THIS SPAM)?

2005-05-17 Thread Michael Mehrle
No, you're not the only one - and if they don't clean up their act soon, 
I'll simply unsubscribe. Fu.ing annoying!

Michael
- Original Message - 
From: "Guy Katz" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Monday, May 16, 2005 10:46 PM
Subject: RE: No such list! s (AM I THE ONLY ONE GETTING THIS SPAM)?

am i the only one getting this annoying spam from the tomcat lisy?
-Original Message-
From: s [mailto:[EMAIL PROTECTED]
Sent: Monday, May 16, 2005 10:32 PM
To: tomcat-user@jakarta.apache.org
Subject: No such list! s
Valid Lists
New Atlanta List Server
---
There is no list by that name on this server. Available lists are:
  bluedragon-interest
  servletexec-interest
  jturbo-interest


-
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: Illegal IMail List Server Command!

2005-05-17 Thread Michael McQuade
Anyway to BLOCK THIS,  its really peeing me off here...


- Original Message - 
From: "List Server" <[EMAIL PROTECTED]>
To: 
Sent: Monday, May 16, 2005 6:13 PM
Subject: Illegal IMail List Server Command!


> New Atlanta List Server General Help File
> -
>
> Lists hosted by this server are:
>
>bluedragon-interest
>servletexec-interest
>jturbo-interest
>
> Use one of these list names where you see  in the command
syntax below.
>
> All list server commands must be addressed to:
>
>[EMAIL PROTECTED]
>
> Commands must be placed on the first line of the message body and may not
be preceded by blanks, whitespace, or other characters.
>
> Valid Commands are:
>
>To subscribe to a list:
>
>subscribe  
>
>For example:
>
>subscribe servletexec-interest John Smith
>
>If you don't include your name in the subscribe command you'll receive
an "Invalid Syntax" error message from the list server.
>
>To unsubscribe from a list:
>
>unsubscribe 
>
>To receive help send after subscribing to a list:
>
>help 
>
> If you have any questions or need additional help, send email to:
>
>[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]



shutdown script error

2005-05-17 Thread Fay, Michael
 

Getting the following error on the shutdown script with tomcat 5.5.7:

soyuz-test 16 15:14:11 /usr/local/tomcat/jakarta-tomcat-5/build/bin % sudo
./shutdown.sh 

Using CATALINA_BASE:   /usr/local/tomcat/jakarta-tomcat-5/build

Using CATALINA_HOME:   /usr/local/tomcat/jakarta-tomcat-5/build

Using CATALINA_TMPDIR: /usr/local/tomcat/jakarta-tomcat-5/build/temp

Using JRE_HOME:   /opt/jdk1.5.0_02

May 16, 2005 3:14:20 PM org.apache.tomcat.util.digester.Digester
startElement

SEVERE: Begin event threw error

java.lang.NoClassDefFoundError: org/apache/naming/TransactionRef

at
org.apache.catalina.core.StandardServer.(StandardServer.java:94)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java
:205)

at org.apache.tomcat.util.digester.Rule.begin(Rule.java:152)

at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1275)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)

at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
Source)

at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unkno
wn Source)

at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElem
entHook(Unknown Source)

at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)

at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at
org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)

at
org.apache.catalina.startup.Catalina.stopServer(Catalina.java:384)

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.stopServer(Bootstrap.java:320)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:411)

java.lang.reflect.InvocationTargetException

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.stopServer(Bootstrap.java:320)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:411)

Caused by: java.lang.NoClassDefFoundError: org/apache/naming/TransactionRef

at
org.apache.catalina.core.StandardServer.(StandardServer.java:94)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java
:205)

at org.apache.tomcat.util.digester.Rule.begin(Rule.java:152)

at
org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1275)

at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)

at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
Source)

at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unkno
wn Source)

at
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElem
entHook(Unknown Source)

at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)

at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)

at org.apache.xerces.parsers.XML11Co

RE: question about load-on-startup in web.xml

2005-05-12 Thread Michael Oliver
If I were doing it I would put a singleton class in the /common/lib/
that had a Hashtable and in my application's startup I would get the
singleton and have the first application I want to load put a string
"loading" (or whatever) in the Hashtable of the singleton with the key
"webappY".  The second webappX get the singleton and look for
"webappY"/"loading".  If it is still there sleep and check again later.
When webappY is finished starting it removes the 'loading' from the
Hashtable of the singleton and when "webappX" sees it is gone, it
continues. 

Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]
-Original Message-
From: Annie Wang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 11, 2005 3:47 PM
To: Parsons Technical Services; Tomcat Users List
Subject: Re: question about load-on-startup in web.xml

i tried putting in a sleep in my servlet's init method, but
$CATALINA_HOME/logs/catalina.out seems to indicate that tomcat waits
for it to initalize..

in my catalina.out, i have:

May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webappX from URL
file:/jakarta-tomcat/webapps/webappX
***webappX***start init
***webappX***end init
May 11, 2005 2:12:06 PM org.apache.catalina.core.StandardHostDeployer
install
INFO: Installing web application at context path /webappY from URL
file:/jakarta-tomcat/webapps/webappY

any one know if there's a way to make webappY get installed before
webappX?  what determines the install order?  i thought it was
load-on-startup in the web.xml file, but maybe that affects the
ordering of servlet initalization within a web application (if the web
application has multiple servlets), but not the ordering of web
application installation on tomcat startup.

thanks.
-annie


On 5/10/05, Annie Wang <[EMAIL PROTECTED]> wrote:
> hi doug, yup, was thinking along similar lines.  just wasn't sure if
> there was some setting i wasn't aware of to do what i'm looking for.
> 
> thanks.
> -annie
> 
> On 5/10/05, Parsons Technical Services
<[EMAIL PROTECTED]> wrote:
> > I may be off base on this one but I think that once Tomcat fires off
the
> > init method it doesn't care or monitor the progress of the servlet.
Just
> > think, some servlets may take several minutes to finish. If other
apps had
> > to wait then it could take a long time to get the server started.
> >
> > Now as for a solution I am really speculating here (hopefully
someone can
> > educate both of us). I would look at a wait statement in the init
method to
> > pause the second app's servlet until the first one is done. Simply
time the
> > first app's servlet and set it for a little more.
> >
> > Hopefully someone will set me straight if I am off base here.
> >
> > Doug
> >
> > - Original Message -
> > From: "Annie Wang" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Tuesday, May 10, 2005 6:59 PM
> > Subject: question about load-on-startup in web.xml
> >
> > hi,
> >
> > regarding the  tag in web.xml:
> >
> > say i have 2 web apps (webapp1 and webapp2).  if i configure
webapp1's
> > servlet to have 1 and webapp2's
> > servlet to have 100, does this
mean
> > that tomcat will init webapp1's servlet first and once that's done,
> > it'll init webapp2's servlet?
> >
> > basically, i want both web app's servlets to auto initialize on
tomcat
> > startup, but i want webapp2's servlet to initialze only after
> > webapp1's servlet has finished initialization.  when i use the above
> > load-on-startup settings, webapp2's servlet seems to initialize
before
> > webapp1's servlet has finished initialization.
> >
> > thanks.
> > -annie
> >
> >
-
> > 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: error trying to run a jsp

2005-05-10 Thread Fay, Michael
I just realized that root owned everything under work. When I changed it to
tomcat, it works now. Thanks. 

-Original Message-
From: Fay, Michael 
Sent: Tuesday, May 10, 2005 9:36 AM
To: 'Tomcat Users List'
Subject: RE: error trying to run a jsp

Both tomcat and httpd have write permissions to the directory...is someone
else supposed to be in the tomcat group? 

-Original Message-
From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED]

Sent: Tuesday, May 10, 2005 9:21 AM
To: 'Tomcat Users List'
Subject: RE: error trying to run a jsp

Please check If the directory
"/usr/local/tomcat/jakarta-tomcat-5/build/work/Catalina/localhost/" has
write permission for wwwrun user ?


Guru

-Original Message-
From: Fay, Michael [mailto:[EMAIL PROTECTED] 
Sent: 10 May 2005 17:17
To: 'Tomcat Users List'
Subject: error trying to run a jsp


We are getting the following error when trying use a jsp, either directly
through tomcat, or through apache with the tomcat connector:

 

type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class for JSP
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
65)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
93)
 
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.io.FileNotFoundException:
/usr/local/tomcat/jakarta-tomcat-5/build/work/Catalina/localhost/jsp-example
s/org/apache/jsp/jsptest0509_jsp.java (No such file or directory)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.(FileOutputStream.java:179)
java.io.FileOutputStream.(FileOutputStream.java:70)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:131)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
56)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
93)
 
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 logs.

 

 

I know nothing about tomcat or jsp, and our web people keep insisting that
this means that java_home isn't set right, though it's set in all the
startup scripts. Can anyone give me any ideas here? 


-
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: error trying to run a jsp

2005-05-10 Thread Fay, Michael
Both tomcat and httpd have write permissions to the directory...is someone
else supposed to be in the tomcat group? 

-Original Message-
From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED]

Sent: Tuesday, May 10, 2005 9:21 AM
To: 'Tomcat Users List'
Subject: RE: error trying to run a jsp

Please check If the directory
"/usr/local/tomcat/jakarta-tomcat-5/build/work/Catalina/localhost/" has
write permission for wwwrun user ?


Guru

-Original Message-
From: Fay, Michael [mailto:[EMAIL PROTECTED] 
Sent: 10 May 2005 17:17
To: 'Tomcat Users List'
Subject: error trying to run a jsp


We are getting the following error when trying use a jsp, either directly
through tomcat, or through apache with the tomcat connector:

 

type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class for JSP
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
65)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
93)
 
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.io.FileNotFoundException:
/usr/local/tomcat/jakarta-tomcat-5/build/work/Catalina/localhost/jsp-example
s/org/apache/jsp/jsptest0509_jsp.java (No such file or directory)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.(FileOutputStream.java:179)
java.io.FileOutputStream.(FileOutputStream.java:70)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:131)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
56)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
93)
 
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 logs.

 

 

I know nothing about tomcat or jsp, and our web people keep insisting that
this means that java_home isn't set right, though it's set in all the
startup scripts. Can anyone give me any ideas here? 


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



error trying to run a jsp

2005-05-10 Thread Fay, Michael
We are getting the following error when trying use a jsp, either directly
through tomcat, or through apache with the tomcat connector:

 

type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

org.apache.jasper.JasperException: Unable to compile class for JSP
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
65)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
93)
 
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.io.FileNotFoundException:
/usr/local/tomcat/jakarta-tomcat-5/build/work/Catalina/localhost/jsp-example
s/org/apache/jsp/jsptest0509_jsp.java (No such file or directory)
java.io.FileOutputStream.open(Native Method)
java.io.FileOutputStream.(FileOutputStream.java:179)
java.io.FileOutputStream.(FileOutputStream.java:70)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:131)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
 
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
56)
 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
93)
 
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 logs.

 

 

I know nothing about tomcat or jsp, and our web people keep insisting that
this means that java_home isn't set right, though it's set in all the
startup scripts. Can anyone give me any ideas here? 



Re: Simple JavaBeans applications not working (newbie question)

2005-05-09 Thread Michael Strorm

--- Wendy Smoak <[EMAIL PROTECTED]> wrote:
> Before you continue, you might shut down Tomcat and
> delete the 'work' 
> directory associated with this webapp to make sure
> you're starting fresh. 
> (I assume such a thing exists in version 5, I'm
> still using 4.1.)

The work directory still exists in v5.5; it wasn't
necessary to delete it in this case (having figured
out from the first reply that the misnamed package was
the problem). Caching *did* occur to me as a potential
problem, however.

It's notable that for some pages, the error doesn't
always appear, or often different errors appear on
successive refreshes. I suspect that *that* is a
caching issue (and also that it is common enough to
have been explained several times elsewhere, so this
isn't a question, just an observation).

- MS 





___ 
Yahoo! Messenger - want a free and easy way to contact your friends online? 
http://uk.messenger.yahoo.com

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



Re: Simple JavaBeans applications not working (newbie question); FIXED!

2005-05-08 Thread Michael Strorm
--- Anoop kumar V <[EMAIL PROTECTED]> wrote:
> > Everything works perfectly fine in your jsp and
> bean except that the 
> > package mentioned in your bean (Beany.java) file
> seems incorrect

Aaawwrrgh! (Bangs head against wall several
dozen times)
Thank you. That was such a stupid mistake; I should
have spotted it. If there is any excuse it is that I'd
had what *looked* like the same problem with two
earlier attempts; the package name was not the problem
there. Because I thought this was the same problem, I
probably didn't consider the obvious answer again.

Really, though; this is a great example of trying too
hard, and missing what was staring me in the face.

> > Also you do not need to place a web.xml in the
> WEB-INF folder - I mean its 
> > optional since tomcat5.X 

That's okay; it seems to work *without* the web.xml
file, but not with it(!) I'll have a look at that
sometime.

> Another thing I noticed that you have placed your
> bean as a jar in the 
> WEB-INF/lib directory

Yes; I was trying lots of things out to get it to
work;  I originally did as you described.

Thanks for the help,

- MS



___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

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



Simple JavaBeans applications not working (newbie question)

2005-05-07 Thread Michael Strorm
Hi,

First off, let me apologise for the level of detail in
this message; if possible, I'd have made it shorter.

Anyway, I'm trying to learn J2EE; Tomcat seemed like a
good choice to learn the underlying technology, rather
than a particular JSP/Servlet container's deployment
tool. I can get 'plain' JSP pages working fine.

Unfortunately, I'm having major problems developing my
own Javabeans applications for Tomcat; they all fail
as shown below. The demos that come with Tomcat work
fine (although I can't get the demo at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample
to work; However- that's another story)

I understand that I should simply be able to drop the
directory structure containing my program into
$CATALINA_HOME/webapps, restart Tomcat (I'm using
5.5.7) and have it work.
Its contents (root:root ownership, Tomcat running as
root) is:-
skeleton
skeleton/subapp
skeleton/subapp/skeleton.jsp
skeleton/WEB-INF
skeleton/WEB-INF/classes
skeleton/WEB-INF/lib
skeleton/WEB-INF/lib/subapp
skeleton/WEB-INF/lib/subapp/Beany.class
skeleton/WEB-INF/lib/subapp/Beany.java
skeleton/WEB-INF/lib/subapp.jar
skeleton/WEB-INF/web.xml
Contents of files listed at end of message.

Here's what happens when I try to run it:-
(1) When I try to access
   
http://localhost:8080/skeleton/subapp/skeleton.jsp
with the setup as above, I get
HTTP Status 404 - Servlet
org.apache.jsp.subapp.skeleton_jsp
is not available
message Servlet
org.apache.jsp.subapp.skeleton_jsp
is not available

(2) If I move skeleton/WEB-INF/lib/subapp to
skeleton/WEB-INF/classes/subapp,
I get
HTTP STATUS 500 - EXCEPTION REPORT
The server encountered an internal error ()
that prevented it from fulfilling this
request.
EXCEPTION
javax.servlet.ServletException: Wrapper
cannot find servlet class
org.apache.jsp.subapp.skeleton_jsp
or a class it depends on
   

org.apache.catalina.valves.ErrorReportValve.invoke
   
(ErrorReportValve.java:105)
[... SNIP ...]
java.lang.Thread.run(Thread.java:595)

ROOT CAUSE
java.lang.ClassNotFoundException:
org.apache.jsp.subapp.skeleton_jsp
   
org.apache.catalina.loader.WebappClassLoader.loadClass
   
(WebappClassLoader.java:1332)
[... SNIP ...]
java.lang.Thread.run(Thread.java:595)

(3) If I remove the deployment descriptor altogether,
I get:-
HTTP STATUS 500 - EXCEPTION REPORT
The server encountered an internal error ()
that prevented it from fulfilling this
request.
EXCEPTION
org.apache.jasper.JasperException:
/subapp/skeleton.jsp(2,0) The
value for the useBean class attribute
subclass.Beany is invalid.
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
[... SNIP
...]
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

In short, it fails; in three noticeably different
ways, granted; but it still
fails. What on EARTH am I doing wrong or missing out?!
I'd really appreciate
some feedback on this. Thank you in advance.


Here are the files:-

** SKELETON.JSP:


Foo Bar

Foo Bar
Duzzy wuzzy was a duck; ducky fuzzy duck a wuzz blah
blah some more yak.


---
** WEB.XML


http://java.sun.com/xml/ns/j2ee";
   
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">

  Display Name
  
 Display Description
  




   
org.apache.jsp.subapp.skeleton_jsp
   
org.apache.jsp.subapp.skeleton_jsp



   
org.apache.jsp.subapp.skeleton_jsp
   
/subapp/skeleton.jsp




---
---
** BEANY.JAVA
package subapp;

public class Beany
{
   private int first;

   /** Public no-args constructor */
   public Beany()
   {
  first = 404;
   }

   public int getFirst()
   {
  return first;
   }
   public void setFirst(int first)
   {
  this.first = first;
   }

   public String stringy = "Original Value";
   public String getStringy()
   {
  return stringy;
   }
   public void setStringy(String stringy)
   {
  this.stringy = stringy;
   }
}

--
The Beany.jar file contains the Beany.java and
Beany.class files



___ 
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for 
FREE! http://uk.mail.yahoo.com

--

Re: Tomcat 5 slow, it's in production, please help!

2005-05-07 Thread Michael Echerer
Oto Bossert wrote:
> Yoo,
> 
> Yes switch to jk2 is faster!
But unsupported! Development of mod_jk1.x is going on, but not jk2. I
wouldn't advise anyone to select something uncontinued.
I set the session timeout time to 5 minutes, but
>>>
>>>in
>>>
the session view of tomcat manager, I see message
>>>
>>>"30
>>>
- <40 minutes:136 sessions". How a session that is
more than 30 minutes is still there. Maybe I don't
understand this message correctly.
Check whether you session-timeout is really set correctly. You can set
the timeout in the default web.xml for all apps, but you could override
it in the webapps web.xml, too. Maybe there it's still set too high.


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



Re: Pass parameter to the JVM at startup

2005-05-07 Thread Michael Echerer

> Looking back I was starting Tomcat from inside Eclipse with the Sysdeo
> Tomcat Plugin which apparently doesn't use the tomcat startup scripts,
> i.e., it bypasses startup.sh so it never sees -server. When I started
> tomcat manually via the cli with startup.sh with the JAVA_OPTS in
> catalina.sh it did see the -server option and it does indeed show up
> on the cli too:
> 
Nevertheless you can also configure the start options (e.g. to adjust
the memory usage) when using the Sysdeo plugin... There's a dialog for
this in Eclipse/Sysdeo as the startup scripts aren't used, as you mentioned.


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



Re: Common vs. Shared

2005-05-06 Thread Michael Echerer
Ron Heeb wrote:
> my understanding comes from this book i got: 'common is responsible for
> classes that are used by Tomcat and publicly available to all Web
> apps'.  shared is like common, except that 'developers can place their
> own classes and JAR files into the shared class loader domain'. 
> developers shouldn't put anything into common.  this is from
> Professional Apache Tomcat 5 from Wrox.  for what it's worth...ron
> 
You need "common/lib" e.g. for JDBC drivers. Because if you want to
configure a JNDI Datasource and use Tomcats Jakarta Commons DBCP
connection pool there's "no" other way then placing the .jar
into common/lib because Tomcat itself requires the classes already, not
only your webapps.

Moreover you should make sure that the webapps don't contain the
driver.jar in that case again.
Otherwise you'll face lot's of funny classloading issues...
E.g. if you work with driver specific data types you could face problems
like "instanceof" returning false although using the same class because
objects might be loaded by different classloaders (and instanceof and
casting only works within the same classloader).

Cheers,
Michael


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



Re: Pass parameter to the JVM at startup

2005-05-06 Thread Michael Echerer
Michael Echerer wrote:
>>Shouldn't it have the "-server" in there if it is running in server mode?
>>
>>How can I tell that the JVM is actually running in server mode?
> 
> 
> well, not sure if you can. I'd try java.lang.System.getProperties() or
> something...
> 
> 
Yupp... works... Just run my junitreport via ant which also dumps lots
of system properties, too:

"java.vm.name" is what you are looking for, e.g.

java.runtime.name   Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version1.4.2_05-b04
java.specification.name Java Platform API Specification
java.specification.vendor   Sun Microsystems Inc.
java.specification.version  1.4
java.util.prefs.PreferencesFactory  
java.util.prefs.WindowsPreferencesFactory
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version1.4.2_05
java.vm.infomixed mode
java.vm.nameJava HotSpot(TM) Client VM
java.vm.specification.name  Java Virtual Machine Specification
java.vm.specification.vendorSun Microsystems Inc.
java.vm.specification.version   1.0
java.vm.vendor  Sun Microsystems Inc.
java.vm.version 1.4.2_05-b04


Hence you should be able to distinguish the Client VM vs. Server VM with
a simple JSP printing those properties.

Cheers,
Michael


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



InvocationTargetException

2005-05-06 Thread Michael Oliver








I am running Tomcat 5 on XP and after
deploying a new war file, which worked, and was the only change I made, the
next time I rebooted the machine (after all it is XP) this is what I get:

 

156593 INFO  [main]
core.StandardHostDeployer - Processing Context configuration file URL
file:C:\Program Files\Apache Software Foundation\Tomcat
5.0\conf\Catalina\localhost\balancer.xml

157015 ERROR [main]
modeler.Registry - Null component Catalina:type=JspMonitor,WebModule=//localhost/balancer,J2EEApplication=none,J2EEServer=none

157031 ERROR [main]
digester.Digester - End event threw exception

java.lang.reflect.InvocationTargetException

  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:324)

  at
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)

  at
org.apache.commons.digester.SetNextRule.end(SetNextRule.java:208)

    .

    .

    .

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

Caused by:
java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V

  at
org.apache.commons.logging.impl.Log4JCategoryLog.debug(Log4JCategoryLog.java:94)

  at
org.apache.catalina.session.ManagerBase.init(ManagerBase.java:633)

  at
org.apache.catalina.session.StandardManager.start(StandardManager.java:639)

  

and further down…

158062 INFO  [main]
core.StandardHostDeployer - Processing Context configuration file URL
file:C:\Program Files\Apache Software Foundation\Tomcat
5.0\conf\Catalina\localhost\manager.xml

158062 INFO  [main]
core.StandardHostDeployer - Processing Context configuration file URL
file:C:\Program Files\Apache Software Foundation\Tomcat
5.0\conf\Catalina\localhost\manager.xml

158375 ERROR [main]
modeler.Registry - Null component Catalina:type=JspMonitor,WebModule=//localhost/manager,J2EEApplication=none,J2EEServer=none

158375 ERROR [main]
digester.Digester - End event threw exception

java.lang.reflect.InvocationTargetException

  at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    .

    .

    .

    at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

Caused by:
java.lang.NoSuchMethodError: org.apache.log4j.Category.log(Ljava/lang/String;Lorg/apache/log4j/Level;Ljava/lang/Object;Ljava/lang/Throwable;)V

  at
org.apache.commons.logging.impl.Log4JCategoryLog.debug(Log4JCategoryLog.java:94)

  at
org.apache.catalina.session.ManagerBase.init(ManagerBase.java:633)

  at
org.apache.catalina.session.StandardManager.start(StandardManager.java:639)

  

Is this an issue with the version of
log4j.jar or a class loader issue or is there a corrupt jar I should replace?

 

 

 


 
  
  
   


 
  
  
   




Loosely Coupled

   
  
  
  
  
   
  
 
 
  
  
   

Mike Oliver
CTO 


Alarius Systems LLC
6800 E. Lake Mead Blvd
Apt 1096
Las Vegas, NV 89156 

   
   

[EMAIL PROTECTED]
[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
http://www.alariussystems.com/




 
  
  tel: 
  fax: 
  mobile: 
  
  
  (702)643-7425
  (702)974-0341
  (518)378-6154 
  
 



   
  
  
  
 




 

   
  
  
  
 
 
  
  
   

Add me to your address book...


Want a signature like
this?

   
  
  
  
 


 








Re: upgrading a servlet

2005-05-05 Thread Michael Echerer
Alex Pure wrote:
> I need help with this problem
> please ..
> 
> 
> Apache Tomcat/4.0.1 - HTTP Status 404 - /servlet/utdHttpController
> 
> type Status report
> message /servlet/utdHttpController
> description The requested resource (/servlet/utdHttpController) is not
> available.
> 
Either missing servlet mapping or something went wrong with the
deployment, or similar.
Anyhow rather very "basic" problems. If you already run into trouble
here, I'd suggest books, tutorials etc. And a current Tomcat version...

Cheers,
Michael


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



Re: Pass parameter to the JVM at startup

2005-05-05 Thread Michael Echerer

> Shouldn't it have the "-server" in there if it is running in server mode?
> 
> How can I tell that the JVM is actually running in server mode?

well, not sure if you can. I'd try java.lang.System.getProperties() or
something...

At least on a Solaris machine you could figure out whether you are
running in 32bit or 64bit (triggered by -server) mode by checking
os.arch as it differs. Probably there are other sys properties giving a
hint (see javadoc).
Also the manager app shows this along with you memory settings. Hence
you could "assume" that it worked, if you also set -Xmx or Xms and check
this changing with the Tomcat manager app.

Cheers,
Michael


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



RE: Common vs. Shared

2005-05-05 Thread Michael Oliver
Oh I completely agree it is bad practice, but alas I must deal with
applications that are not my design and dealing with these conflicts is
a royal pain in my non-royal ass.

Michael Oliver
CTO
Alarius Systems LLC
6800 E. Lake Mead Blvd, #1096
Las Vegas, NV 89156
Phone:(702)643-7425
Fax:(702)974-0341
*Note new email changed from [EMAIL PROTECTED]
-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 05, 2005 1:29 PM
To: Tomcat Users List
Subject: RE: Common vs. Shared

> From: Michael Oliver [mailto:[EMAIL PROTECTED] 
> Subject: Common vs. Shared
> 
> What is the difference between the /common/ and /shared/ 
> 
> I understand this is a class loader issue, and I have read 
> the comments in catalina.properties.

But have you read the actual documentation?  In particular:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html
including this rather descriptive diagram:

  Bootstrap
  |
   System
  |
   Common
  /  \
 Catalina   Shared
 /   \
Webapp1  Webapp2 ... 

> If a jar is in /common/lib/ and a different version of that 
> jar is in /shared/lib/ what will be the effect?

Trouble, usually.  Anytime you have the same class files in multiple
places in a single path in the hierarchy, you run the risk of conflicts
and lots of NCDFE problems.  Very, very bad practice.

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



Common vs. Shared

2005-05-05 Thread Michael Oliver








I am quite sure this has been asked and
answered but I googled a bunch of combinations and didn’t find the
answer, so I am sure someone here will know and share.

 

What is the difference between the /common/
and /shared/ 

 

I understand this is a class loader issue, and
I have read the comments in catalina.properties.

 

What would go into ‘common’
that wouldn’t go into ‘shared’ and vice versa?

 

If a jar is in /common/lib/ and a different
version of that jar is in /shared/lib/ what will be the effect?

 

Similarly, if I modify catalina.properties
and add something to ‘common’ that is already in ‘shared’,
etc.

 

Understanding the relationship between ‘common’
and ‘shared’ and the intended use thereof should be of interest to
more than just me.

 

Ollie

 

 


 
  
  
   


 
  
  
   




Loosely Coupled

   
  
  
  
  
   
  
 
 
  
  
   

Mike Oliver
CTO 


Alarius Systems LLC
6800 E. Lake Mead Blvd
Apt 1096
Las Vegas, NV 89156 

   
   

[EMAIL PROTECTED]
[EMAIL PROTECTED]
IM: [EMAIL PROTECTED]
http://www.alariussystems.com/




 
  
  tel: 
  fax: 
  mobile: 
  
  
  (702)643-7425
  (702)974-0341
  (518)378-6154 
  
 



   
  
  
  
 




 

   
  
  
  
 
 
  
  
   

Add me to your address book...


Want a signature like
this?

   
  
  
  
 


 








Re: Loading JAR changes without redeploy.

2005-05-05 Thread Michael Echerer
Eduardo Lobo wrote:
> 
> Hi,
> 
> I have this problem: I need to make a web application that read some
> resources(xml files) from JAR files (located in the shared/lib folder),
> but I need to update constantly the JARs content, then I need that the
> web application always gets the last JAR files version without
> redeploy/restart the web application.
> 
> How can I do that, because right now when I replace the JAR file with
> the new one the web application don't get the changes from the JAR content?
> 
> In summary, there is some way to make a "JAR redeploy"?
I guess a "JAR redeployment" is not really feasible or a good solution.
You should better reconsider if it's a good idea to place files that get
modified over and over into a jar at all and especially into shared/lib.

Can't you place the xml files somewhere else?

If you really need it in this jar, you might still load it on a file
basis instead of classpath resource basis (e.g. unjar the jar file
yourself and read the xml file instead of relying on the classloader)

> 
> Any help you can provide me will be well appreciated. .
> 
> Thanks.
> 
> -
> 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]



  1   2   3   4   5   6   7   8   9   10   >