[FAQ] jGuru FAQ Update

2001-12-14 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

Why is it strongly recommended that any JavaBean used within a JSP page belong to a 
named package?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=585610


You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




JndiRealm for Tomcat 4.0 and 3.2x alpha2 is available

2001-03-31 Thread Roytman, Alex
Title: JndiRealm for Tomcat 4.0 and 3.2x  alpha2 is available





JndiRealm for Tomcat 3.2 and Tomcat 4.0 readme:
http://www.peacetech.com/java/files/apache/tomcat/jndi-auth.html


JndiRealm for Tomcat 3.2 and Tomcat 4 Alpha 2 download:
http://www.peacetech.com/java/files/apache/tomcat/jndi_auth_alpha2.jar
(Please use java jar or zip utility to extract files)


I would greatly appreciate your feedback
Alex Roytman
[EMAIL PROTECTED]









    className="com.peacetech.webtools.tomcat.JndiRealm"
    debug="1"
    JNDI_INITIAL_CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory"
    JNDI_PROVIDER_URL = "ldap://207.176.93.66:389"
    JNDI_SECURITY_AUTHENTICATION = "simple"
    JNDI_SECURITY_PRINCIPAL = "cn=ldap-user,o=pti"
    JNDI_SECURITY_CREDENTIALS = "mypassword"
    JNDI_SECURITY_PROTOCOL = ""
    jndiInitialContext = "o=pti"
    jndiSearchFilter = "cn={0}"
    jndiRolesAttributes = "securityEquals"
    contextDirMaxPoolSize = "20"
    roleMapperClass = "com.peacetech.webtools.tomcat.SimpleRoleMapper"/>




  debug="1"
  JNDI_INITIAL_CONTEXT_FACTORY = "com.sun.jndi.ldap.LdapCtxFactory"
  JNDI_PROVIDER_URL = "ldap://207.176.93.66:389"
  JNDI_SECURITY_AUTHENTICATION = "simple"
  JNDI_SECURITY_PRINCIPAL = "cn=ldap-user,o=pti"
  JNDI_SECURITY_CREDENTIALS = "mypassword"
  JNDI_SECURITY_PROTOCOL = ""
  jndiInitialContext = "o=pti"
  jndiSearchFilter = "cn={0}"
  jndiRolesAttributes = "securityEquals"
  contextDirMaxPoolSize = "20"
  roleMapperClass = "com.peacetech.webtools.tomcat.SimpleRoleMapper"
  roleMapperSourceUrl="file:///z:/Projects/Gao/gwiz/web/gwiz/WEB-INF/role-map.xml" />









Re: Bad Links

2001-03-31 Thread Alex Potter

Try here.

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.1/bin/win32/i38
6/

HTH

Alex
- Original Message -
From: "Eric Bewley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sat 31 March 2001 16:48
Subject: Bad Links


: I am unable to find the Jakarta NT service file at the link you
: provide.  There is no such directory.
:
: Eric
:
:




Re: ** Help required: Err in Apache httpd could not be started **

2001-04-02 Thread Alex Potter

Have you examined the paths in tomcat/conf/workers.properties? you need to
set workers.tomcat_home and workers.java_home, and also your path separator
'/' for NIX, '\' for Windows.

HTH

Alex
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Mon 02 April 2001 09:22
Subject: ** Help required: Err in Apache httpd could not be started **


: Hi,
:
: When I tried to start apache, which is configured to tomcat, it gives me
: following error.
:
: httpd could not be started
:
: the error log file of apache says
: [emerg] (2)No such file or directory: Error while opening the workers
:
: My OS: linux
:
: Regards,
: Prashanth
:




how to access a properties file as a resource.

2001-04-02 Thread Alex Colic

Hi,

I have a properties file in the web-inf directory of my web app. How can I
access that file. It holds my localization settings I have tried.

String pathSeperator =File.separator.

InputStream is=context.getResourceAsStream("Web-inf" + pathSeperator +
"pwWorkRequestProLocalization");

PropertyResourceBundle  res= new PropertyResourceBundle(is);

When the input stream tryes to get the resource I get the following Tomcat
error:

Ctx(  ): Unsafe path C:\JBuilder4\Projects\pwWorkRequest
/Web-inf\pwWorkRequestProLocalization"

And when the PropertyResourceBundle tries to read the input stream I get a
nullpointerexception.

I have tried various strings to pass to context.getResourceAsStream() but I
have not been successful. Any help is appreciated.





NullPointerException in Catalina StandardClassLoader when JAR with no manifest is added to one of the lib directories

2001-04-02 Thread Roytman, Alex



NullPointerException in  Catalina 
StandardClassLoader when JAR with no manifest is added  to one of the lib 
directories
Adding manifest 
to the jar fixes the problem
 
D:\java\apache\tomcat4\bin>catalina 
runUsing CLASSPATH: 
d:\java\apache\tomcat4\bin\bootstrap.jar;c:\java\jdk\lib\tools.jarjava.lang.NullPointerException    
at 
org.apache.catalina.loader.Extension.getAvailable(Extension.java:300)    
at org.apache.catalina.loader.    
.addRepositoryInternal(StandardClassLoader.java:1133)    
at 
org.apache.catalina.loader.StandardClassLoader.(StandardClassLoader.java:219)    
at 
org.apache.catalina.startup.Bootstrap.createCatalinaLoader(Bootstrap.java:328)    
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:121)Exception 
in thread "main" java.lang.IllegalArgumentException: addRepositoryInternal: 
java.lang.NullPointerException    at 
org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java:1145)    
at 
org.apache.catalina.loader.StandardClassLoader.(StandardClassLoader.java:219)    
at 
org.apache.catalina.startup.Bootstrap.createCatalinaLoader(Bootstrap.java:328)    
at 
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:121)D:\java\apache\tomcat4\bin>
 
 

   


FW: RE: how to access a properties file as a resource.

2001-04-02 Thread Alex Colic



But that would mean that the property file is somewhere on the class path. I
want it in the web-inf/ directory.

Do you understand what I mean?


>Date: Mon, 2 Apr 2001 06:53:38 -0700
>To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
>From: William Kaufman <[EMAIL PROTECTED]>
>Subject: RE: how to access a properties file as a resource.
>Message-ID: <635802DA64D4D31190D500508B9B04108214E1@dcsrv0>

>Use java.util.ResourceBundle.getBundle().
>
-- Bill K.




JNDI & LDAP Realm for Tomcat 4.0 & Tomcat 3.2x alpha3 available: NEED YOUR FEEDBACK!

2001-04-02 Thread Roytman, Alex
Title: JNDI & LDAP Realm for Tomcat 4.0 & Tomcat 3.2x alpha3 available: NEED YOUR FEEDBACK! 





Dear tomcat users and developers,


This is an implementation of JNDI and LDAP realm for Tomcat 3 and 4 
I would greatly appreciate you feedback regarding its functionality. 


Alex Roytman


download from http://www.peacetech.com/java/files/apache/tomcat/


JndiRealm authenticates and authorizes users against JNDI. It was tested against LDAP JNDI
with Sun's and Netscape's jndi providers
LdapRealm authenticates and authorizes users directly against LDAP using Netscape LDAP JDK.
These two realms are interchangeable you can switch between them without many configuration changes.
According to my tests it performs 10 faster under 20 concurrent threads than JNDI with
Sun's LDAP provider. This is not final result because I need to test and tune-up multithreaded
access and synchronization there might be some misunderstanding on my part.
I also noticed some cases of JNDI loosing connection to the server under heavy multithreaded
load while Netscape's LDAP handled it nicely.
There are four classes in the package :
  JndiRealm and LdapRealm are for Tomcat 3.2x
  JndiRealmCatalina and LdapRealmCatalina for Tomcat 4.0


className="com.peacetech.webtools.tomcat.JndiRealm"   JNDI TOMCAT 3.2x
className="com.peacetech.webtools.tomcat.JndiRealmCatalina"   JNDI TOMCAT 4.0
className="com.peacetech.webtools.tomcat.LdapRealmCatalina"   LDAP TOMCAT 4.0
className="com.peacetech.webtools.tomcat.LdapRealm"   LDAP TOMCAT 3.2x


Jndi/LdapRealm uses searchBindDN and searchBindCredentials to connect to a directory.
Then it looks for exactly one user name matching searchFilter in searchBaseContext
scoped by searchScopeAsString (values are "base", "one", "sub" according to LDAP URL rules)
If one and only one matching directory object is found it will use this object and
tomcat supplied credentials to authenticate the user.
If successful Realm will fetch user roles using JNDI attributes listed in securityAttributes
(comma separated directory attribute names). If attributesReadByOwner = "true" Realm will use
authenticated user itself to pool the attributes from directory otherwise it will use searchBindDN
to retrieve the attributes.
If roleMapperClass is specified Realm will use it to map user roles onto application roles
specific for each web context for tomcat 3.2x and specific for each defined Realm for tomcat 4.2.
Provided SimpleRoleMapper implementation will read role map from either roleMapperSourceUrl
(if specified) or for tomcat 3.2x from WEB-INF/role-map.xml file in each web context
if no roleMapperSourceUrl was defined (if WEB-INF/role-map.xml file does not exist in a context
no mapping for this context will occur)



PARAMETERS:


jndiInitialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory"
    (or "com.netscape.jndi.ldap.LdapContextFactory")
This attribute for JndiRealm ONLY.
It corresponds to javax.naming.Context.INITIAL_CONTEXT_FACTORY


directoryUrl = "ldap://207.176.93.66:389"
This attribute for both JndiRealm and LdapRealm.
It corresponds to javax.naming.Context.PROVIDER_URL


jndiSecurityAuthentication = "simple"
This attribute for JndiRealm ONLY.
It corresponds to javax.naming.Context.SECURITY_AUTHENTICATION


jndiSecurityProtocol = "" ("" vendor default or "ssl", or vendor specific)
This attribute for JndiRealm ONLY.
It corresponds to javax.naming.Context.SECURITY_PROTOCOL


searchBindDN = "cn=ldap-user,o=pti"
This attribute for both JndiRealm and LdapRealm. User name to bind to directory
a to perform user name lookups. It corresponds to javax.naming.Context.SECURITY_PRINCIPAL


searchBindCredentials = "mypassword"
This attribute for both JndiRealm and LdapRealm. Password for searchBindDN
It corresponds to javax.naming.Context.SECURITY_CREDENTIALS


searchBaseContext = "o=pti"
Base context for user lookups


ldapVersion = "3"
This attribute for LdapRealm ONLY. Defines LDAP version.


searchScopeAsString = "base" | "one" | "sub"
defines search scope "base" - object scope, "one" - one level scope, "sub" - subtree scope.


attributesReadByOwner = "true"
defines who will read securityAttribures from the directory. If "true" authenticating user account
will be used to retrieve the roles otherwise the searchBindDN account used for user name lookups will
fetch the attributes. It is useful when either one or the other do not have permission to read the
attributes so you can chose the one which has this permissions


searchFilter = "cn={0}"
Filter to lookup authorizing user. Support java.text.MessageFormat.
The only parameter is to java.text.MessageFormat pattern authorizing username.

How to get around a tricky situation.

2001-04-03 Thread Alex Colic

Hi,

I need some advice on how I might fix a problem with one of our web apps. We
farmed out an app that works ok except that the web pages which are created
by servlets are looking for images in the tomcat root images directory. This
presents a problem in that if I create a war of our app I also have to
distribute and copy the images over to the root images directory.

Can I set up my web.xml file so that when a web page looks for an image in
the /images directory it actually pulls them out of my myWebApp/images
directory.

What I am trying to achieve is one war file that I can use to distribute our
app without having the customer copy images over to the root/images
directory.

Thanks for any help.

Regards

Alex Colic-0132




Can't set-up Tomcat for ssl. Please help.

2001-04-03 Thread Alex Colic

Help,

I have been trying to set up tomcat to run ssl direct.

I have done the following:

1: I added the following to server.xml
  




  

2: edited the java.security file
3: added jcer.jar, jnet.jar and jss3.jar to jre/lib/ext and tomcat/lib
4: created a key via keytool

I think the above is all I need to do but..how am I to access SSL.

If I open up a web page via http://localhost/myapp/index.jsp the page loads
but if I open it up via https://localhost/myapp/index.jsp it does not. If I
go to the command prompt I can see that no exceptions were thrown.

Any help in understanding how to get Tomcat and direct ssl to work is
appreciated.

Regards

Alex Colic




Re: Still Can't set-up Tomcat for ssl. Please help.

2001-04-04 Thread Alex Colic

Hi,

Thanks for the reply. I changed the port to 443 but there was no change.

Am I correct in assuming that once I have https working I should be able to
access the same page via:

http:\\localhost\index.html
and https:\\localhost\index.html or https:\\localhost:443\index.html

Because I can see the first page but the second page gives me a 404 error
this page can not be found. As for the firewall, I am testing this
implementation on an intranet. At this point I should not have to worry
about firewalls etc., right?

Thanks for any help

>Date: Tue, 3 Apr 2001 16:18:52 +0100 (BST)
>To: Tomcat-User <[EMAIL PROTECTED]>
>From: Kevin Sangeelee <[EMAIL PROTECTED]>
>Subject: Re: Can't set-up Tomcat for ssl. Please help.
>Message-ID: <[EMAIL PROTECTED]>
>
>If you're running Tomcat standalone, try changing the port value to 443
>rather than 8443 (and make sure any firewalls are configured to allow this
>protocol) (or of course append :8443 to your https request).
>
>Kevin




Re: How to get around a tricky situation.

2001-04-04 Thread Alex Colic

Just so I understand, to do the below I would have to modify my server.xml
file...correct? This cannot be done in my web.xml file?

Thanks

Alex

>Date: Wed, 04 Apr 2001 09:47:56 +0200
>To: [EMAIL PROTECTED]
>From: =?iso-8859-1?Q?St=E9phane?= BAUDET <[EMAIL PROTECTED]>
>Subject: Re: How to get around a tricky situation.
>Message-ID: <[EMAIL PROTECTED]>
>
>Hello
>
>You could also create a new "empty" context called /images with docbase
>properly set to the location of your images. This context will serve
>your images.





Help with refreshing servletContext please.

2001-04-18 Thread Alex Colic

Hi,

I am implementing a method of caching lists that I want available to all my
web users. I place lists in the servletcontext via:

context.setAttribute("storeroomList",storerooms );

When the lists change I recall my cachelist method which gets the new data
and then put the list back into the session using the above line of code. I
thought that would replace the present list with the new one but
that is not occurring.

Is there another way I am supposed to be replacing attributes?

I thought about using removeAttribute followed by setAttribute but I am
worrying that someone might be accessing a page might need a list just as I
removing the list.

To test the problem I opened up a web page populated with my list and then
went to the database and changed some values in the list. My program then
caught these
changes, and repopulated the lists and then placed them in the context
again. I then opened up another window and the page was populated with the
old data.

Any help in this matter is appreciated.

Alex






Is this a bug in tomcat or me?

2001-04-19 Thread Alex Colic

Hi,

I am having major problems with the servletContext.

In my main class I do the following:

  ServletContext context=getServletContext();
  context.setAttribute("Key", Boolean.TRUE);

Then in one of my jsp tags if want to check the value of "Key" I do the
following:

Boolean active =
(Boolean)pageContext.getServletContext().getAttribute("Key");

If I want to change the value of "Key" I do the following:

  Boolean active=(Boolean)context.getAttribute("Key");
  active=Boolean.TRUE or FALSE;
  context.setAttribute("Key",active);

I have also tried:

context.setAttribute("Key",Boolean.FALSE);

My problem is no matter what value I set, when I pull active out the value
of "Key" out of the context it is always TRUE.

Any ideas what I am doing wrong?

Any help is appreciated

Regards

Alex




Re: Boycott China - please read - your life may depend on it

2001-04-27 Thread Alex Fernández

Ha ha ha, that's funny.

You US guys are so obsessed with military potential, everyone is willing
to invade you :)

And, to the pseudo-fascist guy who wrote in the first place, remember
this is not an US-only list discussing mortgages in Pennsylvannia, it's
an international list that deals with Tomcat usage. Please show your
narrow-mindedness someplace else.

To the rest of you, sorry for this rant :)

Un saludo,

Alex.

David Patton wrote:
> 
> Rick:
> 
> Not sure who you are, or how yu got my email address, or why you sent me
> this, but frankly I think what you are proposing is incredibly stupid and
> shortsighted.  Do you realize that approximately 60% or so of the goods sold
> in this country are made in China.  Not to mention that China is the largest
> holder of US Treasury Bonds.  What does this mean?  It means we are
> economically  interdependent on CHina and that waging any sort of economic
> warfare such as a boycott of theoir goods, will only hurt the United States
> in the long run.  As for our trade deficit with China, I submit that is due
> primarily to our own economic policy blunders.  As for the other points:
> Who cares if Russia is selling equipment to China, Those torpedos (Aircraft
> Carrier Killers) which you so alarmingly called attention to have been
> around for years.  They are wake homing torpedoes, and you are right we have
> no defense against them.  BUt we have the same thing.  Lets also not forget
> that having a torpedo doesnt do much good if you cant get close enough to
> launch it, and Chinese submarines are noisy and easy to track.  Yes Chinese
> military doctrine calls for a military confrontation with the US within 20
> to 30 years.  So what?  At least we know about it.  If I were you I would be
> more concerned with an internal revolution inside China destabilizing the
> government, and causing a civil war.  That is more of a threat than China
> itself.  So in short what I am trying to say is please do not bother me with
> alarmist uninformed right wing rhetoric.  Thank you and have a nice day.
>



Re: Forwarding

2001-05-03 Thread Alex Fernández

forward() will only send it to another servlet or jsp, I think.

However, sendRedirect() will work with external URLs. Just do

response.sendRedirect("http://www.misMuelas.com";);

Un saludo,

Alex.

Zsolt Koppany wrote:
> 
> Thank you for the idea, I know the jsp:forward command but I was not
> able to forward to a complete different URL for example
> "http://www.sun.com:8080";. Do you know how to do that?
> 
> Zsolt
> 
> Barthélémy TEHAM wrote:
> >
> > by using jsp:forward Action
> >
> > exple: 
> >
> > Documentation source:
> > 
>http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-JSP.html#Section8.6
> >
> > --- Zsolt Koppany <[EMAIL PROTECTED]> a écrit : > Hi,
> > >
> > > how can I forward to a page that the user does not see where he was
> > > forwarded to? The reason is, we might change the target host or page and
> > > if the user makes a bookmark to the forwarded page he cannot come back
> > > if we change the target host or the page.
> > >
> > > Zsolt
> > >
> > > --
> > > Zsolt Koppany
> > > Intland GmbH www.intland.com
> > > Schulze-Delitzsch-Strasse 16
> > > D-70565 Stuttgart
> > > Tel: +49-711-7871080 Fax: +49-711-7871017
> >
> > =
> > Barthélémy TEHAM -
> > E-mail : [EMAIL PROTECTED]
> > Website: http://teham.free.fr
> >
> > ___
> > Do You Yahoo!? -- Pour faire vos courses sur le Net,
> > Yahoo! Shopping : http://fr.shopping.yahoo.com
> 
> --
> Zsolt Koppany
> Intland GmbH www.intland.com
> Schulze-Delitzsch-Strasse 16
> D-70565 Stuttgart
> Tel: +49-711-7871080 Fax: +49-711-7871017



Re: How to obtain user's IP address

2001-05-03 Thread Alex Fernández

They are different things. The remote user only appears if the user did
enter his user id and password. The IP address you want is the remote
host, so you would use
request.getRemoteHost();

Un saludo,

Alex.

Jack Li wrote:
> 
> Hello,
> 
> I need to know who visits my web page. In jsp, I got "null" when I used
> "request.getRemoteUser()". Then any other mehods can obtain user's name or
> IP address?
> 
> Thanks
> Jack Li



Re: Memory usage

2001-05-03 Thread Alex Fernández

Hi Mark!

I don't think so. When you "set a bean equal to null", you just erase a
reference to it. Any other references left around would make it linger
in memory, and there might be a few. Are you talking about EJBs?

Anyway, if you set to null the only existing reference, you'll have to
wait for the next gc cycle. If you call System.gc() explicitly, you're
forcing this cycle and the object might go away.

Un saludo,

Alex.

"Jurrius, Mark" wrote:
> 
> Correct me if I'm wrong.  If for instance I want a bean removed knowing that
> System.gc() does not happen immediately, would setting the bean equal to
> null force the bean to be removed from memory right away and not have to
> rely on the garbage collection to eventually take place?
> 
> Mark
> 
> -Original Message-
> From:   William Kaufman [mailto:[EMAIL PROTECTED]]
> Sent:   Thursday, May 03, 2001 10:07 AM
> To: '[EMAIL PROTECTED]'
> Subject:RE: Memory usage
> 
> > That your finalize method is called, doesn't mean that
> > the garbage collector has released your objects. The
> > only way to be shure that this happens, is to explicitly
> > run System.gc().
> 
> Even that's not sufficient: it just suggests to the VM that
> garbage-collecting might be a good idea right now.  Any actual garbage
> collection would take place later, in another thread.
> 
> And, even when it does happen, that doesn't mean all the memory will
> necessarily be released to the OS: the VM will hold on to some so that it
> won't need to go back to the OS on the next allocation.
> 
> You might want to get a memory profiler (like JProbe) and see where the
> memory is going.  At the very least, try doing something like,
> 
> Runtime rt = Runtime.getRuntime();
> System.err.println("Free="+rt.freeMemory()+",
> total="+rt.totalMemory());
> 
> often, to see how much memory is actually in use, and how much is just
> allocated from the OS.
> 
> -- Bill K.
> 
> > -Original Message-
> > From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 03, 2001 5:51 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: AW: Memory usage
> >
> >
> > That your finalize method is called, doesn't mean that
> > the garbage collector has released your objects. The
> > only way to be shure that this happens, is to explicitly
> > run System.gc(). Otherwise it's up to the VM when it will
> > free the memory. (Sun's JDK per default only releases
> > memory if otherwise an OutOfMemoryError would occur, so
> > unless you reach this border the VM will constanly grow)
> >
> > See also the options for the JVM:
> >   -verbose:gc (Any VM)
> >   -Xincgc (Sun SDK 1.3.*)
> >   -Xms (Sun + IBM)
> >   -Xmx (Sun + IBM)
> >
> > -Ursprüngliche Nachricht-
> > Von: Garry De Toffoli [mailto:[EMAIL PROTECTED]]
> > Gesendet: Donnerstag, 3. Mai 2001 14:34
> > An: [EMAIL PROTECTED]
> > Betreff: Memory usage
> >
> > 
> > I have in trouble with the memory usage with Tomcat 3.21, WinNt 2000
> > and Jdk 1.3 of Sun. the problem is that any operation does
> > not release
> > the memory occuped; to control the memory usage I use the
> > Task Manager;
> > when Tomcat start, the memory used from the process Java is of 9608 K;
> > when I request a Jsp page that has an error, like a variable
> > not declared,
> > the memory used is 11868K; if I wait for 1 ay also, this
> > value does not
> > change, so the memory used is not released,
> >
> > running a correct Jsp page, the memory used increase, and this is not
> > released yet;
> > I have written a log on the finalize method of my class, and this is
> > called, so the garbage collector release all my object.
> >
> > This behavoir is normal?
> > Probably changing the version of Tomcat this problem may be corrected.
> > 
> >



Re: AW: server.xml / dtd

2001-05-04 Thread Alex Fernández

Hi Roman!

"Gerteis, Roman" wrote:
> 
> Nope,
> 
> in the /conf folder, this is the web.dtd for validating web.xml
> configuration files.
> TomCat is not coming with a server.dtd, at least slocate was not finding
> anything ;)

There's no such thing as a server.dtd.

> I'm searching for the server.dtd as well. It's not specified in the Java
> Servlet Standard. So it must be something Tomcat specific.

In fact, given the model used by Tomcat there cannot be a server.dtd --
custom tags may be defined by additional Interceptors. Maybe this should
be changed to a key-value approach, but right now it seems a
low-priority kind of thing.

Un saludo,

Alex.

> regards...
> ..roman.
> 
> -Ursprüngliche Nachricht-
> Von: Hari Yellina [mailto:[EMAIL PROTECTED]]
> Gesendet: Freitag, 4. Mai 2001 14:43
> An: [EMAIL PROTECTED]
> Betreff: Re: server.xml / dtd
> 
> it can be found in cofig directory of u r tomcat
> - Original Message -
> From: Nathan Coast <[EMAIL PROTECTED]>
> To: tomcat user <[EMAIL PROTECTED]>
> Sent: Friday, May 04, 2001 9:39 PM
> Subject: server.xml / dtd
> 
> > Hi,
> >
> > where can I find the dtd of server.xml? - is there such a thing?
> > Is the dtd the best place to find docs on server.xml or is there a
> complete
> > configuration doc elsewhere?
> >
> > Thanks
> > Nathan
> >



Re: java database

2001-05-11 Thread Alex Fernández

I used hypersonicSQL about three months ago, and it was so slow. The
idea was probably good, a light-weight DB in pure Java, but the
implementation took ages just to perform a select.

I don't think it was a configuration issue, because I just measured the
example given.

Un saludo,

Alex.

Steve Ruby wrote:
> 
> > Kevin Fonner wrote:
> >
> > Do any good 100% pure java databases exist?  Open Source java
> > databases?
> 
> sorry forgot the url for hypersonicSQL
> 
> http://sourceforge.net/projects/hsql/



How to configure Tomcat to respond to arbitrary DNS name?

2001-05-12 Thread Alex Greysukh

Could somebody help to find an explicit answer on the following:


How to configure Tomcat as a stand-alone server to respond not to only
http://localhost:8080/ but to any DNS name (http://www.foo.com:8080)?
Unfortunately all the examples in the doc reduced to the localhost case...

Alex Greysukh




Homepage

2001-05-15 Thread ALex Loubyansky


Hi!

You've got to see this page! It's really cool ;O)


<>


re[2]: how can I unsubscribe from this list

2001-05-16 Thread Alex Nghiem

> To remove your address from the list, send a message to:
   <[EMAIL PROTECTED]> <

Bob:

I have sent 4 msgs to this address to unsubscribe myself w/ wo effect.

I have also contacted the owner of the list w/o any success either.

Regards,

- Alex -
****
* Alex Nghiem  770.457.4144 / 770.331.6909 (C) *
* Internet Entrepreneur & Author [EMAIL PROTECTED] *
*  AOL IM: adn2294 *




Re: AW: mailing list or news group??

2001-05-17 Thread Alex Fernández

Hi Mark and the gang!

I vote for a FAQ. While I find that this list is quite well-behaved as
to signal-to-noise, there's also a problem with recurrent questions. So,
the traffic is uncomfortably high.

The advantage of a mailing list is that people in the know lurk around
and you get qualified answers. On a newsgroup, you get lots of free-porn
messages. On a forum, you get a sore finger.

But anyhow, you don't have to trust my opinion or tastes. This is open
source: if you like the idea, go ahead and make the web forum! I'm sure
we'd all be happy if it served us novice users.

Un saludo,

Alex.

Mark Mynsted wrote:
> 
> I also vote for a web-based forum.  (Such as those provided for free at SourceForge).
> 
> Sincerely yours;
> 
> Mark Mynsted
> 
> VHA Management Information Systems Client Services
> [EMAIL PROTECTED]
> (972) 830 - 0592, Internal x1592
> 
> >>> [EMAIL PROTECTED] 5/17/2001 8:10:12 AM >>>
> I vote for a web-based forum - all you need is a web browser,
> which you all no doubt have or you wouldn't have subscribed
> to this forum in the first place!
> 
> Dario Novakovic wrote:
> 
> > if anybody else agree with me, please write, and if
> > there is enough of us we can submit petiton to mailing
> > list owners requsting better quality of service.
> >
> 
> --
>  Hassan Siddiqui  ESA/SCI/SAX
>  Tel:   +31-(0)71-565 5899Room Dd 015, ESTEC
>  Fax:   +31-(0)71-565 4690PO Box 299, 2200 AG Noordwijk
>  http://astro.estec.esa.nlThe Netherlands



tomcat IIS error

2001-05-18 Thread Alex Almero



got this error under the isapi.log
    
jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
 
also under the w3svc/ex"date"
    GET 
/jakarta/examples/jsp/snp/snoop.jsp 200


Re: sendRedirect using POST

2001-05-23 Thread Alex Fernández

Hi Glyn!

Glyn Walters wrote:
> Looking through the archives I could not see if this was resolved by
> anybody. I am trying to use a servlet that is posted user authentication
> data to post the data back to a redirect url. Is it possible to use
> sendRedirect or another technique to POST the return paramters to a URL?

Probably it's not in the archives, since it's not a Tomcat-related
question.

Anyways, if you're inside a webapp (another servlet in the same
context), use RequestDispatcher.forward(); if it's a remote URL, use
sendRedirect. POST data should be resent too.

Un saludo,

Alex.



Re: Multiple requests

2001-05-23 Thread Alex Fernández

Hi David!

You can commit the response, and then the request will not be
resubmitted. But it's difficult, since the problem was that Tomcat is
not honoring the requests, to begin with.

In iPlanet, you can tell how many requests can be queued; it would be
interesting to know whether you can do the same in Tomcat. I know how to
configure a thread pool, but not queue size!

Un saludo,

Alex.

David Oxley wrote:
> 
> I have been load testing our servlet and under high load requests start to
> take a long time (30secs ish). When a request takes this long a browser
> resubmits the request automatically. Is there a status I can send to the
> browser to say that the server is actually doing something and therefore
> stop duplicate requests coming through, or do I need to do some synchronise
> code on the session (which seems a little dodgy to me).
> 
> Thanks.
> Dave.
> [EMAIL PROTECTED]



Re: Multiple requests

2001-05-23 Thread Alex Fernández

So, just to clarify:

The request arrives, Tomcat processes it and sends it to your servlet.
You do:
response.setContentType("text/html");
// commits the response
response.flushBuffer();
and, while your servlet thinks what it must send next, the browser
resends the response.

Is this the case? What browser is it? Mine (Netscape Communicator 4.7)
does not.

Un saludo,

Alex.


David Oxley wrote:
> 
> This isn't the problem. Tomcat is calling my servlet, but because the
> machine is so busy it is taking a long time to construct the response, and
> hence the request is resubmitted before it has sent back the response. I
> need a way to tell the browser that the server has received the request and
> that a response will be along shortly. Is this what the SC_CONTINUE header
> does, or is there another header I can send.
> 
> Thanks.
> Dave
> [EMAIL PROTECTED]
> 
> -Original Message-
> From: Alex Fernández [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2001 14:50
> To: [EMAIL PROTECTED]
> Subject: Re: Multiple requests
> 
> Hi David!
> 
> You can commit the response, and then the request will not be
> resubmitted. But it's difficult, since the problem was that Tomcat is
> not honoring the requests, to begin with.
> 
> In iPlanet, you can tell how many requests can be queued; it would be
> interesting to know whether you can do the same in Tomcat. I know how to
> configure a thread pool, but not queue size!
> 
> Un saludo,
> 
> Alex.
> 
> David Oxley wrote:
> >
> > I have been load testing our servlet and under high load requests start to
> > take a long time (30secs ish). When a request takes this long a browser
> > resubmits the request automatically. Is there a status I can send to the
> > browser to say that the server is actually doing something and therefore
> > stop duplicate requests coming through, or do I need to do some
> synchronise
> > code on the session (which seems a little dodgy to me).
> >
> > Thanks.
> > Dave.
> > [EMAIL PROTECTED]



Form based Authentication - URLs with username:password are not supported

2001-05-23 Thread Roytman, Alex
Title: Form based Authentication - URLs with username:password are not supported 





When using form based authentication urls username and password do not work
i.e. http://alex:[EMAIL PROTECTED]/examples


it works just fine with basic authentication but not with form based 





Please help. Accessing protected url from java when using form based authentication

2001-05-23 Thread Roytman, Alex
Title: Please help. Accessing protected url from java when using form based authentication 





I need to access a protected resource on my web site from java. I use form based authentication and I was hoping that following sequence will make it but it dos not

1. Open url to protected resource. get JSESSIONID from headers
2. Post to /mycontext/login/j_security_check with cookie set to JSESSIONID= and name and password as POST parameters

3. Access protected resource again using the same session id


Any help is greatly appreciated


Alex





Re: Multiple requests

2001-05-24 Thread Alex Fernández

You can't but try.

Un saludo,

Alex.

David Oxley wrote:
> 
> I am not doing the flushBuffer(). But apart from that, that is what I am
> doing. Will the flushBuffer() prevent the browser from doing its subsequent
> request. We are using IE5.
> 
> Dave
> [EMAIL PROTECTED]
> 
> -----Original Message-
> From: Alex Fernández [mailto:[EMAIL PROTECTED]]
> Sent: 23 May 2001 16:34
> To: [EMAIL PROTECTED]
> Subject: Re: Multiple requests
> 
> So, just to clarify:
> 
> The request arrives, Tomcat processes it and sends it to your servlet.
> You do:
> response.setContentType("text/html");
> // commits the response
> response.flushBuffer();
> and, while your servlet thinks what it must send next, the browser
> resends the response.
> 
> Is this the case? What browser is it? Mine (Netscape Communicator 4.7)
> does not.
> 
> Un saludo,
> 
> Alex.
> 
> David Oxley wrote:
> >
> > This isn't the problem. Tomcat is calling my servlet, but because the
> > machine is so busy it is taking a long time to construct the response, and
> > hence the request is resubmitted before it has sent back the response. I
> > need a way to tell the browser that the server has received the request
> and
> > that a response will be along shortly. Is this what the SC_CONTINUE header
> > does, or is there another header I can send.
> >
> > Thanks.
> > Dave
> > [EMAIL PROTECTED]
> >
> > -Original Message-
> > From: Alex Fernndez [mailto:[EMAIL PROTECTED]]
> > Sent: 23 May 2001 14:50
> > To: [EMAIL PROTECTED]
> > Subject: Re: Multiple requests
> >
> > Hi David!
> >
> > You can commit the response, and then the request will not be
> > resubmitted. But it's difficult, since the problem was that Tomcat is
> > not honoring the requests, to begin with.
> >
> > In iPlanet, you can tell how many requests can be queued; it would be
> > interesting to know whether you can do the same in Tomcat. I know how to
> > configure a thread pool, but not queue size!
> >
> > Un saludo,
> >
> > Alex.
> >
> > David Oxley wrote:
> > >
> > > I have been load testing our servlet and under high load requests start
> to
> > > take a long time (30secs ish). When a request takes this long a browser
> > > resubmits the request automatically. Is there a status I can send to the
> > > browser to say that the server is actually doing something and therefore
> > > stop duplicate requests coming through, or do I need to do some
> > synchronise
> > > code on the session (which seems a little dodgy to me).
> > >
> > > Thanks.
> > > Dave.
> > > [EMAIL PROTECTED]



Re: response.sendRedirect vs. requestDispatcher.forward

2001-05-29 Thread Alex Fernández

Conceptually, requestDispatcher.forward() is different from
response.sendRedirect().

In forward(), you are moving inside the same webapp, and as such it
doesn't even reach the client browser. The session is maintained.

In sendRedirect(), you're instead moving across webapps, and it's the
browser that redirects to the specified location. In fact, it doesn't
even need to be another servlet, you may redirect to an ASP or a static
page. New request and response are created.

It seems strange that the session is not maintained, though, since both
requests come from the same browser. Perhaps it's a bug?

Un saludo,

Alex.

A Yang wrote:
> 
> Hi All,
> 
> Does anyone know offhand whether the Java Servlet
> specification requires a new HttpSession to be created
> when using HttpServletResponse.sendRedirect()?
> 
> In a servlet, I was using:
> 
> 
>getServletConfig().getServletContext().getRequestDispatcher("/Result.jsp").forward(req,
> resp);
> 
> at the end of a sequence of pages/servlets, but I
> wanted to replace it with
> 
> response.sendRedirect("/Result.jsp");
> 
> instead. The result page prints out the contents of
> several javabeans which are stored in the session.
> 
> This worked fine when all I used were
> requestDispatcher.forward but with
> response.sendRedirect(), all of my session attributes
> are gone! In fact, the session id is different after
> the sendRedirect.
> 
> I'm pretty sure the session is supposed to survive
> across any series of GET's and POST's until it is
> invalidated explicitly (or timed out).
> 
> Any thoughts? I'm using Tomcat 3.2.1
> 
> Thanks.
> 
> ___
> Do You Yahoo!?
> Get your free @yahoo.ca address at http://mail.yahoo.ca



Re: response.sendRedirect vs. requestDispatcher.forward

2001-05-31 Thread Alex Fernández

Hi Andy!

Just a fine point here.

A Yang wrote:
> RequestDispatch.forward takes a URL that is a RELATIVE
> path but also requires a leading slash.

>From the javadoc of ServletRequest.getRequestDispatcher(String):

'The pathname specified may be relative, although it cannot extend
outside the current servlet context. If the path begins with a "/" it is
interpreted as relative to the current context root. This method returns
null if the servlet container cannot return a RequestDispatcher.

The difference between this method and
ServletContext.getRequestDispatcher(String) is that this method can take
a relative path.'

So, if you get your RequestDispatcher from the request, you don't need
the leading "/".

Un saludo,

Alex.



RE: Upgrading tomcat 3.2.1 to 3.2.2

2001-06-01 Thread Roytman, Alex
Title: RE: Upgrading tomcat 3.2.1 to 3.2.2





Did it for RedHat Linux 7.1 and Win2k (Apache server 1.3.19) today took 15 min each. Did stress test for an hour on linux - no problems

-Original Message-
From: Brandon Cruz [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 4:49 PM
To: [EMAIL PROTECTED]
Subject: Upgrading tomcat 3.2.1 to 3.2.2



Has anyone gone though an upgrade of Tomcat 3.2.1 to 3.2.2?  I am using
3.2.1 connected via mod_jk to Apache and using Apj12.  If I want to perform
this upgrade, is it going to take a very long time?  I seem to remember
having quite a bit of difficulty setting everything up in the first place,
compiling mod_jk, etc.  Does anyone have any good or bad news relating to
their experiences upgrading?  Any helpful hints or warnings?


Brandon Cruz





Re: where to find the Free Java TestingTool!!

2001-06-04 Thread Alex Fernández

Hi Rajesh!

"Rajesh Chandran M. R." wrote:
>   I want to test my web application developed in java.If U pls inform me
> about the links for free java testingtool with license it would be more
> helpful to me.

I'm not sure I understand your problem, the license part eludes me.

But, if you want to test servlets and such, you can use Cactus (from
Apache Commons):

http://jakarta.apache.org/commons/cactus/index.html

It allows testing (in JUnit fashion) of webapps, using your favorite
container. That means it sends requests via HTTP, and parses the
response to detect cookies and such.

Un saludo,

Alex.



LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is available

2001-06-04 Thread Roytman, Alex
ributes. It is useful when either one or the other do not have permission to read the
  attributes so you can chose the one which has this permissions


  searchFilter = "cn={0}"
  Filter to lookup authorizing user. Support java.text.MessageFormat.
  The only parameter is to java.text.MessageFormat pattern authorizing username.
  i.e. jndiSearchFilter = "cn={0}" for user alex will result in lookup for "cn=alex"


  securityAttributes = "securityEquals"
  One or more directory attributes separated with semicolon which contains security roles
  attributes can be multivalued. If blank no attempt to retrieve roles from directory will be done


  roleMapperClass = "com.peacetech.webtools.tomcat.SimpleRoleMapper"/>
  ATTNTION: It requires SAX2/JAX1.1 (Apache Xerces or Sun JAXP1.1 distribution)
  Implemntation of RoleMapper interface to be used to transform user directory roles
  to application roles. In tomcat 3.2x MapperClass is server wide but actual mapping data
  is context specific (unless you specified roleMapperSourceUrl)
  in tomcat 4.0 both RoleMapper and mapping data are Realm specific and you have to specify
  roleMapperSourceUrl. If it is blank no role mapping will occur


  roleMapperSourceUrl="file:///d:/tomcat4/conf/my-role-map.xml"
  URL to RoleMapper source. In tomcat 3.2x if it is not specified we try to find file
  WEB-INF/role-map.xml in every initializing tomcat context.


  connectionMaxPoolSize = 10
  JNDI does not allow multi-threaded access to a single context instance. We pool contexts which
  do user filter lookup instead creating and re-authenticating every time. Access to pool
  is synchronized. In LdapPrincipal factory we pool user connection so we reauthenticate without reconnecting


  principalAttributes = "workforceID,fullName,title"
  Coma separated list of LDAP attributes to be read from LDAP and stored in principal
  It can be accessed via DirectoryPrincipal.getAttribute(String attrName). This method returns
  String array or null if no attribute with specified name was found.
  This is only implemented for LdapRealm it has not been ported to JndiRealm yet


  SAMPLES:


  TOMCAT 4:
  
    debug="1"
    directoryUrl = "ldap://207.176.93.66:389"
    searchBindDN = "cn=ldap-user,o=pti"
    searchBindCredentials = "mypassword"
    searchBaseContext = "o=pti"
    searchFilter = "cn={0}"
    searchScopeAsString = "sub"
    securityAttributes = "securityEquals"
    attributesReadByOwner = "true"
    connectionMaxPoolSize = "10"
    ldapVersion = "3"
    roleMapperClass = "com.peacetech.webtools.tomcat.SimpleRoleMapper"
    roleMapperSourceUrl="file:///z:/Projects/Gao/gwiz/web/gwiz/WEB-INF/role-map.xml" />


  
    debug="1"
    jndiInitialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory"
    jndiSecurityAuthentication = "simple"
    directoryUrl = "ldap://207.176.93.66:389"
    jndiSecurityProtocol = ""
    searchBindDN = "cn=ldap-user,o=pti"
    searchBindCredentials = "mypassword"
    searchBaseContext = "o=pti"
    searchFilter = "cn={0}"
    searchScopeAsString = "sub"
    securityAttributes = "securityEquals"
    attributesReadByOwner = "true"
    connectionMaxPoolSize = "10"
    roleMapperClass = "com.peacetech.webtools.tomcat.SimpleRoleMapper"
    roleMapperSourceUrl="file:///z:/Projects/Gao/gwiz/web/gwiz/WEB-INF/role-map.xml" />




  TOMCAT 3:
  
    debug="1"
    directoryUrl = "ldap://207.176.93.66:389"
    searchBindDN = "cn=ldap-user,o=pti"
    searchBindCredentials = "mypassword"
    searchBaseContext = "o=pti"
    searchFilter = "cn={0}"
    searchScopeAsString = "sub"
    securityAttributes = "securityEquals"
    attributesReadByOwner = "true"
    connectionMaxPoolSize = "10"
    ldapVersion = "3"
    roleMapperClass = "com.peacetech.webtools.tomcat.SimpleRoleMapper"
    roleMapperSourceUrl="file:///z:/Projects/Gao/gwiz/web/gwiz/WEB-INF/role-map.xml" />


  
    debug="1"
    jndiInitialContextFactory = "com.sun.jndi.ldap.LdapCtxFactory"
    jndiSecurityAuthentication = "simple"
    directoryUrl = "ldap://207.176.93.66:389"
    jndiSecurityProtocol = ""
    searchBindDN = "cn=ldap-user,o=pti"
    searchBindCredentials = "mypassword"
    searchBaseContext = "o=pti"
    searchFilter = "cn={0}"
    searchScopeAsString = "sub"
    securityAttributes = "securityEquals"
    attributesReadByOwner = "true"
    connectionMaxPoolSize = "10"
    roleMapperClass = "com.peacetech.webtools.tomcat.SimpleRoleMapper"
    roleMapperSourceUrl="file:///z:/Projects/Gao/gwiz/web/gwiz/WEB-INF/role-map.xml" />
-->









RE: LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is availab le

2001-06-05 Thread Roytman, Alex
Title: RE: LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is availab le





Hello Henri,


Has Interceptor architecture changed in TC3.3? If not 3.2 version should work just fine.


In general I do not mind doing it however I did not see much interest from apache developers and little from users so I am not making any effort to make it truly open source - comments, documentation, etc.

If somebody from tomcat developers community could review it would express some interest I will be glad to spend couple of days to its quality. 

Alex




-Original Message-
From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 6:52 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is
availab le



What about a port of LDAPRealm & JNDIReam  to TC 3.3 ?


Thanks 



http://www.peacetech.com/java/files/apache/tomcat/default.htm 





RE: LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is availab le

2001-06-05 Thread Roytman, Alex
Title: RE: LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is availab le





Henry,


>What about creating a sub project jakarta-tomcat-realms?
Sure why not. Although I think TC4.0 has or will have some JNDI authentication


I do not know how tomcat project works internally. I rely on tomcat developers (committers) for guidance.
I love tomcat product and developed various extensions for it (context aware JNDI Environment for TC3.2 to make it somewhat J2EE compatible, Authentication, etc.) but I have no idea whether they are wanted (I know I can't develop without them) or not. I rely on you guys to provide guidance. If I got no response I assume it is not needed.

Alex


-Original Message-
From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 12:12 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is
availab le



That was asked many time before but .


What about creating a sub project jakarta-tomcat-realms 
 
-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED]    (. .)    
PGP KEY : 697ECEDD    ...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6



-Original Message-
From: Roytman, Alex [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 05, 2001 5:37 PM
To: 'GOMEZ Henri'; [EMAIL PROTECTED]
Subject: RE: LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is availab
le



Hello Henri, 
Has Interceptor architecture changed in TC3.3? If not 3.2 version should
work just fine. 
In general I do not mind doing it however I did not see much interest from
apache developers and little from users so I am not making any effort to
make it truly open source - comments, documentation, etc.
If somebody from tomcat developers community could review it would express
some interest I will be glad to spend couple of days to its quality. 
Alex 




-Original Message- 
From: GOMEZ Henri [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, June 05, 2001 6:52 AM 
To: [EMAIL PROTECTED] 
Cc: [EMAIL PROTECTED] 
Subject: RE: LDAPRealm & JNDIReam for Tomcat 3.2 and 4.0 beta 1 is 
availab le 



What about a port of LDAPRealm & JNDIReam  to TC 3.3 ? 
Thanks 



http://www.peacetech.com/java/files/apache/tomcat/default.htm 





Re: problems with sendRedirect() on relative path

2001-06-06 Thread Alex Fernández

Hi Ofer!

You can specify a different context, that will not contain the /servlet
prefix. The prefix is set by context.

I don't think the suggestion that was sent before (RequestDispatcher)
will work, since it's a static page.

Un saludo,

Alex.

Ofer Baranes wrote:
> 
>  Hi
>  I am tring to use the HttpServletResponse sendRedirect() method to show a
> static page but i can't use relative path  only static path (which include
> the context).The problem occure because of the default '/servlet' prefix
> which is used on tomcat conf\servel.xml.This  default prefix force that each
> accses to servlet will contain the /servlet on the URI.
> Does anyone know how to solve that ?



Re: problems with sendRedirect() on relative path

2001-06-06 Thread Alex Fernández

Interesting, didn't know that.

Thanks,

Alex.

Ofer Baranes wrote:
> Alex , actually i just learnd that using the RequestDispatcher is a better
> solution since the response is for this request while redirct is creating
> new  request&response.
> By the way the RequestDispatch is showing static pages.
> Thanks
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 06, 2001 12:43 PM
> To: [EMAIL PROTECTED]
> Subject: Re: problems with sendRedirect() on relative path
> 
> Hi Ofer!
> 
> You can specify a different context, that will not contain the /servlet
> prefix. The prefix is set by context.
> 
> I don't think the suggestion that was sent before (RequestDispatcher)
> will work, since it's a static page.
> 
> Un saludo,
> 
> Alex.
> 
> Ofer Baranes wrote:
> >
> >  Hi
> >  I am tring to use the HttpServletResponse sendRedirect() method to show a
> > static page but i can't use relative path  only static path (which include
> > the context).The problem occure because of the default '/servlet' prefix
> > which is used on tomcat conf\servel.xml.This  default prefix force that
> each
> > accses to servlet will contain the /servlet on the URI.
> > Does anyone know how to solve that ?



WebDAV extensions with tomcat/apache (using mod_jk)

2001-06-07 Thread Alex Lindgren

Hello,

I am trying to set up apache to run a servlet that uses WebDAV extensions.
mod_jk seems to not like the WebDAV extensions (such as PROPFIND).  I've
searched the archives and seem to have the same issue that Stefan Eissing
asked about recently (see below), but could not find any replies or
solutions.  Does anyone know how to get Apache to send WebDAV methods to
Tomcat?

I am using Apache 1.3.19 with the latest version of mod_jk and Tomcat 3.2.2

-Alex


>From: "Stefan Eissing"
>Subject:  mod_jk and new HTTP methods
>Date:  Fri, 18 May 2001 11:19:28 +0200
>
>Hi,
>
>as it seems, mod_jk has a set of predefined HTTP
>methods it can exchange between Apache and tomcat.
>This is rather unfortunate since I am implementing
>a WebDAV server and WebDAV introduces a range
>of new HTTP methods.
>
>Whom would I best talk to regarding extending mod_jk
>to be able to handle "unknown" methods as well?
>
>Stefan




Re: SPAMMER - Fw: CV{JAVA}

2001-06-18 Thread Alex Fernández

Why? It's nice to get some "worm regards" once in a while...

Un saludo,

Alex.

> Can something be done about this kind of behavior...
>



RE: How to avoid of displaying the homepage file path

2001-06-21 Thread alex chang

yes. way too many of them.
--- "Kumar, Amit" <[EMAIL PROTECTED]> wrote:
> Is everyone getting this email multiple number of times?
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 21, 2001 2:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to avoid of displaying the homepage file path
> 
> 
> Messages with Subject ´Homepage´ are not accepted here
(Homepage.HTML.vbs)


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



how does index.html come up?

2001-06-21 Thread alex chang

I just recently downloaded the tomcat 3.3m3 zip
to my Windows 2000 desktop.

When I go to http://localhost:8080, how does it 
know to go to the index.html file in my 
wepapps/ROOT directory? (I'm assuming this *is*
where it's going?)

In my server.xml file, I don't see a 
tag like I've been reading about. But near the
end of that file it says something about how 
ContectXmlReader reads all the context definitions.

Near the top I do see: 


But in that conf directory I don't see an
apps.xml. However I do see:

apps-127.0.0.1.xml
apps-admin.xml
apps-examples.xml

Is the apps-127.0.0.1.xml being read somehow?
Can someone explain the process of what happens
from the time you enter localhost:8080 in your
browser, to how the page gets served up?

Thanks!
-alex

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



unsubcribe

2001-06-24 Thread Alex Almero

dear moderator,
   i would like to unsubsribe to this mailing list
thanks

alex


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




RE: LDAP realms.

2001-06-25 Thread Roytman, Alex

Steve,

Type of realm should not make any difference for your web.xml Your
web.xml setup will be the same with JDBCRealm, or SimpleRealm or
JndiRealm. You can use either form based auth (like in your example) or
basic auth with JndiRealm. All JndiRealm config is done in tomcat's
server.xml file

This fragment is from  role-map.xml I presume?


user


Right now the only wildcard supported is "*" but it is easy to add
support for regular expressions. Actually you can plug-in your own
RoleMapper. I provided SimpleRoleMapper as an example and default. You
can use your own (just have your com.acme.tomcat.MyRoleMapper implement
RoleMapper interface and in your server.xml specify roleMapperClass =
com.acme.tomcat.MyRoleMapper")  

Alex



Hey Alex,

Your JndiRealm looks very interesting.  I'm currently installing it for
testing.  I have two questions about setup.  


1.  Can I use your realms in my web.xml as follows?


FORM
UmsRealm
login.html
error.html




2.  Can I map names to roles, using wildcards as follows?


user


-- Steve
Steve Cannon [EMAIL PROTECTED] 
Chief Technology Officer -- OVEN
www.oven.com 646 613 2852



tomcat tutorial

2001-06-25 Thread alex chang

anyone know of any good tomcat tutorials?
to be honest the user guide doesn't really
help.

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Error: 500

2001-06-26 Thread alex chang

I've been following this little tutorial:
http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1

I'm up to the part of Adding Tag Libraries,
on page 4. So far, everything except this part
has worked. I get an HTTP 500 internal server
error. Here are the first four lines of that:

Error: 500
Location: /onjava/welcome.jsp
Internal Servlet Error:

org.apache.jasper.compiler.CompileException:
C:\jakarta-tomcat-3.3-m3\webapps\onjava\welcome.jsp(11,10) Unable to load
class com.onjava.HelloTag

I was wondering if anyone who has tried this
example also can help me out. Thanks..

-alex

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Error: 500

2001-06-26 Thread alex chang

Hi Jann, thanks for replying.
It does work with the jsp from step 4 as you've 
said, where it simply prints the word "Welcome".

But it still doesn't work with the modified jsp
page, where I have the taglib directive up top
and replace the word "Welcome" with the 
.

I've done some more checks and it seems I only 
get the error when I have the 
tag. That is, if I simply have the taglib directive
and no  tag, it works. But if I 
put that  tag back in, I get the
error.

Any more ideas?
Thanks,
-alex

--- Jann VanOver <[EMAIL PROTECTED]> wrote:
> It looks like you were doing step 4 with the JSP from step 5.  This code
> won't work until after you've created and compiled the tag library,
> which
> you haven't done yet if you're working in order.  Try it with the JSP
> code
> from "Listing 3" and you shouldn't get this error.
> 
> -Original Message-
> From: alex chang [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 6:25 AM
> To: [EMAIL PROTECTED]
> Subject: Error: 500
> 
> 
> I've been following this little tutorial:
> http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1
> 
> I'm up to the part of Adding Tag Libraries,
> on page 4. So far, everything except this part
> has worked. I get an HTTP 500 internal server
> error. Here are the first four lines of that:
> 
> Error: 500
> Location: /onjava/welcome.jsp
> Internal Servlet Error:
> 
> org.apache.jasper.compiler.CompileException:
> C:\jakarta-tomcat-3.3-m3\webapps\onjava\welcome.jsp(11,10) Unable to
> load
> class com.onjava.HelloTag
> 
> I was wondering if anyone who has tried this
> example also can help me out. Thanks..
> 
> -alex


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Error: 500

2001-06-26 Thread alex chang

Hi,

I made sure to double check everything before
I wrote here (I also just signed up and wrote 
to the taglibs-user group). 

My directory structure is like this:

onjava/
 +- images/
 +- WEB-INF/
+- classes/
+- com/
+- onjava/
+- lib/
+- com/
+- onjava/

My HelloTag.java is in the main onjava/ directory; 
I compiled it with: javac -d WEB-INF\lib HelloTag.java

It created the com/onjava/ directories. I thought
nothing of it since HelloTag is in the package
com.onjava. Should I move HelloTag.class out of 
the /WEB-INF/lib/com/onjava directory and right
into the /WEB-INF/lib directory?

This was the only part I wasn't positive on since
the instructions said to put it in the lib directory.

Thanks for your help and patience,
-alex

--- Jann VanOver <[EMAIL PROTECTED]> wrote:
> Yes, that makes perfect sense.  The error message you got was "Unable to
> load class com.onjava.HelloTag" so of course you would only see the
> error
> when you try to use that tag.
> 
> Did you follow all the instructions at the end of step 4?  You have to
> create and compile HelloTag.java and then put the class file in the
> right
> place, then describe the tag in the .tld file.  If any of these things
> aren't done right, it won't be able to find the class when you need it.
> Re-check your steps.
> 
> -Original Message-
> From: alex chang [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error: 500
> 
> 
> Hi Jann, thanks for replying.
> It does work with the jsp from step 4 as you've 
> said, where it simply prints the word "Welcome".
> 
> But it still doesn't work with the modified jsp
> page, where I have the taglib directive up top
> and replace the word "Welcome" with the 
> .
> 
> I've done some more checks and it seems I only 
> get the error when I have the 
> tag. That is, if I simply have the taglib directive
> and no  tag, it works. But if I 
> put that  tag back in, I get the
> error.
> 
> Any more ideas?
> Thanks,
> -alex
> 
> --- Jann VanOver <[EMAIL PROTECTED]> wrote:
> > It looks like you were doing step 4 with the JSP from step 5.  This
> code
> > won't work until after you've created and compiled the tag library,
> > which
> > you haven't done yet if you're working in order.  Try it with the JSP
> > code
> > from "Listing 3" and you shouldn't get this error.
> > 
> > -Original Message-
> > From: alex chang [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 26, 2001 6:25 AM
> > To: [EMAIL PROTECTED]
> > Subject: Error: 500
> > 
> > 
> > I've been following this little tutorial:
> > http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1
> > 
> > I'm up to the part of Adding Tag Libraries,
> > on page 4. So far, everything except this part
> > has worked. I get an HTTP 500 internal server
> > error. Here are the first four lines of that:
> > 
> > Error: 500
> > Location: /onjava/welcome.jsp
> > Internal Servlet Error:
> > 
> > org.apache.jasper.compiler.CompileException:
> > C:\jakarta-tomcat-3.3-m3\webapps\onjava\welcome.jsp(11,10) Unable to
> > load
> > class com.onjava.HelloTag
> > 
> > I was wondering if anyone who has tried this
> > example also can help me out. Thanks..
> > 
> > -alex


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Error: 500

2001-06-26 Thread alex chang

Thank you!!! It works!!! =) =) =)
-alex

--- Jann VanOver <[EMAIL PROTECTED]> wrote:
> You said:
> 
>   My HelloTag.java is in the main onjava/ directory; 
>   I compiled it with: javac -d WEB-INF\lib HelloTag.java
> 
> next time, try javac -d WEB-INF\classes HelloTag.java !!!
> 
>   It created the com/onjava/ directories. I thought
>   nothing of it since HelloTag is in the package
>   com.onjava. Should I move HelloTag.class out of 
>   the /WEB-INF/lib/com/onjava directory and right
>   into the /WEB-INF/lib directory?
> 
> Almost right!  If you have .class files, they must go  in
> WEB-INF/classes/com/onjava
> If your class files are combined into a .jar file, they may be put into
> WEB-INF/lib
> 
> You are very close, alex!
> 
> -Original Message-
> From: alex chang [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 1:09 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Error: 500
> 
> 
> Hi,
> 
> I made sure to double check everything before
> I wrote here (I also just signed up and wrote 
> to the taglibs-user group). 
> 
> My directory structure is like this:
> 
> onjava/
>  +- images/
>  +- WEB-INF/
> +- classes/
> +- com/
> +- onjava/
> +- lib/
> +- com/
> +- onjava/
> 
> My HelloTag.java is in the main onjava/ directory; 
> I compiled it with: javac -d WEB-INF\lib HelloTag.java
> 
> It created the com/onjava/ directories. I thought
> nothing of it since HelloTag is in the package
> com.onjava. Should I move HelloTag.class out of 
> the /WEB-INF/lib/com/onjava directory and right
> into the /WEB-INF/lib directory?
> 
> This was the only part I wasn't positive on since
> the instructions said to put it in the lib directory.
> 
> Thanks for your help and patience,
> -alex
> 
> --- Jann VanOver <[EMAIL PROTECTED]> wrote:
> > Yes, that makes perfect sense.  The error message you got was "Unable
> to
> > load class com.onjava.HelloTag" so of course you would only see the
> > error
> > when you try to use that tag.
> > 
> > Did you follow all the instructions at the end of step 4?  You have to
> > create and compile HelloTag.java and then put the class file in the
> > right
> > place, then describe the tag in the .tld file.  If any of these things
> > aren't done right, it won't be able to find the class when you need
> it.
> > Re-check your steps.
> > 
> > -Original Message-
> > From: alex chang [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 26, 2001 12:38 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Error: 500
> > 
> > 
> > Hi Jann, thanks for replying.
> > It does work with the jsp from step 4 as you've 
> > said, where it simply prints the word "Welcome".
> > 
> > But it still doesn't work with the modified jsp
> > page, where I have the taglib directive up top
> > and replace the word "Welcome" with the 
> > .
> > 
> > I've done some more checks and it seems I only 
> > get the error when I have the 
> > tag. That is, if I simply have the taglib directive
> > and no  tag, it works. But if I 
> > put that  tag back in, I get the
> > error.
> > 
> > Any more ideas?
> > Thanks,
> > -alex
> > 
> > --- Jann VanOver <[EMAIL PROTECTED]> wrote:
> > > It looks like you were doing step 4 with the JSP from step 5.  This
> > code
> > > won't work until after you've created and compiled the tag library,
> > > which
> > > you haven't done yet if you're working in order.  Try it with the
> JSP
> > > code
> > > from "Listing 3" and you shouldn't get this error.
> > > 
> > > -Original Message-
> > > From: alex chang [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 26, 2001 6:25 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Error: 500
> > > 
> > > 
> > > I've been following this little tutorial:
> > > http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=1
> > > 
> > > I'm up to the part of Adding Tag Libraries,
> > > on page 4. So far, everything except this part
> > > has worked. I get an HTTP 500 internal server
> > > error. Here are the first four lines of that:
> > > 
> > > Error: 500
> > > Location: /onjava/welcome.jsp
> > > Internal Servlet Error:
> > > 
> > > org.apache.jasper.compiler.CompileException:
> > > C:\jakarta-tomcat-3.3-m3\webapps\onjava\welcome.jsp(11,10) Unable to
> > > load
> > > class com.onjava.HelloTag
> > > 
> > > I was wondering if anyone who has tried this
> > > example also can help me out. Thanks..
> > > 
> > > -alex


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: una pregunta

2001-06-27 Thread alex chang

si yo tambien hablo espanol. Naci en Ecuador.
-alex

--- Martin Mauri <[EMAIL PROTECTED]> wrote:
> Bueno,
> 
> increible la cantidad de personas que hablan español en la lista, de
> haber
> sabido nunca hubiera escrito en ingles.
> 
> BTW, I also need to know something about that RFC cause I've been facing
> some problems with IE5.
> 
> regards.


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: una pregunta

2001-06-27 Thread alex chang

eu nao falo portugues, mas minha ex-namorada
(is) portuguesa, e tambem (studied) 3 semesters
em college. =)

--- applein <[EMAIL PROTECTED]> wrote:
> existem brasileiros neta lista? legal eu sou do brasil :)
> 
> On Wed, 27 Jun 2001, Daniel de Almeida Alvares wrote:
> 
> > Vc precisa configurar uma variavel JAVA_HOME no seu autoexec.bat dessa
> > maneira , por exemplo:
> > set JAVA_HOME=c:\jdk13
> >
> > um abraco
> >
> > Daniel


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: una pregunta

2001-06-27 Thread alex chang

sim, eu quero falar mehlor tambem. :)

--- applein <[EMAIL PROTECTED]> wrote:
> poderiamos formas uma lista de tomcat para quem fala portugues o que
> acham?
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: una pregunta

2001-06-27 Thread alex chang

hahaha. I'd help. But only my mom understand
my horribly American-accented cantonese! 
-alex

--- Milt Epstein <[EMAIL PROTECTED]> wrote:
> On Wed, 27 Jun 2001, Martin Mauri wrote:
> 
> Hey, I'm trying to learn Chinese, anybody want to help me out with
> that? :-)


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: una pregunta

2001-06-27 Thread alex chang

Cantonese is usually spoken by the uneducated, 
Madirin is spoken by the educated. Cantonese is 
the more informal dialect, Madirin the more formal. 
Listen to someone speak Cantonese, then listen to 
someone speak Madirin- you'll be able to tell right 
away which one's which. 

Something I learned at a very young age- you say do-jeh 
when someone gives you something (as in a gift), and 
you say m-goi when someone does something for you 
(as in a waiter bringing you food).

--- Michael Carmack <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 27, 2001 at 03:29:27PM -0300, Martin Mauri wrote:
> > What's "cantonese"?
> > And how do you say "thank you"?
> >  
> > > I know how to say "thank you" in Cantonese. That's it.
> > > And that I learned from a movie. Not much help. Want the
> > > name of the movie?
> 
> Cantonese is a dialect of Chinese, most prominently associated with
> Hong Kong. (It's the language spoken in virtually all movies out of
> Hong Kong.) Thank you can be translated as either do-jeh or m-goi.
> 
> m.


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: una pregunta

2001-06-27 Thread alex chang

I hope not! I'm Cantonese myself. 
I had a feeling Madarin was spelled with an a.
You know a lot more about the language than
I do. I tried going to school for it but it
was so difficult. 

My last post on this, promise.
-alex

--- Milt Epstein <[EMAIL PROTECTED]> wrote:
> On Wed, 27 Jun 2001, alex chang wrote:
> 
> > Cantonese is usually spoken by the uneducated, Madirin is spoken by
> > the educated. Cantonese is the more informal dialect, Madirin the
> 
> Wow, I think you are going to offend a lot of people saying that.  And
> I don't think it is correct.  They are simply different languages,
> spoken in different places.  (And it's "Mandarin".)
> 
> > more formal.  Listen to someone speak Cantonese, then listen to
> > someone speak Madirin- you'll be able to tell right away which one's
> > which.
> 
> Of course!  They're different languages, they sound quite different.
> For example, their tonal systems are different -- Mandarin has four
> tones, and I believe Cantonese has nine.
> 
> Wow, this is really getting off-topic!  Sorry.
> 
> 
> > Something I learned at a very young age- you say do-jeh
> > when someone gives you something (as in a gift), and
> > you say m-goi when someone does something for you
> > (as in a waiter bringing you food).
> >
> > --- Michael Carmack <[EMAIL PROTECTED]> wrote:
> > > On Wed, Jun 27, 2001 at 03:29:27PM -0300, Martin Mauri wrote:
> > > > What's "cantonese"?
> > > > And how do you say "thank you"?
> > > >
> > > > > I know how to say "thank you" in Cantonese. That's it.
> > > > > And that I learned from a movie. Not much help. Want the
> > > > > name of the movie?
> > >
> > > Cantonese is a dialect of Chinese, most prominently associated with
> > > Hong Kong. (It's the language spoken in virtually all movies out of
> > > Hong Kong.) Thank you can be translated as either do-jeh or m-goi.
> > >
> > > m.


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



using different tomcat versions simultaneously?

2001-06-28 Thread alex chang

Hi, 

I've been playing with tomcat 3.3m3. 
But I want to start playing with 4.0-b5.
I'm using Windows 2000.
I was wondering if there's a way to use
both at the same time?

Thanks,
-alex

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Tomcat Rocks

2001-06-28 Thread Alex Fernández

Hi folks,

I agree with Nael. Tomcat is production-quality, open-source, has some
excellent Java developers actively working on it, and best of all: you
can ask them directly if there's any problem, they answer on a timely
basis.

Tomcat's power is not in full-page ads, visibility, phone support, or
any of the modern marketing ways -- it's in old-fashioned prestige,
community and mouth-to-mouth visibility.

It's true the documentation is a bit lacking in some points. But then,
you have tens of user guides and how-to's written by users, and you can
contribute some more if you want.

So, keep it up,

Alex.

Nael Mohammad wrote:
> 
> Nick,
> 
> You need to understand that this is just like a community you live in, if
> you seek help, Just Ask! But don't attack the very product we're all
> striving hard to get ready for GA. We've all spent numerous hours working
> with Tomcat.
> 
> If we can't help you, it's not because we don't want to, maybe we've never
> experience what your going through. And rather, then everyone else flaming,
> it just make sense to understand Nick's frustration.
> 
> Lack of documentation is a result of this product being new technology and
> it's open source. True there are books on Linux, but how many are backed
> some sort of Linux Distribution company or some big name publisher.
> 
> For more info on how to configure tomcat, visit
> http://www.onjava.com/search/onjava/index.ncsp?sp-q=tomcat
> 
> -Nael



Re: performance monitoring tools

2001-06-28 Thread Alex Fernández

Hi Bill,

Some time ago, I had the same problem trying to optimize performance of
some servlets. I found no free product that did the job -- I used an
evaluation license of OptimizeIt, found the problem (a switch to log4j
did the trick) and then forgot about buying it.

Could you please share your findings with the list?

Thanks,

y un saludo,

Alex.

Bill Graham wrote:
> 
> Can anyone recommend any good (and possibly free) server performance
> monitoring software? I've been looking at products like OptimizeIt
> and JProbe and was wondering if there're any open source products
> around that would provide similar functionality.
> 
> I'm trying to get a feel for where hot spots might exist in our
> application, i.e., how long methods calls or commands are taking,
> to tune our system. I've done some work with Tomcat's RequestInterceptors
> to get some numbers on time taken for servlets to do there service()
> methods, but I'm trying to get some finer grained metrics than I think
> the interceptors are capable of.
> 
> To be specific, I've done some tests with Filip Hanik's
> PerformanceInterceptors (thanks Filip), which works great, but we have
> individual servlets that handle many different types of requests, each
> of which we want to analyze.
> 
> Any suggestions would be greatly appreciated.
> 
> tomcat rules! :)
> bill



jasper

2001-06-28 Thread alex chang

forgive me if this is a silly question,
but what's jasper?
-alex

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



compiling question

2001-06-28 Thread alex chang

I have Windows 2000 and Tomcat 4.0 b5.

I'm following the latest JDC Tech Tips on filters:
http://developer.java.sun.com/developer/JDCTechTips/2001/tt0626.html

>From my WEB-INF/classes directory, I compiled with:
javac RequestBlocker.java

I received an error message that it basically 
couldn't find the Filter class. But I already 
have my variables as:

CLASSPATH=.;%TOMCAT_HOME%\common\lib\servlet.jar;
TOMCAT_HOME=c:\jakarta-tomcat-4.0-b5
JAVA_HOME=c:\jdk1.3

Then I tried compiling again with:
javac -classpath %TOMCAT_HOME%\common\lib\servlet.jar RequestBlocker.java

and it worked fine. But the only odd thing was that
it didn't create the com/develop/filters directory 
like I thought it would.

I'm just curious, but does anyone know what happened?
Thanks,
-alex

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: [Tomcat Documentation Redactors To Hire] - WAS: TOMCAT SUCKS

2001-06-29 Thread Alex Fernández

Hi Henri!

One suggestion: create a mailing list (e.g. tomcat-doc) so that folks
may speak about docs. Also, it would show some level of commitment -- at
least you have to subscribe.

Un saludo,

Alex.

GOMEZ Henri wrote:
> 
> >   Not to get into a great big argument over OS version commercial
> >products, but if OS projects expect to be taken with the same
> >consideration
> >as commercial they have to accept to be compared across the board. This
> >includes documentation. You can't just pick and choose the
> >battles you want
> >to fight.
> 
> Could we close this thread positively ?
> 
> We all know that tomcat documentation is incomplete and we need help
> in that area.
> 
> Tomcat IS AN OPENSOURCE project with a big user community,
> Jon Stevens recently reported more than 50-100k downloads / month.
> 
> Everybody could be involved in the project, and not necessary
> developpers. I'm sure there is around potentials documentation
> redactors.
> 
> So who will be interested in working on the Tomcat Documentation ?
> 
> --
> 
> >For the most part, the documentation in OS projects
> >just plain
> >sucks, if it even exists. Believe it or not this is one of the
> >reasons OS is
> >often frowned upon. Look at Microsoft, sure its close source,
> >people may
> >think it sucks, blah blah blah, but do you have idea how much
> >information is
> >on MSDN?
> >   The lack of documentation available goes against some very basic
> >rules of Software Engineering. In the real world does this
> >really matter? I
> >dunno, but often times packaging and presentation, and a
> >finished looka nd
> >feel are the key to getting in the door and this is where most
> >OS projects
> >fail miserably.
> >   Because its free might be the reason the documentation sucks, it
> >shouldn't be a justification. (not that i'm saying tomcat sucks, just
> >argueing the point).
> >



Re: TOMCAT SUCKS

2001-06-29 Thread Alex Fernández

Hi Jeff!

"Noll, Jeff HS" wrote:
> Not to get into a great big argument over OS version commercial
> products, but if OS projects expect to be taken with the same consideration
> as commercial they have to accept to be compared across the board. This
> includes documentation. You can't just pick and choose the battles you want
> to fight.

Yes you can (and should). Do you know why engineers are so bad writers
of user documentation? Because they are so embedded in the technical
point of view that it takes a big effort to revert to user mind. That's
why there are technical writers in the world.

Open Source is about scratching your itches (usually at what you do
best). I don't want lousy manuals written by overworked engineers --
that's worse than nothing. But some users have contributed excellent
guides, although they are not as handy as they should be.

That's the reason why it's so disgusting to hear folks complaining about
the docs. If you have an itch, you don't ask dad to scratch it any more
-- you know exactly the sore point. If you're willing to make the docs
better, I'm sure you'll get all the support you need.

> For the most part, the documentation in OS projects just plain
> sucks, if it even exists. Believe it or not this is one of the reasons OS is
> often frowned upon. Look at Microsoft, sure its close source, people may
> think it sucks, blah blah blah, but do you have idea how much information is
> on MSDN?

On MSDN you don't have access at the internal workings of software,
reasons behind design choices or bugs that have been corrected and are
recurrent. In the tomcat-dev archives you can find all of that and much
more.

On MSDN you cannot speak to the actual engineers that did the job and
drove the architecture forward. In the tomcat-dev list you can.

> The lack of documentation available goes against some very basic
> rules of Software Engineering. In the real world does this really matter? I
> dunno, but often times packaging and presentation, and a finished looka nd
> feel are the key to getting in the door and this is where most OS projects
> fail miserably.

Most open source projects fail in lack of commitment from the dev/user
community. Bad docs are just a consequence of poor user commitment (in
that field, in others like bug finding we excel).

> Because its free might be the reason the documentation sucks, it
> shouldn't be a justification. (not that i'm saying tomcat sucks, just
> argueing the point).

Un saludo,

Alex.



Re: TOMCAT SUCKS

2001-07-02 Thread Alex Fernández

Hi Frans!

Frans Thamura wrote:
> I think, Gomez must create tomcat-doc ASAP.

I agree completely! Let people do what they do best.

Un saludo,

Alex.



strange way to start tomcat

2001-07-05 Thread Alex Madon

Hello
I downloaded tomcat 3.2.2 binaries distribution and installed it in my
/opt (SuSE linux 7.0) dir.

The sequence from the doc:
TOMCAT_HOME=/opt/jakarta-tomcat-3.2.2 ; export TOMCAT_HOME;
JAVA_HOME=/usr/lib/jdk1.1.8/; export JAVA_HOME;
bin/startup.sh

didn't work:
the server serves pages only very very slow (have to wait to minutes to
get a page)
when I connect to port 8080.

The only way I found to make it work is to issue the forllowing sequence
of
startup.sh and shutdown.sh:

bin/startup.sh
bin/shutdown.sh 
bin/startup.sh
bin/startup.sh

Follwos the output of issuing the commands.
Does somebody has an idea to make it work on the
first bin/startup.sh?

Thanks
Alex



---
torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh start
Using classpath:
/opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar
torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat. Check
logs/tomcat.log for error messages 
2001-07-05 09:49:40 - ContextManager: Adding context Ctx( /examples )
2001-07-05 09:49:40 - ContextManager: Adding context Ctx( /admin )
2001-07-05 09:49:40 - ContextManager: Adding context Ctx(  )
2001-07-05 09:49:40 - ContextManager: Adding context Ctx( /test )
2001-07-05 09:49:46 - PoolTcpConnector: Starting HttpConnectionHandler
on 8080

torino:/opt/jakarta-tomcat-3.2.2 # 
torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh stop 
Using classpath:
/opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar
Stop tomcat
2001-07-05 09:49:46 - PoolTcpConnector: Starting Ajp12ConnectionHandler
on 8007
torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh start
Using classpath:
/opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar
torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat. Check
logs/tomcat.log for error messages 
2001-07-05 09:49:55 - ContextManager: Adding context Ctx( /examples )
2001-07-05 09:49:55 - ContextManager: Adding context Ctx( /admin )
2001-07-05 09:49:55 - ContextManager: Adding context Ctx(  )
2001-07-05 09:49:55 - ContextManager: Adding context Ctx( /test )
FATAL:java.net.BindException: Address already in use
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363)
at java.net.ServerSocket.(ServerSocket.java:138)
at java.net.ServerSocket.(ServerSocket.java:102)
at
org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97)
at
org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:239)
at
org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188)
at
org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

torino:/opt/jakarta-tomcat-3.2.2 # 
torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh start
Using classpath:
/opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar
torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat. Check
logs/tomcat.log for error messages 
2001-07-05 09:50:08 - ContextManager: Adding context Ctx( /examples )
2001-07-05 09:50:08 - ContextManager: Adding context Ctx( /admin )
2001-07-05 09:50:08 - ContextManager: Adding context Ctx(  )
2001-07-05 09:50:08 - ContextManager: Adding context Ctx( /test )
FATAL:java.net.BindException: Address already in use
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363)
at java.net.ServerSocket.(ServerSocket.java:138)
at java.net.ServerSocket.(ServerSocket.java:102)
at
org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97)
at
org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:239)
at
org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188)
at
org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
 

Re: strange way to start tomcat

2001-07-06 Thread Alex Madon

Hi Kris, thanks for the answer.

I have narrowed down the problem.
The default server.xml file sets tomcats to run on port 8080 as
stand alone server.
If i comment out the lines corresponding in the server.xml file, and run
tomcat
as an apache module, evererything starts smoothly, just with a
bin/startup.sh command.

So my problem is only on start up of tomcat as a standalone server.
I still don't understand why i need this tricky sequence of startups and 
shutdowns, but that doesn't matter too much to me, as I is recommended
to
run it as an apche module ;)

Alex



>Alex
>
>Looks like the port on which tomcat is using is being
>already used by something else , hence the bind
>exception
>
>kris



Re: strange way to start tomcat

2001-07-06 Thread Alex Madon

Hello Peter,
I have noticed the difference in speed you talk about when I use the
mod_jk.so
apache module (not stand alone mode):
the first time I load the page is a bit slower than the next times.

But when I use tomcat as a stand alone server, it is very very slow
(order of
minute...)
I don't think that's my hardware (P3 933MHz) or JDK 1.1.8 on suse 7.0.



Yes you are right i the standalone config, after a shutdown.sh
a 'ps' command shows that the tomcat service is still running.

Alex

>The first time a jsp script is requested, it has to be compiled. This
>procedure takes some time. But I agree with you: Waiting some minutes is
>very long. What processor, memory etc do you have and is the machine
>loaded (use top to display the load). Perhaps you should try to use
>another JVM?
>
>That the sequence (start, stop, start, start) works could have following
>reasons:
>* The first time you start, everything seems to be ok.
>* Then you stop.
>* The next startup tells you, that the port is already used, so tomcat
>was not stopped properly. Did you do a ps -edaf to view your processes
>after the shutdown? Perhaps there are hanging java processes/threads?
>* The next time you start is the same as before: the port is used
>already
>
>I think that something triggers the compilation of your jsp while you
>perform that procedure and tomcat is not shut down at all. When you try
>to access your jsp afterwards, it is already compiled and so it is
>served faster.
>
>I would try another, more up-to-date JVM.
>
>Bye,
>Peter.



Jasper compiler from the command line

2001-07-14 Thread Alex Muc

Hi,

I've been developing a webapp with Tomcat for a while now and one of the 
problems I keep running up against is that when I make changes to my 
underlying beans (ie. change of method signature) which are used by the 
jsp pages in my webapp that I sometimes forget to make the necessary 
changes across all jsps in the webapp which make use of the changed 
beans.  To help avoid this problem I created an ANT task to automate 
running the Jasper compiler (see my recent message on 
[EMAIL PROTECTED]).  And then let ANT report the compilation 
problems to me.

Before I was able to get this task to run I had to make some 
modifications to the jasper compiler because it wasn't operating 
properly for my jsps.  The problem was that in my jsps I make use of 
static includes which are referenced via relative file paths in the 
<%@include file="../include.jsp"%> directive by jsps which are in 
various subdirectories of the webapp.  This was causing problems for the 
jasper compiler because the context wasn't being set properly in the 
CommandLineContext.java object to be able to handle relative includes in 
pages which were in some subdirectory of the webapp.  Anyways, I made 
some small changes to the constructor of CommandLineContext to fix the 
problem.  It works properly now, and it doesn't seem to introduce any 
other problems.  

I've attached my version of CommandLineContext.java as well as a diff 
file.  Hopefully someone with more appropriate access levels can look 
over and check-in the changes.  The diff file is a little screwy for 
some reason, but I'm not good enough with CVS to be able to figure how 
to fix it.

If you have any questions send me a reply.

Thanks
Alex.

P.S.  Thanks to all the people who work on Tomcat.  I've been using it 
since the first beta and it just keeps on getting better.


/*
 * $Header: /home/cccvs/cc/working/alex/CommandLineContext.java,v 1.2 2001/07/15 
00:42:42 cccvs Exp $
 * $Revision: 1.2 $
 * $Date: 2001/07/15 00:42:42 $
 *
 * 
 * 
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999 The Apache Software Foundation.  All rights 
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:  
 *   "This product includes software developed by the 
 *Apache Software Foundation (http://www.apache.org/)."
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
 *Foundation" must not be used to endorse or promote products derived
 *from this software without prior written permission. For written 
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called "Apache"
 *nor may "Apache" appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 *
 */ 





package org.apache.jasper;

import java.io.*;

import org.apache.jasper.compiler.JspReader;
import org.apache.jasper.compiler.ServletWriter;
import org.apache.jasper.compiler.TagLibraries;
import org.apache

[FAQ] jGuru FAQ Update

2001-07-16 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified daily when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

While forwarding from one page to another by using RequestDispatcher, how do I avoid 
the error " OutputStream is already being used for this request" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455248

What is Ant? Do I need it to run Tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455192

++ Servlets FAQ: http://www.jguru.com/faq/Servlets

Is there a way in Tomcat to set up zones for servlets like in jserv?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455766

What is the difference between ServletContext.getInitParameter() and 
HttpServlet.getInitParameter() ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455711

How do I prevent users from viewing the contents of my WEB-INF directory?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455249

While forwarding from one page to another by using RequestDispatcher, how do I avoid 
the error " OutputStream is already being used for this request" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455248

How to allow the client to download and execute a .bat file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455219

Can I spawn a background thread from my servlet?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455215

How can I generate an output in CSV format from a database query?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455207

What is a session and why is it required?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455205

How to allow the client to download and execute a .bat or .exe file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455202

Why do I sometimes get the error "ODBC Driver Manager ...function Sequence Error"?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455201

How do I process FDF files created by the Acrobat Forms plug-in?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455199

++ Tomcat FAQ: http://www.jguru.com/faq/Tomcat

Is there a way in Tomcat to set up zones for servlets like in jserv?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455766

How do I upgrade from Tomcat 3 to Tomcat 4?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455735

Do I need to create my own web.xml file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455725

What is the right way to set the JAVA_HOME environment variable on Windows NT?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455718

How do you pass options such as -Xrs to the JVM when your Tomcat container is running 
in-process within a Web server?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455716

If I deploy a WAR file while Tomcat is running,
is there a way to load (or reload) it without restarting Tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455587

Using Struts 1.0, why do I get the error "cant remove Attributes from request scope"?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455577

Can Tomcat be started as a user other than root under Unix?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455567

Is there any way to avoid servlet.log being deleted on restart of tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455369

When reloading a servlet that uses JNI, why do I get 
"java.lang.UnsatisfiedLinkError: Native Library D:\WINNT\mynamesearch.dll already 
loaded in another classloader"
?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455360

What is the password for the Tomcat admin webapp?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455354

How do I prevent users from viewing the contents of my WEB-INF directory?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455249

What is Ant? Do I need it to run Tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455192

How do I stop all running instance

Re: Question about copyright

2001-07-17 Thread Alex Fernández

Hi Zhang!

zhang heng chong wrote:
> I am sorry for interrupted you.
> I have a question about software copyright.
> I downloaded tomcat,apache from "jakarta.apache.org",and I read licence. I am 
>puzzled whether those softwares can be used by a profit-making company website .

Yes, it can. You can use the software for any purpose you like.

You accept to use Tomcat at your own risk: that means that you cannot
blame whatever problems you find on the Apache Group. Say, if your
entire hard disk is wiped out by Tomcat, you cannot sue them.

You cannot use the names 'Apache' or 'Tomcat' to endorse your product.
That means you cannot announce your company as 'wonderfulsite.com --
endorsed by Apache', or 'wonderfulsite.com -- the preferred Tomcat
site'.

If you want to distribute Tomcat, you must follow the conditions
expressed in the license: do not remove copyright notices nor authorship
notices.

Un saludo,

Alex.



Re: regarding tomcat run in background on win nt

2001-07-17 Thread Alex Chaffee

Dhaval Patel wrote:

>respected sir,
>
>my self is dhaval working in java from last 2 years now 
>i want to know that what should i to run the tomcat server in background
>processes even if I log off my NT session
>is this possible and if yes then please give me some clue about it bcoz
>right now I am in great hurry in my project
>
>reply asap
>
>thanking with anticipation
>
>regards
>
>- dhaval 
>
Read the FAQ: http://www.jguru.com/faq/view.jsp?EID=13457

Also the Tomcat documentation is very helpful. Read the docs, they are 
your friend.





[FAQ] jGuru FAQ Update

2001-07-17 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified daily when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

How do I implement a hit counter in Servlets or JSP?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=456418

Why do I get "java.lang.NoClassDefFoundError: sun/tools/javac/Main" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455768

++ Servlets FAQ: http://www.jguru.com/faq/Servlets

How do I implement a hit counter in Servlets or JSP?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=456418

Why do I get "java.lang.NoClassDefFoundError: sun/tools/javac/Main" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455768

++ Tomcat FAQ: http://www.jguru.com/faq/Tomcat

Why do I get "java.lang.NoClassDefFoundError: sun/tools/javac/Main" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455768





Re: Double Click

2001-07-18 Thread Alex Fernández

Hi Jianming!

I don't understand your problem. When users click on a link, a new page
appears. So, what is the problem?

Perhaps you want to say that users click a second time after the request
has got to the server (and the DB updated), but before the response gets
to them. In this case, you'd want to ignore the second request.

This then should be easy: if you find the data already updated in the
DB, then do nothing.

Un saludo,

Alex.

"Wang, Jianming" wrote:
> 
> Hi,
> 
> I have an hyperlink, when user click on it, it will update the database.  My
> question is how can I deal with the case when user double click on the link?
> Thank you in advance for your help.
> 
> JW.



Re: Tomcat 4.0 release date?

2001-07-18 Thread Alex Fernández

Hi Jon!

Jonathan Eric Miller wrote:
> Anyone have any ideas on when Tomcat 4.0 might be released?

Tomcat 4.0 will be the reference implementation of servlet spec 2.3,
which isn't still out. Therefore, it cannot be released until the spec
is ready and finished -- which should be around september, I hear.

> I see that it's
> currently in Beta 5 whereas 3.3 is only at milestone 4.

Yes, and they target different audiences. If you are using JDK 1.1 and
servlet spec 2.2 is fine for you, you'll want Tomcat 3.3. Otherwise,
wait for the final release.

Yet, from what I've read, both releases are quite stable right now. My
experience with milestones 2, 3 and 4 has been very satisfactory.

> As far as I can
> tell, milestones are actually Alphas. Why not name them as such?

'Alpha' is a commercial term. From the developer's perspective, you
reach milestones and may choose to publish them. Since this is an Open
Source project, you get access even to the nightly builds -- so you can
test it early on and bugs are pinned up as soon as possible.

However, don't let this fact fool you about the quality of the milestone
releases -- just download it and see. If you find any bugs, don't forget
to report them in Bugzilla.

> Is 4.0 expected to be released before 3.3? If so, what's the point of 3.3?

I hope it's clear now :)  The developers say that v3.3 is an evolution,
while v4 is a revolution -- a completely different codebase. You might
say that v3.3 is v3.2.1 refactored, slimmed down and faster.

As you may have heard, v3.2's major pitfall was speed: everyone claimed
to be superior. v3.3 is vastly improved in that regard, and code is
better organized. v4 will probably be very fast too, since a lot of
great developers are working on it.

Un saludo,

Alex.



Re: Double Click

2001-07-18 Thread Alex Fernández

Hi again!

"Wang, Jianming" wrote:
> I have two frames, let's say left frame and right frame, in my app.  The
> left frame contains a list of names. When use clicks on one of them, the db
> is updated using the selected name and result is sent back to the right
> frame.

Aha, that clarifies your problem a lot. I suppose it won't be difficult
to check the db beforehand if data has already been updated?

Un saludo,

Alex.

> Thanks.
> 
> JW.
> 
> -Original Message-
> From: Alex Fernández [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 12:03 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Double Click
> 
> Hi Jianming!
> 
> I don't understand your problem. When users click on a link, a new page
> appears. So, what is the problem?
> 
> Perhaps you want to say that users click a second time after the request
> has got to the server (and the DB updated), but before the response gets
> to them. In this case, you'd want to ignore the second request.
> 
> This then should be easy: if you find the data already updated in the
> DB, then do nothing.
> 
> Un saludo,
> 
> Alex.
> 
> "Wang, Jianming" wrote:
> >
> > Hi,
> >
> > I have an hyperlink, when user click on it, it will update the database.
> My
> > question is how can I deal with the case when user double click on the
> link?
> > Thank you in advance for your help.
> >
> > JW.



[FAQ] jGuru FAQ Update

2001-07-18 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified daily when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ Servlets FAQ: http://www.jguru.com/faq/Servlets

How do I trap a 404 error inside my servlet if my servlet does a 
RequestDispatcher to a non-existent page ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=457102





Re: Tomcat: subject

2001-07-19 Thread Alex Fernández

Hi Jerry!

> "Li, Jerry" wrote:
> We have been flooded by emails from the mailing lists of CVS, apache,
> tomcat, and so on. All of them come into our inbox, it is very tough
> to separate them. If you send emails with "Tomcat" in the subject, we
> could easily group them and redirect them into a dedicated folder. For
> example, Windows user may create a rule in outlook to redirect all
> emails with Tomcat in the subject to a folder called Tomcat.

Instead of all of us taking the effort, we might ask the list owner to
add '[Tomcat]' to the subject.

On second thought, instead of all getting messages with '[Tomcat]' in
the subject, you might set up filters based in the sender of a message.

As a Tomcat user, you have become part of an Open Source community. That
means that you're ready to give at least part of what you take -- since
money is not the issue here (surprise!), it's effort. If you have a
problem, try to solve it yourself -- and then help others with the same
problem.

Un saludo,

Alex.



Re: Class reloading

2001-07-19 Thread Alex Fernández

In fact, Tomcat does support automatic reloading of classes.

When you declare a context, add a 'reloadable="true"' attribute:
 
See apps-admin.xml or server.xml for an example.

In Tomcat 3.2.1, this feature did not always work well, especially with
JSPs; in Tomcat 3.3 I cannot remember if it was enabled yet.

Un saludo,

Alex.

Paul Foxton wrote:
> 
> AFAIK tomcat doesn't support automatic reloading of classes. You do have to
> restart.
> 
> Paul
> 
> > -Original Message-
> > From: John Baker [mailto:[EMAIL PROTECTED]]
> > Sent: 19 July 2001 11:36
> > To: [EMAIL PROTECTED]
> > Subject: Class reloading
> >
> >
> > Hello.
> >
> > If I write a class and use it in a jsp page, then change the
> > class, I have to
> > restart tomcat. Is there any way I can get around this, ie
> > tell tomcat to
> > reload the class (and forget about the cached loaded copy I
> > expect it has).
> >
> >
> > John
> >
> > --
> > John Baker, BSc CS.
> > Java developer, Linux lover.
> > I don't wanna rock, DJ.
> >



[FAQ] jGuru FAQ Update

2001-07-20 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified weekly when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

How can I use a JSP as an Apache ErrorDocument -- so Apache will display its 
errors using my JSP?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=458488

How do I implement a hit counter in Servlets or JSP?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=456418

Why do I get "java.lang.NoClassDefFoundError: sun/tools/javac/Main" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455768

While forwarding from one page to another by using RequestDispatcher, how do I avoid 
the error " OutputStream is already being used for this request" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455248

What is Ant? Do I need it to run Tomcat?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455192

++ Servlets FAQ: http://www.jguru.com/faq/Servlets

How can I automatically invoke a servlet at regular time intervals using Resin?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=458416

How do I trap a 404 error inside my servlet if my servlet does a 
RequestDispatcher to a non-existent page ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=457102

How do I implement a hit counter in Servlets or JSP?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=456418

Why do I get "java.lang.NoClassDefFoundError: sun/tools/javac/Main" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455768

Is there a way in Tomcat to set up zones for servlets like in jserv?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455766

What is the difference between ServletContext.getInitParameter() and 
HttpServlet.getInitParameter() ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455711

How do I prevent users from viewing the contents of my WEB-INF directory?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455249

While forwarding from one page to another by using RequestDispatcher, how do I avoid 
the error " OutputStream is already being used for this request" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455248

How to allow the client to download and execute a .bat file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455219

Can I spawn a background thread from my servlet?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455215

How can I generate an output in CSV format from a database query?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455207

What is a session and why is it required?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455205

How to allow the client to download and execute a .bat or .exe file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455202

Why do I sometimes get the error "ODBC Driver Manager ...function Sequence Error"?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455201

How do I process FDF files created by the Acrobat Forms plug-in?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455199

++ Tomcat FAQ: http://www.jguru.com/faq/Tomcat

How can I use a JSP as an Apache ErrorDocument -- so Apache will display its 
errors using my JSP?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=458488

Why do I get "java.lang.NoClassDefFoundError: sun/tools/javac/Main" ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455768

Is there a way in Tomcat to set up zones for servlets like in jserv?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455766

How do I upgrade from Tomcat 3 to Tomcat 4?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455735

Do I need to create my own web.xml file?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=455725

What is the right way to set the JAVA_HOME environment variable on Windows NT?
http://w

Re: WebappClassLoader question

2001-07-25 Thread Alex Fernández

Hi Vincent!

I've run into the same situation a couple of times, when one class uses
a second class, and this second class uses a third one that is not
present.

1st -> 2nd -> 3rd (missing)

One would think that instantiating the 2nd should give an error, but
that loading the 2nd and/or instantiating the 1st should be ok. In fact,
all of the behaviors raise exceptions.

The following paragraph in ClassLoader javadoc might be of help:

"The methods and constructors of objects created by a class loader may
reference other classes. To determine the class(es) referred to, the
Java virtual machine calls the loadClass method of the class loader that
originally created the class."

Or, to find out what the JVM is doing, the spec is here:
http://java.sun.com/docs/books/vmspec/

Hope it helps.

Un saludo,

Alex.

> Vincent Massol wrote:
> 
> Hi,
> 
> Here is the situation :
> 
> * I have a class that makes use of JUnit (by extending the JUnit
> TestCase class). Let's call it ServletTestCase
> * I have a second class that is used to call a method in
> ServletTestCase, let's call it MyProxyClass
> * I have a third class (a servlet) that does _not_ make use of JUnit.
> Let's call it ServletTestRedirector. This class actually instanciate
> MyProxyClass and calls one of its method.
> * I package these classes in a war file and I _don't_ include
> junit.jar in this war file
> 
> When I access the servlet, I get a ClassNotFoundException on a JUnit
> class. So far it is normal ...
> When I debugged it, I have actually found that the error was happening
> when ServletTestRedirector was instancianting MyProxyClass (which does
> _not_ make use of JUnit) and before it was calling its method.
> 
> Here is the stack trace I got :
> 
> java.lang.NoClassDefFoundError: junit/framework/TestCase
>  at java.lang.ClassLoader.defineClass0(Native Method)
>  at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
>  at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
>  at
> 
>org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1475)
>  at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:836)
>  at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1215)
>  at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1098)
>  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>  at
> 
>org.apache.commons.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.java:143)
> Here is what I imagined is happening (tell me if this correct or wrong
> !) :
> 
> As MyProxyClass is within the war file, the WebappClassLoader gets
> called to load it. The WebappClassLoader, in trying to find out the
> correct class, actually loads some other class in memory, and thus the
> ServletTestCase, which fails to load because the junit jar is not in
> the classpath.
> 
> Is that correct ?
> Don't you find it strange that the error about the missing class is
> reported when calling a class that has nothing to do with the problem
> ? It gets very hard to catch errors ...
> 
> For example, in MyProxyClass, the code that calls the ServletTestCase
> method is as follows :
> 
> ServletTestCase testInstance = null;
> try {
> testClass = Class.forName(theClassName);
> Constructor constructor = testClass.getConstructor(new
> Class[] { String.class });
> testInstance =
> (ServletTestCase)constructor.newInstance(new Object[] { theMethod });
> } catch (Exception e) {
> logger.debug("Error instanciating class [" + theClassName
> + "]", e);
> e.printStackTrace();
> throw new ServletException("Error instanciating class [" +
> theClassName + "]", e);
> }
> And there is never any exception caught here  because the error
> happens earlier in the call stack, when the ServletTestRedirector
> instanciates MyProxyClass ...
> 
> ... or am I missing something ? :)
> 
> Thanks
> -Vincent Massol
>



Re: WebappClassLoader question

2001-07-27 Thread Alex Fernández

Hola Nacho,

"Ignacio J. Ortega" wrote:
> I'm lost here, where you put the Junit.jar? , because it will be on some
> place? no? to allow you load classes from , no?, i think you need the
> entire inheritance chain for resolving dependencies, so you need
> Junit.jar in some place in classpath AFAIK.. this is the simple dumb
> explanation i know, but is what i'm seeing on your example..

You're absolutely right here, Vincent's exception is raised because he
doesn't have junit.jar in his classpath.

The problem is, Cactus (Jakarta's J2EE testing package) raises an
exception if junit.jar is not found; it should catch the exception and
kindly explain the situation to the user.

Right now, the exception is raised in a strange place, and thus the user
is faced with an abstruse error. That's what Vincent is trying to solve.

[Si los dos somos españoles, qué hacemos hablando en inglés? :]

Un saludo,

Alex.

> Can you make a simple main example trying to do what you want to do,
> without involving a servlet container.. i dont know how you can load (
> using  reflection for it doesnt matter ) a class without his entire
> inheritance chain present ...
> 
> Only a wild thought, i'm not an expert on anything so... take it me too
> seriously .. :)
> 
> Saludos ,
> Ignacio J. Ortega



Re: window200+iis+tomcat3.2 ¿¬µ¿ÀÌ °¡´ÉÇÑ°¡¿©?

2001-07-27 Thread Alex Fernández

Hi, Á¦ÇØ¿í!

We cannot read Korean on the list. Besides, it should be ¶È °°ÀÌ
isapiÇÊÅÍ¿¡¼­ ÇØ°á Çߴµ¥ :)

¹æ¹ýÀÌ ¾ø°Ú½À´Ï±î,

Alex.

> Á¦ÇØ¿í wrote:
> 
> window200+iis+tomcat3.2 ¿¬µ¿ÀÌ °¡´ÉÇÑ°¡¿©?
> °¡´ÉÇÏ´Ù¸é °°Àº ¹æ¹ýÀ¸·Î ÇÏ¸é µË´Ï±î
> »ç½Ç ¶È °°ÀÌ Çߴµ¥ isapiÇÊÅÍ¿¡¼­ »¡°£ È­»ìÇ¥°¡
> ¾Æ·¡·Î Ç×ÇÏ°í ÀÖ°í ¿ì¼±¼øÀ§µµ ¾Ë¼ö¾øÀ½À¸·Î ³ª¿À´Â
> 񧨄..
> ¾î¶»°Ô ÇØ°á ¹æ¹ýÀÌ ¾ø°Ú½À´Ï±î?



[FAQ] jGuru FAQ Update

2001-07-27 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified weekly when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

I am trying to implement a RMI server that has a static variable.

Is there anyway the clients can access this static variable on the
server side and modiy it. After modification, is the change visible
in other clients.
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=463463

Is there a way to access the HttpSession object of a different web application which 
is running on the same server?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=463461

Why do Frames suck?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=460110

I am writting an application in javabeans and jsp. When I run the application I have 
some output and the internal servlet error: "attempt to clear a buffer that is already 
been flushed". My application is running under Tomcat 3.2.2.
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=459355

How do I process gb2312-encoded characters within JSP?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=459354

++ Servlets FAQ: http://www.jguru.com/faq/Servlets

How can I display bar codes in my Java program?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=462245

Why do Frames suck?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=460110

When downloading a file to a client, how can I 
inform the client of the file size, so it can
predict how long it will take?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=460092

How do I download several files at the same time?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=460087





ref: JRE

2001-08-02 Thread Alex Colic

Sorry about the v card. It gets attached automatically to my e-mails.

Let me elaborate about my requirements. I have created a set-up that uses
the jre 1.3 but when I start tomcat I get errors about class files not being
instantiated. If I install tomcat using the jdk then I do not get those
errors. This lead me to believe that you need the full jdk to install and
run Tomcat.

Is this correct?

Regards

Alex




Need icon

2001-08-02 Thread Alex Colic

Hi, I am creating an install script for tomcat and I need an icon for the
windows shortcut. Anyone out there have one for tomcat that they could send
to me?

Thanks

Alex




JRE

2001-08-03 Thread Alex Colic

Hi,

I am creating a set-up file for Tomcat. Can it run with the JRE 1.3 or does
it need the full JDK?

Thanks

Alex

 Alex Colic.vcf


[FAQ] jGuru FAQ Update

2001-08-03 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified weekly when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

My app is in Japanese, and I'm running Tomcat 3.2 and JDK 1.3.1.  I am including a 
header on a main page using the <%@ include file %> 
directive.  At the top of the main page, I first specify the JSP page directive (to 
set this JSP translation's content type and character set), then include the header 
file.


<%@ page contentType="text/html; charset=shift_jis"%>
<%@ include file="header.jsp" %>


The content from the main file renders correctly in the browser as shift-jis 
characters, but the content in the header is the kind of "?z?[???R???" junk that 
anyone who has wrestled with non-Latin1 is most likely familiar with. (Cultural 
sidenote- the Japanese call that "moji-bake" or "letter ghost").

Anyway, since you can only specify the contentType property once per page translation 
(Tomcat throws an error if you try), how can I tell Tomcat that my included page is in 
shift_jis too?

I found a Sun document in which the following was written:
The page directive applies to an entire JSP file and any static files it includes 
with the Include Directive or <jsp:include>, which 
together are called a translation unit.

So, is this a Tomcat bug?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=468049

>From what I know, I should put the path of properties file
in the Classpath. While I am developing a web application, I want to host multiple 
sites in one machine. So how can I use two different properties file? If I specify 
them in the Classpath, then the first one will be used according to order of the 
Classpath since both properties files have the same filename.
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=466998

I have an application which use a shared library libjchli.so, I have LD_LIBRARY_PATH 
set to the right dirctory and it works fine. When I tried to convert it to JSP, I got 
an error message: java.lang.UnsatisfiedLinkError: no jchli in 
java.library.path Apparently libjchli.so is not loaded. Where should the library 
file be located?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=465753

We have a large JSP from which users are taken to diffent screens and based on the 
values entered there , the fields in this main jsp are updated.
Now, we are reloading the entire jsp each time whenever the control comes back.
Instead of this is it possible to reload just that part of the jsp which has changed 
and read other parts from the cache?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=463941

What procedure must be followed to read and write encrypted cookies to the browser. 
What's the role of encoding in this ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=463936





Catalina server.xml DTD?

2001-08-07 Thread Roytman, Alex

Hello,

I am writing several jndi factories for catalina's JNDI implementation
and I am trying to figure out how to specify factory class for a
resource. The only sample I found was

and factory class for type="javax.sql.DataSource" is hard coded. What is
the attribute name for factory class?

Thank you very much

Alex Roytman



RE: Catalina: How to specify factory class name for a Resource inserver.xml

2001-08-07 Thread Roytman, Alex

Craig,

Thank you very much for your help. I have one more question. Why new
instance of my factory gets created every time I lookup for a resource
created by this factory?


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 5:05 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Catalina: How to specify factory class name for a Resource
inserver.xml




On Tue, 7 Aug 2001, Roytman, Alex wrote:

> 
> 
> Hello,
> 
> I am writing several jndi factories for catalina's JNDI implementation
> and I am trying to figure out how to specify factory class for a
> resource. The only sample I found was
>  type="javax.sql.DataSource"/>
> and factory class for type="javax.sql.DataSource" is hard coded. 
> How do I specify factory class for my resource?
> 

In server.xml, you configure the actual resource with a
,
which can have nested  entries.  Use a parameter named
FACTORY
to define the fully qualified clas name of the resource factory class
itself.

Alternatively, you can pass system properties that define the factory
for
a particular resource type.  For example, to set the factory class name
for a resource type "com.mycompany.Foo", you could say:

  export \
 
CATALINA_OPTS="-Dcom.mycompany.Foo.Factory=com.mycompany.MyFooFactory"

before starting Tomcat 4.

> Thank you very much
> 
> Alex Roytman
> 

Craig





Catalina. Resource factory gets re-created on every resource lookup!

2001-08-08 Thread Roytman, Alex

Hello

I am not sure it is desired behavior so I would like to bring it to your
attention   

New instance of my factory gets created every time I lookup up a
resource in the environment.
i.e.   
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/usorg");
causes new instance of my connection pool be created. I can certainly
work around the problem (have static hash of connection pools by JNDI
name) but I would like to hear your opinion

Thank you very much

Alex Roytman



Catalina. Jasper generates invalid java code

2001-08-08 Thread Roytman, Alex

The problem with this piece of code generated for my JSP by tomcat4.0b6
is that it catches Throwable t and then call
pageContext.handlePageException(t) which takse Exception  NOT throwable
!! as parameter as a result I am getting class cast exception:

org.apache.jasper.JasperException: Unable to compile class for
JSPnullD:\java\apache\tomcat4\work\localhost\usorg\_0002forgunits_jsp.ja
va:225: Incompatible type for method. Explicit cast needed to convert
java.lang.Throwable to java.lang.Exception.
if (pageContext != null) pageContext.handlePageException(t);
 ^
1 error



==
} catch (Throwable t) {
  if (out != null && out.getBufferSize() != 0)
  out.clearBuffer();
  if (pageContext != null) pageContext.handlePageException(t);
} finally {
  if (_jspxFactory != null)
_jspxFactory.releasePageContext(pageContext);
}
==



Adding contextPpath and realPath to tomcat environment jndi

2001-08-08 Thread Roytman, Alex

Hello

I would like to propose to add several things to tomcat's context's
environment jndi when a context gets created
Specifically I am interested in context path, context real path and any
other tomcat context runtime info
If it will not violate security I would be happy if Context itself can
be looked up via jndi. One of the uses of this kind of information will
be to help jndi object factories which need this info to read its
metadata from WEB-INF directory (i.e. many Object/Relational mappers
need access to their metadata to be initialized). It is possible to use
Environment entries for this purpose but it will be deployment nightmare
because we will need to hardcode real path to context. If you think that
this case is well justified it would be great if we could add it to
Servlet specs

Alex



Catalina. Class Loader problem. java.lang.LinkageError: duplicate class definition

2001-08-09 Thread Roytman, Alex

Hello,

I am getting this error when hit my web page first time. What is the
most puzzling that after few retries it works no more errors. There is
no duplicate class paths in my class path and WEB-INF/class(lib)

I would really appreciate if you can point me in right direction

Alex
 

java.lang.LinkageError: duplicate class definition:
com/peacetech/webtools/tomcat/factory/PropertiesFactory
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1475)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
.java:836)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1215)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1098)
at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFact
ory.java:125)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:835)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at
com.peacetech.webtools.fw.ServletHelper.(ServletHelper.java:44)
at
com.peacetech.webtools.fw.XServletHelper.(XServletHelper.java:101)
at
com.peacetech.webtools.taglib.TagBase.getHelper(TagBase.java:79)
at
com.peacetech.webtools.taglib.TagBase.doStartTag(TagBase.java:53)
at
com.peacetech.webtools.taglib.XsltFileTransformTag.doStartTag(XsltFileTr
ansformTag.java:28)
at
com.peacetech.webtools.taglib.TabPanelTag.doStartTag(TabPanelTag.java:19
)
at
org.apache.jsp._0002fmain_0002dmenu_0002dtabs_jsp._jspService(_0002fmain
_0002dmenu_0002dtabs_jsp.java:91)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
t.java:200)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:456)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:219)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:472)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
va:246)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:225
1)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:164)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:163)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
at

Connection reset by peer: socket write error NOT harmless

2001-08-13 Thread alex reuter

Hello List!
This is my first post here, so sorry for the length.


I'm running a binary distribution of tomcat 3.2.3 on Windows NT, developing
in JDDeveloper 3.2.2.

I have a client java program which sends a simple SQL string to a servlet
which gets an image from our database and returns it.  No browsers involved.
The problem I'm having is that a third of the time when I execute the client
request from my computer to the local IP address of tomcat, also running on
my computer, tomcat gives this error message:

2001-08-13 15:39:03 - Ctx( /databasefetcher ): IOException in:
( /databasefetcher + /servlet/databasefetcher + null) Connection reset by
peer: socket write error

And the file, which the client program writes to the file system, is
corrupted.

If tomcat does not give this error message, the image is fine and can be
opened and enjoyed for all of its beauty.

The images are tiffs and are about 250K in size each.  Below is the code for
the fetching:
+
 public void doPost(HttpServletRequest req, HttpServletResponse res)
  throws ServletException, 
IOException{
//read in the SQL string
BufferedReader br = new BufferedReader(new
InputStreamReader(req.getInputStream()));
String SQL = "" +br.readLine();
try{
//get the image from the database
  ResultSet rs = (ResultSet)Enterpriser.dealWithDbFetch(SQL, false);
  InputStream isImg=null;
if(rs.next()){
   isImg = rs.getBinaryStream(1);
}
//set the length to 1.3 mb, the largest image size
res.setContentLength(130);
res.setContentType("image/tif");
res.setBufferSize(130);
byte[] b = new byte[130];
//read the image into the inputstream
isImg.read( b );
//get the servlet output stream
ServletOutputStream out = res.getOutputStream();
//write the image to the response
out.write(b);
out.close();
}
catch(Exception e){
  e.printStackTrace();
}

}

AND here is the code for the client program:

++
import java.net.*;
import java.io.*;
import org.xml.sax.*;
import java.util.Properties;

public class StringHttp {
  // POST an XML document to a Service's URL, Returning XML document
response
  public static InputStream doPost(String stringToPost, URL target)
  throws IOException, ProtocolException {
// (1) Open an HTTP connection to the target URL
HttpURLConnection conn = (HttpURLConnection)target.openConnection();
if (conn == null) return null;
// (2) Use HTTP POST
conn.setRequestMethod("POST");
// (3) Indicate that the content type is plain text with appropriate
MIME type
conn.setRequestProperty("Content-type","text/plain");
// (4) We'll be writing and reading from the connection
conn.setDoOutput(true);
conn.setDoInput(true);

  // (5) Print the String into the connection's output stream
   PrintWriter pw = new PrintWriter( new
utputStreamWriter( conn.getOutputStream()));
   pw.println( stringToPost );// etc, etc.
   pw.flush();
   pw.close();
   // (6) Get an InputStream to read the response from the server.
  InputStream responseStream = conn.getInputStream();
  return responseStream;

  }

  public static void main(String args[]){

  String SQL="Select A.MAP from a TABLE where map_id=1";
try{
  URL dispatchURL = new
URL("http://192.1.1.215:8080/databasefetcher/servlet/databasefetcher";);
  long start = System.currentTimeMillis();
 InputStream is = StringHttp.doPost(SQL, dispatchURL);

long end = System.currentTimeMillis()-start;
System.out.println("Took "+ end+ " millis");
  byte[] b = new byte[130];
  is.read(b);

  FileOutputStream fos = new FileOutputStream(new
File("C:\\imgTest3.tif"));
  fos.write(b);

}
catch(Exception e){
  e.printStackTrace();
  }

  }
}

+
I've seen a number of posts on this subject and the answer always seems to
have to do with IE.  I'm not using it.  Though sometimes IIS starts up
acidentally, cutting apache out of the loop.

Any help is greatly appreciated.

Thanks,
Alex




RE: Connection reset by peer: socket write error NOT harmless

2001-08-13 Thread alex reuter

Just to give you some more background info(you being the kind hearted soul
who read my last post) The image is ALWAYS corrupted if I run the client
program from another machine on our local network.
Also, if I add the following line of code to the servlet:
out.flush();
sandwiched between:
out.write(b);

out.close();

I get a much more robust error, namely:
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite(Native Method)
at java.net.SocketOutputStream.write(SocketOutputStream.java:83)

Thanks again .

Alex


-Original Message-
From: alex reuter [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 13, 2001 4:10 PM
To: [EMAIL PROTECTED]
Subject: Connection reset by peer: socket write error NOT harmless


Hello List!
This is my first post here, so sorry for the length.


I'm running a binary distribution of tomcat 3.2.3 on Windows NT, developing
in JDDeveloper 3.2.2.

I have a client java program which sends a simple SQL string to a servlet
which gets an image from our database and returns it.  No browsers involved.
The problem I'm having is that a third of the time when I execute the client
request from my computer to the local IP address of tomcat, also running on
my computer, tomcat gives this error message:

2001-08-13 15:39:03 - Ctx( /databasefetcher ): IOException in:
( /databasefetcher + /servlet/databasefetcher + null) Connection reset by
peer: socket write error

And the file, which the client program writes to the file system, is
corrupted.

If tomcat does not give this error message, the image is fine and can be
opened and enjoyed for all of its beauty.

The images are tiffs and are about 250K in size each.  Below is the code for
the fetching:
+
 public void doPost(HttpServletRequest req, HttpServletResponse res)
  throws ServletException, 
IOException{
//read in the SQL string
BufferedReader br = new BufferedReader(new
InputStreamReader(req.getInputStream()));
String SQL = "" +br.readLine();
try{
//get the image from the database
  ResultSet rs = (ResultSet)Enterpriser.dealWithDbFetch(SQL, false);
  InputStream isImg=null;
if(rs.next()){
   isImg = rs.getBinaryStream(1);
}
//set the length to 1.3 mb, the largest image size
res.setContentLength(130);
res.setContentType("image/tif");
res.setBufferSize(130);
byte[] b = new byte[130];
//read the image into the inputstream
isImg.read( b );
//get the servlet output stream
ServletOutputStream out = res.getOutputStream();
//write the image to the response
out.write(b);
out.close();
}
catch(Exception e){
  e.printStackTrace();
}

}

AND here is the code for the client program:

++
import java.net.*;
import java.io.*;
import org.xml.sax.*;
import java.util.Properties;

public class StringHttp {
  // POST an XML document to a Service's URL, Returning XML document
response
  public static InputStream doPost(String stringToPost, URL target)
  throws IOException, ProtocolException {
// (1) Open an HTTP connection to the target URL
HttpURLConnection conn = (HttpURLConnection)target.openConnection();
if (conn == null) return null;
// (2) Use HTTP POST
conn.setRequestMethod("POST");
// (3) Indicate that the content type is plain text with appropriate
MIME type
conn.setRequestProperty("Content-type","text/plain");
// (4) We'll be writing and reading from the connection
conn.setDoOutput(true);
conn.setDoInput(true);

  // (5) Print the String into the connection's output stream
   PrintWriter pw = new PrintWriter( new
utputStreamWriter( conn.getOutputStream()));
   pw.println( stringToPost );// etc, etc.
   pw.flush();
   pw.close();
   // (6) Get an InputStream to read the response from the server.
  InputStream responseStream = conn.getInputStream();
  return responseStream;

  }

  public static void main(String args[]){

  String SQL="Select A.MAP from a TABLE where map_id=1";
try{
  URL dispatchURL = new
URL("http://192.1.1.215:8080/databasefetcher/servlet/databasefetcher";);
  long start = System.currentTimeMillis();
 InputStream is = StringHttp.doPost(SQL, dispatchURL);

long end = System.currentTimeMillis()-start;
System.out.println("Took "+ end+ " millis");
  byte[] b = new byte[130];
  is.read(b);

  FileOutputStream fos = new FileOutputStream(new
File("C:\\imgTest3.tif"));
  fos.write(b);

}
catch(Exception e){
  e.printStackTrace();
  }

  }
}

+
I've seen a number of posts

Encoding "=". Catalina does not understand http parameter with un-encoded equal sign inside param value

2001-08-13 Thread Roytman, Alex

Hello

Catalina does not understand http parameter with un-encoded equal sign
inside
i.e. myparam=fname='alex';lname='roytman'
It use to work in Tomcat 3.x and I wonder if equal sign in parameter
value has to be encoded according to specs or not



Re: Tomcat Tutorial Please!!!

2001-08-17 Thread Alex Speed

What do you want information on in particular, since the Tomcat docs which
come with it are pretty comprehensive..

Alex

- Original Message -
From: "Jagadish Gopi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 17, 2001 2:49 PM
Subject: Tomcat Tutorial Please!!!


> Hi Friends,
> Can you please direct me to a good tutorial for tomcat coz somehow I
didn't
> get complete information from official documentation.
> Please reply back
> Jags
>




[FAQ] jGuru FAQ Update

2001-08-24 Thread Alex Chaffee

jGuru maintains FAQs and Forums on Servlets, JSP, and Tomcat (as well as
many other Java topics).  Here is an automated update on recent postings to
Tomcat-related FAQs.  Please direct flames and feedback to [EMAIL PROTECTED] .

 - Alex


SPONSORED BY developerWorks

need it? get it. tools, code and tutorials for open-standards based development.

Stay informed with dW's weekly email newsletter
http://www.jguru.com/misc/register_devworks.jsp?src=notify
-

Hi.  You asked to be notified weekly when certain jGuru.com items get new entries.

You can shut email notification off at the FAQ home
page(s) or:

  http://www.jguru.com/guru/notifyprefs.jsp


++ JavaServer Pages (JSP) FAQ: http://www.jguru.com/faq/JSP

How can I model a JSP page in UML? What stereotype should I use for JSP within a class 
diagram?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=481436

I have a .jsp page with an included file (myPage.jsp, with <%@ include file = 
'includedFile.jsp'>). When I delete or modify the included file on the server, the 
old one still shows in my browser, even if I manually refresh/reload the whole page 
(i.e. refresh 'myPage.jsp'). The only solution I have found is to delete the whole 
page ('myPage.jsp'), and upload it again - then it includes the more recent included 
file.
The server is running Apache/Tomcat under Linux.
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=481051

++ Servlets FAQ: http://www.jguru.com/faq/Servlets

Why do I get the error java.lang.IllegalStateException: Header already sent ?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=480147

Is there a simple example of how to use web application security in WebLogic?
http://www.jguru.com/misc/faqtrampoline.jsp?src=notify&EID=479768





Jar files not included in built webapp

2001-08-29 Thread alex reuter

Hello List,
I am using the build script from tomcat 3.2.3 to compile and distribute my
webapps.  I have a number of jar files included in the lib folder inside my
working directory, but when I build the webapp, the jar files are not
included anywhere inside the WEB-INF directory.

Am I missing something or misunderstanding how this is supposed to work?  Up
until now I've used the system classpath but now I need to use separate
versions of the same jar files in different servlets.

Thanks,
Alex




<    1   2   3   4   5   6   >