Re: [Fileupload](java newbie):cannot resolve symbol

2003-07-28 Thread john-paul delaney
Thanks Brian... I had tried removing the package line but the compiler complained the 
package couldn't be found.  Is it overkill to have a package statement and an import 
statement for the same?

In the end I just added the jar to the classpath... but I don't understand why it 
failed when the jar was loaded by the context.  How will it be possible to install a 
war file on a new system if I'm relying on modifying the classpath?

Apologies for the multiple newbie questions.

thanks
/j-p.


On Mon, 28 Jul 2003, Brian wrote:

> Hi,
> 
> Try removing the line:
> 
> package org.appache.commons.fileupload;
> 


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



Re: [Fileupload](java newbie):cannot resolve symbol

2003-07-28 Thread john-paul delaney

On Mon, 28 Jul 2003, john-paul delaney wrote:

> The compile chokes at the first assignment:
> boolean isMultipart = FileUpload.isMultipartContent(req);
> 
> with a cannot resolve symbol on the FileUpload object.
> 
> btw the context log shows the jar being loaded:
> 2003-07-28 17:05:43 ContextConfig[/mlist]:   Scanning JARs in /WEB-INF/lib 
> subdirectory
> 2003-07-28 17:05:43 ContextConfig[/mlist]:Adding path 
> '/WEB-INF/lib/commons-fileupload-1.0.jar'
> 2003-07-28 17:05:43 ContextConfig[/mlist]:  Scanning JAR at resource path 
> '/WEB-INF/lib/commons-fileupload-1.0.jar'
 
It working now.  I added a reference to the jarfile in the $CLASSPATH environment 
variable and then it compiled ok.  Nevertheless I seem to have read somewhere that 
tomcat ignored the java classpath and relied on loading classes from it's various lib 
directories?  

Is this presumption incorrect?

Thanks
/j-p.


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



[Fileupload](java newbie):cannot resolve symbol

2003-07-28 Thread john-paul delaney
I had posted the following to the jakarta commons list but maybe it has more to do 
with Tomcat administration (or my bad programming).  Any advice is much appreciated. 
/j-p.
**

Hello List... My plan is to to stream uploaded files directly into a database.  This 
may be a bit ambitious for my little programming experience nevertheless here goes.

I've placed commons-fileupload-1.0.jar into WEB-INF/lib directory of my tomcat 
context.  

I've added the package statement:
package org.apache.commons.fileupload;

The following statement has been added to the import section of my test servlet:
import org.apache.commons.fileupload.*;

The compile chokes at the first assignment:
boolean isMultipart = FileUpload.isMultipartContent(req);

with a cannot resolve symbol on the FileUpload object.

btw the context log shows the jar being loaded:
2003-07-28 17:05:43 ContextConfig[/mlist]:   Scanning JARs in /WEB-INF/lib subdirectory
2003-07-28 17:05:43 ContextConfig[/mlist]:Adding path 
'/WEB-INF/lib/commons-fileupload-1.0.jar'
2003-07-28 17:05:43 ContextConfig[/mlist]:  Scanning JAR at resource path 
'/WEB-INF/lib/commons-fileupload-1.0.jar'


What am I doing wrong?

Thanks,
/j-p.





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



web.xml:session-timeout error

2003-07-27 Thread john-paul delaney
Hello List...

I've upgraded to 4.1.24 (from a 4.1.x earlier version) and now the following error 
reported in my catalina.out log. 
(it's caused by this timeout setting in web.xml:
  
  
 30
  
   
)

however, I didn't have this problem before.  Any ideas?
Thanks /j-p.


Apache Tomcat/4.1.24-LE-jdk14
Jul 27, 2003 3:46:08 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 385 column -1: Element "web-app" does not allow 
"session-config" here.
org.xml.sax.SAXParseException: Element "web-app" does not allow "session-config" here.
at org.apache.crimson.parser.Parser2.error(Parser2.java:3317)
at 
org.apache.crimson.parser.ValidatingParser$ChildrenValidator.consume(ValidatingParser.java:349)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1464)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1926)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1654)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:634)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)   
 at org.apache.commons.digester.Digester.parse(Digester.java:1543)
at 
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.java:282)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:639)



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



Re: how-to specify Java runtime options -Xmx128m, w/ Tomcat 4 as Win2k service

2003-07-25 Thread Paul
the script given below worked for me, as a .bat file, where the environment
variables were substituted with literal directory paths, on a win2k
(professional) os (sp4), and jdk 1.4.2.
  note: the tomcat.exe file specified in the script below only gets copied
to the /bin directory of Tomcat if specify during install to install Tomcat
as a service.  I copied this file into /bin directory from first install,
then ran .bat file.

i am thankful for the help.
-paul


- Original Message - 
From: "Koes, Derrick" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, July 24, 2003 2:26 PM
Subject: RE: how-to specify Java runtime options -Xmx128m, w/ Tomcat 4 as
Win2k service


>
> You must rebuild the service with the new options.
>
> "$CATALINA_HOME$\bin\tomcat.exe" -install "Apache Tomcat 4.1"
> "$JAVA_HOME$\jre\bin\client\jvm.dll" -Xmx512m -Xms256m
> -Djava.class.path="$CATALINA_HOME$\bin\bootstrap.jar"
> -Djava.endorsed.dirs="$CATALINA_HOME$\common\endorsed"
> -Dcatalina.home="$CATALINA_HOME$" -start
> org.apache.catalina.startup.BootstrapService -params start -stop
> org.apache.catalina.startup.BootstrapService -params stop -err
> "$CATALINA_HOME$\logs\stderr.log"
>
> Replace $CATALINA_HOME$ and $JAVA_HOME$ with the appropriate values.
> Change -Xmx and -Xms as appropriate.
> We use instsrv with the REMOVE command to remove the old service before
> running the above, or rename the service.  This is easier than
re-installing
> tomcat.
>
> -Original Message-
> From: Paul [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 24, 2003 1:53 PM
> To: [EMAIL PROTECTED]
> Subject: how-to specify Java runtime options -Xmx128m, w/ Tomcat 4 as
Win2k
> service
>
> after assigning the following environment variables the java runtime
> options as follows:
>
> eg: JAVA_OPTS=-Xmx128m -Xms128m
>
> tried with:
> CATALINA_OPTS
> JAVA_OPTS
>
> amount of RAM memory used stayed aprox the same.  Though i was expecting
> more memory to be used because of the extra memory that should have been
> allotted to java instance for Tomcat.  Consequently, i am assuming that
> options were not applied by simply setting these environment variables,
> at least when Tomcat is started as a service.
>
> Where and how are java runtime options to be specified with Tomcat 4.1
> (JDK 1.4.2) when it is started as a win2k service?
>
> [EMAIL PROTECTED]
>
> This electronic transmission is strictly confidential to Smith & Nephew
and
> intended solely for the addressee.  It may contain information which is
> covered by legal, professional or other privilege.  If you are not the
> intended addressee, or someone authorized by the intended addressee to
> receive transmissions on behalf of the addressee, you must not retain,
> disclose in any form, copy or take any action in reliance on this
> transmission.  If you have received this transmission in error, please
> notify the sender as soon as possible and destroy this message.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



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



Query about FileUploading??

2003-07-25 Thread Bikash Paul
Hi all friends,

Iam developing one uploading application for client
side Iam using html and for server side(Tomcat4.1.24)
Iam using servlet but my problem is I have to upload
big file say upto 50mb now i want to send file to
server in block wise(2048kb) for that i want to read
file in block of 2048 kb and want to write on
outputstream and so that my servlet can read from
outputStream and can write on destination folder.Can I
give Resume and Suspend facility in html which I have
given in swing client interface. I have already
developed this application using swing and servlet.Can
you plz guide me how I can do this in html.Eagerly
waiting for someone reply.Below r my codes for html.


function sendFile()
{
var sFileName =
document.getElementById("txtFile").value;
var sSafeFileName = encodeURIComponent(sFileName);
var
path="http://127.0.0.1:8080/examples/servlets/NetRecvServlet";;
document.forms[0].action=path+"?"+"&name=" +
sSafeFileName;
document.forms[0].submit();
}





Select file to send:





Regards
Bikash


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



how-to specify Java runtime options -Xmx128m, w/ Tomcat 4 as Win2k service

2003-07-24 Thread Paul
after assigning the following environment variables the java runtime options as 
follows:

eg: JAVA_OPTS=-Xmx128m -Xms128m

tried with:
CATALINA_OPTS
JAVA_OPTS

amount of RAM memory used stayed aprox the same.  Though i was expecting more memory 
to be used because of the extra memory that should have been allotted to java instance 
for Tomcat.  Consequently, i am assuming that options were not applied by simply 
setting these environment variables, at least when Tomcat is started as a service.

Where and how are java runtime options to be specified with Tomcat 4.1 (JDK 1.4.2) 
when it is started as a win2k service?

[EMAIL PROTECTED]



tomcat5: Where's webdav?

2003-07-21 Thread john-paul delaney
Hello List... webdav doesn't appear to be available by default in tc5 - how do I go 
about setting it up?

/j-p.


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



Re: Request Your Help For Installion

2003-07-21 Thread Bikash Paul
Hi,

You have to set servlet.jar file on classpath before
compiling.That file is located in
TOMCAT_HOME/common/lib/servlet.jar;

Hope this will help you.

Cheers
Bikash
--- Ravi Jayasekara <[EMAIL PROTECTED]> wrote:
> Dear
>  
> I installed Tomcat 4.0 which is 4.40Mb in size in
> JDK1.3 .But I have a problem when I am compiling
> servlets.I give a error " javax.servlet.* package
> does't exist .Can't resovle a symbol" . My machine
> run in WIN 2000 Professional Edition.But JSP files
> works properly.I write servlets and save in WEB-INF
> folder which have the extention .java.So I need your
> kind help to carry out my work.Thank You .
>  
>  e-mail:[EMAIL PROTECTED]
>  
> Ravi
> 
> 
> -
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: Logging off container authenticated user

2003-07-18 Thread Extance, Paul
We use a filter to cache other data about a user in the session once they
have authenticated. (see
http://jaffa.sourceforge.net/documentation/presentation/sessions.html or the
code @
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jaffa/JaffaCore/source/java/o
rg/jaffa/presentation/portlet/session/UserSessionFilter.java?rev=HEAD&conten
t-type=text/vnd.viewcvs-markup)

As you can see if we fail to get the extra data for the user we invalidate
the session, (ie log out) and redirect to an error page.

If you want a more complex version of the JDBC realm to add extra clauses
for security look at
http://jaffa.sourceforge.net/documentation/security/web/#realm 


Paul Extance


-Original Message-
From: Christian J. Dechery - ACCENTURE [mailto:[EMAIL PROTECTED]

Sent: Tuesday, July 15, 2003 6:54 AM
To: Tomcat Users List (E-mail)
Subject: Logging off container authenticated user

I finally got a FORM-based authentication from the container (in this case,
Tomcat) working.
 
But I have a little doubt, how can I logoff this user?
 
Cuz in my system, the login doesn't deppend only on authenticating him for
username and password, I must validate some other stuff, so it would be
interesting if I could authenticate him, and if I could not validate the
other stuff, log him off and present a message.
 
Thanks.

___
:: Christian J. Dechery 
:: Accenture do Brasil 
:: CHT - Solutions Operations 
:: [EMAIL PROTECTED] 

 

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



RE: Alternate password encyption code? [UPDATED]

2003-07-17 Thread Extance, Paul
With reference to the tomcat JDBC Encryption realm, a new version is
available which includes the necessary MBeans stuff for tomcat 4.1.24

The jar is available @
http://prdownloads.sourceforge.net/jaffa/jaffa-tomcat_1_2_0.jar?download

And at last some proper documentation @
http://jaffa.sourceforge.net/documentation/security/web/

Paul Extance

-Original Message-
From: Extance, Paul 
Sent: Tuesday, June 03, 2003 11:40 AM
To: 'Tomcat Users List'
Cc: Extance, Paul
Subject: RE: Alternate password encyption code?

We've already done this as part of the Jaffa (jaffa.sourceforge.net) open
source project. For more details see...

The Source Code @
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jaffa/JaffaCore/source/java/o
rg/jaffa/tomcat/realm/JDBCEncryptionRealm.java?rev=HEAD&content-type=text/vn
d.viewcvs-markup

The Jaffa Site @ http://jaffa.sf.net

The JAR, if you want the easy way... is attached!

This has been tested with most tomcat releases from 3.3a upto 4.1.24 and
works. It supports two types of encryption signatures

String xxx(String password) and
String xxx(String password, String Userid) in case you want to use their
user id as part of the key for the encryption

You provide the class name and the method name in server.xml, and it looks
for either method 1 or 2 and uses that to encrypt the password, before
comparing it with the one in the database. It does not try to decrypt the
database password, so a one way encryption algorithm can be supported.

This Realm also allow you some other features like extending the where
clause for the retrieve on user records, and the select for how to read the
roles (incase you don't want to create additional views!)

An example of how it can be used in server.xml is...



Just make sure you but the attached JAR, and your JAR in the /server/lib
directory, and put the database driver JAR(s) in the same place or in
/common/lib

Hope this helps...

Paul Extance

-Original Message-
From: Phil Steitz [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 31, 2003 9:25 AM
To: Tomcat Users List
Subject: Re: Alternate password encyption code?

Jeff Sexton wrote:
> On Thu, 29 May 2003, Raible, Matt wrote:
> 
>>Why don't you just have the JDBCRealm do it - add digest="SHA".
> 
> 
> I need something other than SHA, I need to use my own custom code for an
> encyrption method of my own that is not provided by JDBCRealm
> 
> 
>>To programmatically do it using form-based authentication, I've used a
>>LoginServlet that's mapped to "auth" in my login.jsp's form.  In this
>>servlet, I encrypt the password and redirect to "j_security_check" - is
that
>>what you're looking for?
> 
> 
> Maybe.  I'll do some reading about form-based authentication.  I'm not
> sure.
> 
> I'm after this because I already have set up a JDBCRealm based system,
> with BASIC authentication, and SHA, under Tomcat for both servlets and
> cocoon stuff.  Now I want to tie this together with another application
> that encypts passwords differently from any method available in JDBCRealm.
> 
> I have the code for the encyption.  If I could simply drop this code into
> the user validation JDBCRealm does for me in Tomcat, it'd be great because
> the security would all work and I wouldn't have to create any
> user/password management pages of my own.

Based on the documentation here

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#Digested%20
Passwords

and a quick look at the sources here

http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-tomcat-4.0/catalina/src
/
share/org/apache/catalina/realm/JDBCRealm.java?rev=HEAD&content-type=text/pl
ain

it does not look to me like you are going to be able to do this without 
hacking the JDBC Realm implementation.  The tomcat JDBC Realm 
implementation supports digested (*not* encrytped) passwords using 
java.security.MessageDigest to do the hashing.  This means that the 
hashing must be performed using one of the standard algorithms specified 
here
http://java.sun.com/j2se/1.4.1/docs/guide/security/CryptoSpec.html#AppA

You are probably best off going with one of the approaches that Matt has 
outlined if you want to serve login pages from the tomcat nodes.


Phil



> 
> If I can do this, I can tie Tomcat authentication to the password system
> my company has on other systems.
> 
> Any tips are helpful!  I'm a little lost with this.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




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

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



Writing your own realm for Tomcat 4.0

2003-07-10 Thread Paul Taylor

Im trying to write my own realm for Tomcat 4 WebDav application. I have already 
written some JAAS Authenication modules which are used by our main application and  
support Database and LDAP authentication but I need think I need to use tomcat  
for Webdav to force the user authentication wndow to come up when trying to map a 
Webdav folder. None of the existing realms are suitable because our LDAP tree does not 
conform to tomcats requirements, and some of our users are authenticated using a 
database realm rather than an LDAP realm. 

I have written a new class that extends RealmBase and written an authenticate method 
but it never gets called can someone tell me what else I have to do to make it a valid 
Realm Class.

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



RE: session expiry

2003-07-09 Thread Paul Wallace
Thank you for that. And where is the length of default session expiry
defined? How do I configure session life span for TC?

Thanks

Paul. 


> 
>  
> 
> public void close() {
> 
>  

session.inValidate();

> 
>   // kill my session here
> 
>  
> 
> } 
> 
> or failing that, how do I define a length of time for the session
life?
> 
>  
> 
> Thanks
> 
>  
> 
> Paul.
> 
> 


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


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



session expiry

2003-07-09 Thread Paul Wallace
Hello All,

A simple one? I have my session defined in a servlet thus:

 

 

HttpSession session = req.getSession();

session.setAttribute("userSession", h); 

 

how or where do define session parameters such as expiry? I would
ideally like my session to die when I call a specified method e.g 

 

public void close() {

 

  // kill my session here

 

} 

or failing that, how do I define a length of time for the session life?

 

Thanks

 

Paul.



Basic Authentication and eternal 403

2003-07-03 Thread Paul Smith
Using tomcat 4.1.24, it appears that if using Basic
authentication and a user enters a valid username but
an invalid password, access to the restricted page is
forbidden from then on (403 error code is returned all
the time).

User is never given a second chance at typing the
username and password.

Could someone explain what one is supposed to do in
such a situation to get a second chance?
(is it the browser or tomcat?)



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: How to configure Jakarta 4.1.24 as NT service?

2003-07-02 Thread Bikash Paul
Hi,

Use below command and should be in one line.

tomcat -install TomcatServer
"C:\j2sdk1.4.1_03\jre\bin\server\jvm.dll"  -Xmx256m
-Xms128m
-Djava.class.path="d:\jakarta-tomcat-4.1.24\bin\bootstrap.jar"
-Dcatalina.home="d:\jakarta-tomcat-4.1.24" -start
org.apache.catalina.startup.BootstrapService -params
start -stop
org.apache.catalina.startup.BootstrapService -params
stop -out "d:\jakarta-tomcat-4.1.24\logs\stdout.log"
-err "d:\jakarta-tomcat-4.1.24\logs\stderr.log"
-current "d:\DTMS\Upload"

Hpoe this will help you.

Regards
Bikash
--- Emil-Gerhard Frank <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I installed Jakarta 4.1.24 from ZIP file on W2K. How
> can I configure it 
> to run as a NT service?
> 
> Thanks,
> 
> Emil
> 
> BTW: Using Jakarta 4.1.12 the command below worked
> but this doesn't work 
> with 4.1.24:
> 
> "%CATALINA_HOME%\bin\tomcat.exe" -install FA-Tomcat 
> "%JAVA_HOME%\jre\bin\client\jvm.dll" 
>
-Djava.class.path="%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar"
> 
> -Dcatalina.home="%CATALINA_HOME%" -Xrs -start 
> org.apache.catalina.startup.Bootstrap -params start
> -stop 
> org.apache.catalina.startup.Bootstrap -params stop
> -out 
> "%CATALINA_HOME%"\logs\stderr.log
> 
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: persistent problem

2003-07-01 Thread Paul Wallace
Hi,
I thought I described what I meant..yes, the page was visible
regardless of numerous actions, even going to the lengths of physically
removing the class! 
   Can you please extrapolate what on 'Webapp mangaer'?

Thanks

Paul.

What do you mean by persisting? Session issue? Or is it the case where 
you changed the code in your servlet and the changes are not showing up 
? If it is then just use the webapp manager to reload the context the 
servlet resides in.

Paul Wallace wrote:

>Hello,
>   Can someone please tell me how to configure (I am assuming it is
>a configuration issue) TC such that my servlets do not insist on
>persisting. Even when I clear IE history, delete temporary Internet
>files, cookies, delete the class its self! I literally removed the
>servlet class and it was still running and outputting to the browser! I
>eventually had to restart the server each time this happened. Obviously
>not an acceptable way to develop. Is it an entry in conf/server.xml?
>
>Many thanks
>
>Paul.  
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>  
>


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


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



persistent problem

2003-07-01 Thread Paul Wallace
Hello,
Can someone please tell me how to configure (I am assuming it is
a configuration issue) TC such that my servlets do not insist on
persisting. Even when I clear IE history, delete temporary Internet
files, cookies, delete the class its self! I literally removed the
servlet class and it was still running and outputting to the browser! I
eventually had to restart the server each time this happened. Obviously
not an acceptable way to develop. Is it an entry in conf/server.xml?

Many thanks

Paul.  

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



Re: What are the possible attributes of the Context element ?

2003-06-26 Thread Antony paul
What is the use of caching allowed ? What is its default value if I didn't 
set it in server.xml ?

Antony

From: Tim Funk <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: What are the possible attributes of the Context element ?
Date: Thu, 26 Jun 2003 07:37:19 -0400
Use the javadocs.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/core/StandardContext.html
Anything public that starts with set can be included in server.xml (within 
the contraints of Digester)

-Tim

Antony wrote:
When I searched the net I found some documents containing
cachingAllowed="true",checkInterval="1" and so many.  I can't find
documentation for these attributes in Tomcat 4.1 docs. What is the use of
the  attribute cachingAllowed and  checkInterval ?.  I saw the page at
jGuru Tomcat  FAQ http://www.jguru.com/faq/view.jsp?EID=24607 .
The full element is included here.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: [OT] How to know Know the amount of memory used by Tomcat froma JSP page ?

2003-06-26 Thread Antony paul
I think it is supported in 4.1.24. I am using 4.1.18. It returns  FAIL - 
Unknown command /serverinfo

Antony


From: Tim Funk <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Re: [OT] How to know Know the amount of memory used by Tomcat 
froma JSP page ?
Date: Thu, 26 Jun 2003 07:48:01 -0400

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html#List%20OS%20and%20JVM%20Properties

-Tim

Antony wrote:
What is the command to get the status page ?. i an't find it in Tomcat 
docs.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


Re: How I can slove this problem??

2003-06-26 Thread Bikash Paul
Hi,

>From my client interface Iam taking the message of my
servlet from outputstream which has written by
servlet(by out.println)incase of connection broken
during uploading and then my client pop up a dialogbox
of connection broken to inform user.My application
architecture is Tomcat is install on WinNT4.0 which is
centralised server on local area and swing client is
install on different user's computer which is also on
local area,Now my all user uploading file on remote
destination using swing client through Tomcat server.
I want to say that both server and client on local
area and user uploading file on remote destination.

Regards
Bikash 
--- Jason Bainbridge <[EMAIL PROTECTED]> wrote:
> On Wed, 25 Jun 2003 14:24, Bikash Paul wrote:
> >  am using tomcat4.1.24 for my uploading
> > software(swing for client interface and
> servlet).Iam
> > facing problem with connection broken,During
> uploading
> > of file if connection between local computer and
> > remote computer broken then my software will give
> a
> > message to user through pop up dialog box,but that
> > dialog box appears after 3 or 4 minitues of
> connection
> > broken that means as per my idea that Tomcat
> realease
> > the connection after 3 or 4 minitues of connection
> > broken
> 
> Are you sure it isn't your Swing application doing
> this? How are you checking 
> for a connection timeout on the client side?
> 
> Regards,
> -- 
> Jason Bainbridge
> http://jblinux.org
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: Tomcat 4.1.18 won't reload deleted and re-created JSP pages, returns 404 error though JSP is there

2003-06-25 Thread Paul \(BRI\)
Florian, Just as a side note, I know I have to constantly delete out the
/work/Standalone/localhost/xxx directory and start/stop tomcat
(4.1.18/RedHat 7.2) to see my new pages. If I add a new JSP, delete the
/work/Standalone/localhost/xxx, and then don't restart, I get a 404
error. If I don't delete those files I of course see the old page -  I
also have my settings to development. I am using Tomcat as a standalone.
So I would also be interested in others experience with this. Paul

-Original Message-
From: Florian G. Haas [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 5:20 AM
To: [EMAIL PROTECTED]
Subject: Tomcat 4.1.18 won't reload deleted and re-created JSP pages,
returns 404 error though JSP is there


Hello,

forgive my intrusion, it's usually not my style to start posting to a
list I haven't previously lurked on for a while. This issue baffles me,
though, and I haven't been able to find any information to even give me
the feeling of heading in the right direction.

Using Tomcat 4.1.18 on a Red Hat Linux 7.2 box with JDK 1.3.1_06, JSP
pages on the system are created and deleted automagically by a CMS. When
the CMS deletes a previously published JSP, attempting to access that
document of course results in a 404 error. Re-publishing the same
document, however, doesn't change the situation at all; Tomcat still
issues the 404 even though the JSP is again there. Jasper never seems to
pick up the JSP; the .java and .class files in the work folder are never
updated. The only current way of being able to access the file again is
to restart Tomcat.

The default Jasper settings in the global web.xml are unchanged, the
"development" init-param is set to true. The webapp's Context has
reloadable="true", its Host has autoDeploy="true" and liveDeploy="true".
The file is owned by the Tomcat user and has a mode of 0664.

The problem applies regardless of whether the document is accessed
through a Tomcat standalone connector or via Apache and mod_jk2.

Any clues will be greatly appreciated.

Thanks very much in advance,
Florian

--
Florian G. Haas

hico .:. Informations- und Kommunikations- Management Ges.m.b.H. TechLab
.:. Thomas A. Edison Str. 2 A-7000 Eisenstadt .:. Austria 
Phone: +43 (2682) 704 6141
Cellular: +43 (664) 410 2703
Fax: +43 (2682) 704 6110

[EMAIL PROTECTED]
www.hico.com


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




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



Re: How I can slove this problem??

2003-06-25 Thread Bikash Paul
Hi,

I have tried to add 'disableUploadTimeout="true"' in
connector element of server.xml file, but couldn't
slove my problem.Any one have any idea how i can slove
this problem.Eagerly waiting for someone reply.

Regards
Bikash


--- Kwok Peng Tuck <[EMAIL PROTECTED]> wrote:
> For the connector you can specify a new attribute : 
> |'disableUploadTimeout="true"'
> which apparently allows the servlet container to use
> a different
> longer connection timeout while a servlet is being
> executed (well that's 
> what
> the docs say). I'm not sure where we can actually
> specify the 
> 'different' timeout, but try
> this and see. Anybody have ideas where to set the
> timeout?
> 
> The page for this is here : 
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html
> Look under the heading 'Standard Implementation'.
> 
> 
> |
> Bikash Paul wrote:
> 
> >Hi all friends,
> >
> >I am using tomcat4.1.24 for my uploading
> >software(swing for client interface and
> servlet).Iam
> >facing problem with connection broken,During
> uploading
> >of file if connection between local computer and
> >remote computer broken then my software will give a
> >message to user through pop up dialog box,but that
> >dialog box appears after 3 or 4 minitues of
> connection
> >broken that means as per my idea that Tomcat
> realease
> >the connection after 3 or 4 minitues of connection
> >broken .I have tried to rectify by configuring
> >Connector element of server.xml file but couldn't
> >slove my problem.Can any plz guide me am I correct
> >that the delay in appearing of dialog box in case
> of
> >connection broken due to below configuration of
> Tomcat
> >in server.xml file or it may be due to any other
> >reason.
> >
> >
>className="org.apache.catalina.connector.http.HttpConnector"port="8080"
> >minProcessors="5" maxProcessors="75"
> >enableLookups="true" redirectPort="8443" debug="0"
> >connectionTimeout="0"/> 
> >
> >Regards
> >Bikash
> >
> >
> >__
> >Do you Yahoo!?
> >SBC Yahoo! DSL - Now only $29.95 per month!
> >http://sbc.yahoo.com
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >
> >  
> >
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



How I can slove this problem??

2003-06-24 Thread Bikash Paul
Hi all friends,

I am using tomcat4.1.24 for my uploading
software(swing for client interface and servlet).Iam
facing problem with connection broken,During uploading
of file if connection between local computer and
remote computer broken then my software will give a
message to user through pop up dialog box,but that
dialog box appears after 3 or 4 minitues of connection
broken that means as per my idea that Tomcat realease
the connection after 3 or 4 minitues of connection
broken .I have tried to rectify by configuring
Connector element of server.xml file but couldn't
slove my problem.Can any plz guide me am I correct
that the delay in appearing of dialog box in case of
connection broken due to below configuration of Tomcat
in server.xml file or it may be due to any other
reason.

 

Regards
Bikash


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



ConnectionTimeout of Tomcat4.1.24??

2003-06-23 Thread Bikash Paul
Hi all friends,

I am using tomcat4.1.24 for my uploading
software(swing for client interface and servlet).Iam
facing problem with connection broken,During uploading
of file if connection between local computer and
remote computer broken then my software will give a
message to user through pop up dialog box,but that
dialog box appears after 3 or 4 minitues of connection
broken that means as per my idea that Tomcat realease
the connection after 3 or 4 minitues of connection
broken .I have tried to rectify by configuring
Connector element of server.xml file but couldn't
slove my problem.Can any plz guide me am I correct
that the delay in appearing of dialog box in case of
connection broken due to below configuration of Tomcat
in server.xml file or it may be due to any other
reason.

 

Regards
Bikash 



__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



How to serialize an object which is put in the session ?

2003-06-20 Thread Antony paul
I have a class which implements the HttpSessionBindingListener interface. I 
want to serialize this object and all sessions when the context is reloaded. 
It is essential because three deveopers are using the same server and if ine 
user compiles a servlet all users get a nullpointer exception. I am using 
Tomcat 4.1.18. The class implements the Serializable interface. But it is 
throwing Nullpointer exception after reload. How to know that the object and 
session is saved when the context is reloaded. I tried changing the 
debugging levels of Engine element and Context element. Still Tomcat is not 
giving any debug information about what it is oing when the context is 
reloaded. The 4.0.3 version gves better logs.

Antony

_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


Query on Connection Time out??

2003-06-19 Thread Bikash Paul
Hi all friends,

I am using tomcat4.1.24 for my uploading
software(swing for client interface and servlet).Iam
facing problem with connection broken,During uploading
of file if connection between local computer and
remote computer broken then my software will give a
message to user through pop up dialog box,but that
dialog box appears after 3 or 4 minitues of connection
broken that means as per my idea that Tomcat realease
the connection after 3 or 4 minitues of connection
broken .I have tried to rectify by configuring
Connector element of server.xml file but couldn't
slove my problem.Can any plz guide me am I correct
that the delay in appearing of dialog box in case of
connection broken due to below configuration of Tomcat
in server.xml file or it may be due to any other
reason.



Regards
Bikash


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: getting a reply like this.

2003-06-18 Thread Bikash Paul
Hi all friends,

Iam also getting that mail whenever i post any query
to this mailing list which "anto" got.If that is the
case which "Andy" drescribed in his reply then Tomcat
Admin should block that [EMAIL PROTECTED] email
id.

Regards
Bikash
--- anto paul <[EMAIL PROTECTED]> wrote:
> Then why not the Tomcat list admin block the
> [EMAIL PROTECTED] e-mail
> id. ?
> - Original Message -
> From: "Andy Eastham" <[EMAIL PROTECTED]>
> To: "Tomcat Users List"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, June 18, 2003 8:17 PM
> Subject: RE: getting a reply like this.
> 
> 
> > Anto,
> >
> > When you post to this list, the mail gets
> distributed to various
> > subscribers, some of whom are behind companies
> anti-spam filters that
> range
> > from crap to fuxxing useless.  These antispam
> filters all seem to be
> poorly
> > written and poorly configured, so that they allow
> in most spam but reject
> > most legitimate mail.  When they decide that your
> message is spam (eg you
> > wrote something like "thread xxx has terminated"),
> they send you a
> message,
> > that they somehow think doesn't constitute spam,
> back to you to inform you
> > that you are the lowest form of low-life on the
> planet, even though you
> may
> > have been actively trying to help one of their
> employees for free...
> >
> > In fact, these anti-spam filters send me more
> unwanted mail than do
> > spammers.
> >
> > Rest assured that the annoying message is coming
> from individual
> recipients
> > of the list, and not the list itself.  Most
> subscribers will have received
> > the message gracefully and not questioned your
> legitimacy to exist :-)
> >
> > All the best,
> >
> > Andy
> >
> > > -Original Message-
> > > From: anto paul [mailto:[EMAIL PROTECTED]
> > > Sent: 18 June 2003 10:01
> > > To: tomcat mail list
> > > Subject: Fw: getting a reply like this.
> > >
> > >
> > > When I post to this mailing list I am getting
> the following
> > > reply. Why I am
> > > getting this. Any one else get this ?
> > > - Original Message -
> > > From: <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, June 18, 2003 1:55 PM
> > > Subject: RE: How to stop execution of infinite
> loop in Tomcat ?
> > >
> > >
> > > > Dear [EMAIL PROTECTED],
> > > >
> > > > Your recent message to this server regarding
> `How to stop execution of
> > > infinite loop in Tomcat ?`
> > > > was not delivered.  Your address is listed in
> one or more suppression
> > > files
> > > > on this server or your account is configured
> to allow local mail
> traffic
> > > only.
> > > > Please contact the postmaster at this domain
> if additional
> > > information is
> > > > required.
> > > >
> > > > Thank you,
> > > >
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> > >
> > >
>
-
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> >
> >
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: getting a reply like this.

2003-06-18 Thread anto paul
Then why not the Tomcat list admin block the [EMAIL PROTECTED] e-mail
id. ?
- Original Message -
From: "Andy Eastham" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, June 18, 2003 8:17 PM
Subject: RE: getting a reply like this.


> Anto,
>
> When you post to this list, the mail gets distributed to various
> subscribers, some of whom are behind companies anti-spam filters that
range
> from crap to fuxxing useless.  These antispam filters all seem to be
poorly
> written and poorly configured, so that they allow in most spam but reject
> most legitimate mail.  When they decide that your message is spam (eg you
> wrote something like "thread xxx has terminated"), they send you a
message,
> that they somehow think doesn't constitute spam, back to you to inform you
> that you are the lowest form of low-life on the planet, even though you
may
> have been actively trying to help one of their employees for free...
>
> In fact, these anti-spam filters send me more unwanted mail than do
> spammers.
>
> Rest assured that the annoying message is coming from individual
recipients
> of the list, and not the list itself.  Most subscribers will have received
> the message gracefully and not questioned your legitimacy to exist :-)
>
> All the best,
>
> Andy
>
> > -Original Message-
> > From: anto paul [mailto:[EMAIL PROTECTED]
> > Sent: 18 June 2003 10:01
> > To: tomcat mail list
> > Subject: Fw: getting a reply like this.
> >
> >
> > When I post to this mailing list I am getting the following
> > reply. Why I am
> > getting this. Any one else get this ?
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 18, 2003 1:55 PM
> > Subject: RE: How to stop execution of infinite loop in Tomcat ?
> >
> >
> > > Dear [EMAIL PROTECTED],
> > >
> > > Your recent message to this server regarding `How to stop execution of
> > infinite loop in Tomcat ?`
> > > was not delivered.  Your address is listed in one or more suppression
> > files
> > > on this server or your account is configured to allow local mail
traffic
> > only.
> > > Please contact the postmaster at this domain if additional
> > information is
> > > required.
> > >
> > > Thank you,
> > >
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



Re: Host Setup - (The Default Tomcat Page is Stalking Me)

2003-06-18 Thread Paul Hepworth
John,

Thanks! I changes the appBase and it worked great!

BTW - My good friend got me hooked on booga.  I use too much myself. :)
You got me to crack up too. :)
Thanks again,

Paul

John Turner wrote:
First, let me say that this is the first time, ever, in my checkered 
I.T. past, that I have encountered someone else who uses "booga".  I'm 
cracking up over here.  I actually use "ooga booga", but still, its fun 
to see.

What you're experiencing is most likely due to the fact that both of 
your Hosts (localhost and mydomain.com) are using the same appBase.  
You've got two separate Hosts using the same appBase, but in one the 
path of "" = ROOT and in the other "" = "booga".  Maybe it should work, 
but in the interestes of getting you going, I would suggest either 
moving mydomain.com's appBase to some other location, or removing the 
Host definition for mydomain.com entirely and simply aliasing 
mydomain.com to localhost like this:


mydomain.com


appBase and docBase can be anywhere.

John

On Tue, 17 Jun 2003 16:18:44 -0700, Paul Hepworth <[EMAIL PROTECTED]> 
wrote:

Hello,

Recently I setup mod_jk to try to get Tomcat to play with Apache. I 
created a new  with my domain name. When I point my browser to 
http://mydomain.com it redirects to the default Tomcat page that 
normally runs on "http://localhost:8080"; right after installation only 
all of the images are missing.

I have a webapp named "booga" in the "webapps" directory.

I have checked the logs and my "booga" logs are complaining of missing 
images ("/tomcat-power.gif" and "/jakarta-banner.gif").

Also if I go to "http://www.mydomain.com:8080/booga/"; it works fine.

I have played with this for a long time and need some objective eyes...
can anyone see anything wrong with my configuration below to shed some 
light for me

Thanks much,

Paul

Here are my configuration file entries:

server.xml:
--



port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="0"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>



www.mydomain.com



workers.properties:
--
worker.list=booga
#worker booga
worker.booga.port=8009
worker.booga.host=localhost
worker.booga.type=ajp13
httpd.conf (virtualhost config)
---

ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/tomcat/webapps/booga
ServerName www.mydomain.com
ServerAlias mydomain.com
ErrorLog /var/log/apache/booga-error_log
CustomLog /var/log/apache/booga-access_log combined

JkWorkersFile "/usr/local/tomcat/conf/workers.properties"
JkMount /*.jsp booga
JkMount /servlet/* booga
JkLogFile /var/log/apache/mod_jk.log-booga
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardDirectories

My Version Configuration
--
jakarta-tomcat-4.1.24
j2sdk1.4.1_02
Apache/1.3.26
mod_jk


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








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


Fw: getting a reply like this.

2003-06-18 Thread anto paul
When I post to this mailing list I am getting the following reply. Why I am
getting this. Any one else get this ?
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 18, 2003 1:55 PM
Subject: RE: How to stop execution of infinite loop in Tomcat ?


> Dear [EMAIL PROTECTED],
>
> Your recent message to this server regarding `How to stop execution of
infinite loop in Tomcat ?`
> was not delivered.  Your address is listed in one or more suppression
files
> on this server or your account is configured to allow local mail traffic
only.
> Please contact the postmaster at this domain if additional information is
> required.
>
> Thank you,
>
> [EMAIL PROTECTED]
>
>
>

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



How to stop execution of infinite loop in Tomcat ?

2003-06-18 Thread anto paul
Hi
Is there any way to stop the execution of a JSP page on a remote server
? Today by mistake I wrote code which print inside a while loop. By mistake
I increased the counter instead of decreasing it. How I can stop the
execution of the page. Tomcat is running in another machine which I have no
physical access.
 Regards
Anto paul

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



Filters and Forwarding

2003-06-18 Thread Chisholm, Paul
Hi,

I have a servlet X that forwards to a servlet Y. When Y is requested
directly there is a filter specified in web.xml that does some
preprocessing of the request. When X forwards to Y I want the request to
pass through the filter, but it seems to go straight to Y. Associating
the filter with X wont work because the filter would then process the
request before X, instead of between X and Y. I can incorporate the
functionality of the filter in Y but that defeats the whole purpose of
using filters (there are situations where I want to use Y without the
filter). Is there is way to do what I want?

Thanks,
Paul

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



Host Setup - (The Default Tomcat Page is Stalking Me)

2003-06-17 Thread Paul Hepworth
Hello,

Recently I setup mod_jk to try to get Tomcat to play with Apache. I 
created a new  with my domain name. When I point my browser to 
http://mydomain.com it redirects to the default Tomcat page that 
normally runs on "http://localhost:8080"; right after installation only 
all of the images are missing.

I have a webapp named "booga" in the "webapps" directory.

I have checked the logs and my "booga" logs are complaining of missing 
images ("/tomcat-power.gif" and "/jakarta-banner.gif").

Also if I go to "http://www.mydomain.com:8080/booga/"; it works fine.

I have played with this for a long time and need some objective eyes...
can anyone see anything wrong with my configuration below to shed some 
light for me

Thanks much,

Paul

Here are my configuration file entries:

server.xml:
--



  port="8009" minProcessors="5" maxProcessors="75"
  enableLookups="true" redirectPort="8443"
  acceptCount="10" debug="0" connectionTimeout="0"
  useURIValidationHack="false"
  protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>


	
www.mydomain.com



workers.properties:
--
worker.list=booga
#worker booga
worker.booga.port=8009
worker.booga.host=localhost
worker.booga.type=ajp13
httpd.conf (virtualhost config)
---

ServerAdmin [EMAIL PROTECTED]
DocumentRoot /usr/local/tomcat/webapps/booga
ServerName www.mydomain.com
ServerAlias mydomain.com
ErrorLog /var/log/apache/booga-error_log
CustomLog /var/log/apache/booga-access_log combined
   
JkWorkersFile "/usr/local/tomcat/conf/workers.properties"
JkMount /*.jsp booga
JkMount /servlet/* booga
JkLogFile /var/log/apache/mod_jk.log-booga
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardDirectories
   
My Version Configuration
--
jakarta-tomcat-4.1.24
j2sdk1.4.1_02
Apache/1.3.26
mod_jk


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


Environment variables

2003-06-15 Thread Chisholm, Paul
I am using 4.1.24 in Win 2000. I pass an environment variable to Tomcat
by adding

set JAVA_OPTS=-Dmy.variable.name=...

to catalina.bat and all is fine when I start Tomcat from a script that
calls "bin/startup.bat". However, if I start Tomcat from the menu item
that is automatically created during installation it does not find the
environment variable. The target in the menu item shortcut is

"..\java.exe" -jar -Duser.dir="c:\jakarta-tomcat-4"
"c:\jakarta-tomcat-4\bin\bootstrap.jar" start

Does this not use catalina.bat? Do I need to set the environment
variable at a different location?

Thanks,
Paul

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



Login Problem in "Tomcat Web Server Administration Tool"

2003-06-10 Thread Bikash Paul
Hi,

Iam facing problem with login in "Tomcat Web Server
Administration Tool".I have tried to login with all
username and password which is described in
tomcat-users.xml file which is located in
TOMCAT_HOME/config directory but it is giving me below
Error:-

[type Status report

message Access to the requested resource has been
denied

description Access to the specified resource (Access
to the requested resource has been denied) has been
forbidden.]

tomcat-users.xml file:-
=


  
  
  
  
  


Can any plz guide me how I can slove this problem.

Regards
Bikash



__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: Tomcat Manager deploy and undeploy

2003-06-06 Thread Paul Christmann
Jacob Kjome wrote:

> Do you add a META-INF/context.xml file containing your 
> information with the docBase pointing to "myapp.war"?
No, I've never added that.  It was only with this release that I even 
noticed the documentation that it was possible.  But thus far I've never 
needed it.

If one doesn't exist, post a new bug and describe how to reproduce it.
Will do.  Thanks.



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


Re: Tomcat Manager deploy and undeploy

2003-06-06 Thread Paul Christmann
Jacob Kjome wrote:
Tomcat wouldn't unpack myapp.war even if unpackWar="true" unless 
myapp.war actually found its way into the appBase of the host which by 
default in Tomcat is CATALINA_HOME/webapps.  Using the Tomcat ant 
manager tasks to "deploy" a .war to Tomcat, this simply doesn't happen.  
The .war is not copied to the appBase and, therefore, does not get 
unpacked under the appBase.

If the docBase points to the .war file, even if the  has 
unpackWARs="true", the .war file will not be unpacked.  I think this is 
what you are saying, although I'm not sure.  I just tested it and it 
works just as I've described.  I'm not sure what Paul is doing to get 
the behavior he see's???
OK, now I'm thoroughly confused.  I believe your description of what you 
see, and I believe that is what I *should* be seeing.  However, its 
clearly NOT what I'm seeing.  And sure, I assume I'm doing something 
wrong, but I have no idea *what* (especially since I'm doing the same 
steps that worked with all Tomcat releases up to 4.1.18-LE).

+ I'm using the ant manager tasks for everything 
(org.apache.catalina.ant.DeployTask and 
org.apache.catalina.ant.UndeployTask).
+ My build file first runs "undeploy", then "deploy".
+ I uninstalled my old Tomcat instance, which fully removed the 
TOMCAT_HOME folder.
+ I installed Tomcat 4.1.24-LE.
+ I ran my ant tasks to deploy my webapp.

After this, I end up with:
+  entry for my webapp in my server.xml that points docBase to 
TOMCAT_HOME/webapps/[webapp].
+ TOMCAT_HOME/webapps/[webapp] containing the expaned contents of my war.
+ War ends up in TOMCAT_HOME/work/Standalone/localhost/manager/[webapp].war

Then I have to use org.apache.catalina.ant.RemoveTask to remove the 
webapp (deleting the TOMCAT_HOME/webapps/[webapp] folder and the 
 entry.

*Then*, if I modify the "unpackWARs" attribute of the  element in 
my server.xml (setting it to false) and do exactly the same steps as 
above, I get the behavior I expect: the webapp is *not* unpacked, and 
its docBase points to the 
TOMCAT_HOME/work/Standalone/localhost/manager/[webapp].war

*EVEN* if I then change unpackWARs back to true and redploy, I get the 
behavior I described originally -- the WAR is unpacked!  SO even once I 
have the correct  entry, redeployment changes the entry and 
unpacks the war. :(

Am I really the only one that is seeing this behavior??? :( :(

What am *I* doing  I'd really like to figure out what I've done 
wrong.  Please help

--
PC
Paul Christmann
Prior Artisans, LLC
mailto:[EMAIL PROTECTED]
504-587-9072


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


Re: Tomcat Manager deploy and undeploy

2003-06-06 Thread Paul Christmann
Phillip Qin wrote:
- war is uploaded to $CATALINA/work/Standalone/my.host/manager; 
>> - war is unpacked into $CATALIAN_HOME/webapps/myapp;

> Jacob Kjome wrote:
completely false
I have to agree with Phillip -- I've seen (and reliably reproduced) this 
behavior with Tomcat 4.1.24-LE.  The only way I got around problems 
caused by this (undeploy would not work if the app had been unpacked in 
the CATALINA_HOME/webapps folder, but remove would) was to modify the 
distributed server.xml, adding unpackWARs="false" to the  entry.

I'd love to know *what* (if anything) I'm doing wrong, or have 
configured wrong.  But I've reproduced this multiple times on 3 
different Windows 2X servers with clean 4.1.24-LE installations.

PC



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


RE: Servlet Containers & J2EE Frameworks

2003-06-04 Thread Extance, Paul
In a nutshell, if its not in the J2EE Spec, you can't assume is part of the
available architecture of a J2EE compliant app server, even if 50% of the
containers provide it. So if your looking for 'job scheduling', for example,
and some have it, and other don't, you basically need to build one your self
to use in the containers that don't have it, and for the ones that do, build
custom wrappers for each implementations. 

I think your question of whether you should use JNDI to decide which
implementation to invoke on a given container is just the tip of the
iceburg. How you decided on the implementation to use in a given case can be
as simple as a 'Factory Pattern', which may read web.xml, any other .xml or
.properties config file you dream up. In web.xml you could use servlet
parameters, , or even 

But by taking this task on, you are almost doing single handed what the J2EE
Spec team and the community are all the app server providers are trying to
do which is ...
   1) Define the common interface for the feature (like scheduling)
   2) write a reference implementation (keeping to J2EE specs) for
containers that don't have this feature
   3) For each container that has this feature already, write a custom
bridge between there API's and your generic Interface(s).

The dilemma then comes when/if that feature is included in the next j2ee
spec, and all vendors now support it. I'll guess your interfaces will not be
an exact match and you're left with the choice of
1) throw away everything above and refactor your app to the new J2EE spec,
 or
2) Keep your 'proprietary' non-J2EE spec compliant version
 or
3) Implement a wrapper between your original API your app is coded against,
and the new J2EE app, assuming there is a match.

It just a hard problem to solve!

I think your goals for a framework are similar to ours, which is why we
started the JAFFA open source (http://jaffa.sf.net). A J2EE based solution
(EJB's optional), utilizing the best of what's already been built, and
adding on bits where we can't find existing solutions that fit.

We took the above 'interface/factory' approach with our persistence layer,
we implemented a standard interface, with the view to have different
'engines' based on different evolving technologies (JDBC, O/R Engines, JDO,
Entity Beans), so that the application code and business logic could stay
the same even if we change the underlying technology. All this abstraction
comes at a price, with many compromises along the way. We had a CastorJDO
implementation, we move to a more basic JDBC O/R implementation, and are now
considering an implementation base on Jakarta OJB project for JDO
compliance...

The only thing you need to be certain of with frameworks is that they meet
the relevant parts of the J2EE specs that you care about, beyond that pick
existing frameworks that you believe meet you technical needs and that are
supported by a community that have the same beliefs and vision for the
architecture and you do. Choice is a great thing and with Java there a
plenty of open/commercial ones to pick from. Choose wisely as you will be
investing lots of time and effort learning it. In my opinion 'real'
applications will always need more features that what comes in an 'out the
box' container or architecture, as its the real world solutions that drive
the next iterations of what should be in the J2EE specs and what new
patterns and features are needs in the frameworks. It's a cycle.

Paul Extance

-Original Message-
From: Robert Biernat [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 22, 2003 8:42 PM
To: 'Tomcat Users List'
Subject: RE: Servlet Containers & J2EE Frameworks

I suggest you take a look at the J2EE patterns and blueprints on the SUN
website.

Theyre are numerous patterns and techniques that go along way in helping you
architect a distributed J2EE system that is both flexible and portable.

-Original Message-
From: Steve Garcia [mailto:[EMAIL PROTECTED]
Sent: Friday, 23 May 2003 1:41 PM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: RE: Servlet Containers & J2EE Frameworks


It is interesting that you are doing what I wish to achieve.  I have an
application that we need to rewrite and make more portable, we want to
design it such that it supports multiple app servers and databases, just
like your organization/company.  Sorry this is a long e-mail, but I would
like to hear your thoughts, and anybody elses, on this topic.

Re: the database layer.  We are consigned to exclusively use an O/R Mapping
tool.  Frankly, if we want to support numerous RDBMS, then I don't see any
other way around it.  I suppose we could write custom SQL for each provider
and use JDBC but that sucks big time.  I've looked into Jakarta OJB, and I
think it will do the job.  What are your thoughts on this?  There is still
some work 

RE: Alternate password encyption code?

2003-06-04 Thread Extance, Paul
We've already done this as part of the Jaffa (jaffa.sourceforge.net) open
source project. For more details see...

The Source Code @
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jaffa/JaffaCore/source/java/o
rg/jaffa/tomcat/realm/JDBCEncryptionRealm.java?rev=HEAD&content-type=text/vn
d.viewcvs-markup

The Jaffa Site @ http://jaffa.sf.net

The JAR, if you want the easy way... is attached!

This has been tested with most tomcat releases from 3.3a upto 4.1.24 and
works. It supports two types of encryption signatures

String xxx(String password) and
String xxx(String password, String Userid) in case you want to use their
user id as part of the key for the encryption

You provide the class name and the method name in server.xml, and it looks
for either method 1 or 2 and uses that to encrypt the password, before
comparing it with the one in the database. It does not try to decrypt the
database password, so a one way encryption algorithm can be supported.

This Realm also allow you some other features like extending the where
clause for the retrieve on user records, and the select for how to read the
roles (incase you don't want to create additional views!)

An example of how it can be used in server.xml is...



Just make sure you but the attached JAR, and your JAR in the /server/lib
directory, and put the database driver JAR(s) in the same place or in
/common/lib

Hope this helps...

Paul Extance

-Original Message-
From: Phil Steitz [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 31, 2003 9:25 AM
To: Tomcat Users List
Subject: Re: Alternate password encyption code?

Jeff Sexton wrote:
> On Thu, 29 May 2003, Raible, Matt wrote:
> 
>>Why don't you just have the JDBCRealm do it - add digest="SHA".
> 
> 
> I need something other than SHA, I need to use my own custom code for an
> encyrption method of my own that is not provided by JDBCRealm
> 
> 
>>To programmatically do it using form-based authentication, I've used a
>>LoginServlet that's mapped to "auth" in my login.jsp's form.  In this
>>servlet, I encrypt the password and redirect to "j_security_check" - is
that
>>what you're looking for?
> 
> 
> Maybe.  I'll do some reading about form-based authentication.  I'm not
> sure.
> 
> I'm after this because I already have set up a JDBCRealm based system,
> with BASIC authentication, and SHA, under Tomcat for both servlets and
> cocoon stuff.  Now I want to tie this together with another application
> that encypts passwords differently from any method available in JDBCRealm.
> 
> I have the code for the encyption.  If I could simply drop this code into
> the user validation JDBCRealm does for me in Tomcat, it'd be great because
> the security would all work and I wouldn't have to create any
> user/password management pages of my own.

Based on the documentation here

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#Digested%20
Passwords

and a quick look at the sources here

http://cvs.apache.org/viewcvs.cgi/*checkout*/jakarta-tomcat-4.0/catalina/src
/
share/org/apache/catalina/realm/JDBCRealm.java?rev=HEAD&content-type=text/pl
ain

it does not look to me like you are going to be able to do this without 
hacking the JDBC Realm implementation.  The tomcat JDBC Realm 
implementation supports digested (*not* encrytped) passwords using 
java.security.MessageDigest to do the hashing.  This means that the 
hashing must be performed using one of the standard algorithms specified 
here
http://java.sun.com/j2se/1.4.1/docs/guide/security/CryptoSpec.html#AppA

You are probably best off going with one of the approaches that Matt has 
outlined if you want to serve login pages from the tomcat nodes.


Phil



> 
> If I can do this, I can tie Tomcat authentication to the password system
> my company has on other systems.
> 
> Any tips are helpful!  I'm a little lost with this.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 




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


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

Re: deploy in 4.1.24

2003-06-03 Thread Paul Christmann
Aha!

I found the solution, though not a completely satisfying explanation. 
Thought I'd post what I found in case anyone else ever encounters 
something similar.

By changing the "unpackWARs" attribute of the Host element in my 
server.xml to "false", I got back the behavior I had seen in earlier 
releases (my war file is no longer unpacked under the /webapps folder).

Going back through old versions of my server.xml (kept in CVS), I find 
that the unpackWARs attribute had always been present, and had always 
been set to "true".  So I still don't know what changed with 4.1.24 to 
change the behavior, but I found a way to get back my old behavior.  In 
fact, it seems that the unpackWARs behavior was not behaving properly in 
the old release, since the deployed war was *not* unpacked.

What still seems odd, though, is that the out-of-the-box installation of 
4.1.24-LE seemed to install with unpackWARs to true, which caused my war 
files to get unpacked.  This seems inconsistent with the documentation, 
and with the experiences of at least one other user - where the war was 
not expaned.  So I don't know what I did wrong, or have configured wrong.

So, I don't know what happened, but am happy that I got my old behavior 
back on the new release!

PC



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


RE: Jboss to parse exsisting tomcat server.xml ...

2003-06-02 Thread Paul Gregoire
-- this is my 3rd attempt to answer a question please disregard if youve seen it 
already :) --

To make changes to tomcat under jboss you must edit tomcat41-service.xml not 
server.xml; changes made to the server.xml will not be used by tomcat.
The Tomcat bundled with JBoss uses the tomcat41-service.xml file, located in your 
/deploy directory of the selected configuration set. This file should be nearly 
identical to a regular server.xml.

Might i suggest that you purchase the JBoss 3.0 Handbook for further details, this 
book kicks ASS!
http://www.amazon.com/exec/obidos/tg/detail/-/1861008120/qid=1045677540/sr=8-1/ref=sr_8_1/104-9967696-6863144?v=glance&s=books&n=507846

And no i dont get any kickbacks.. :(

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 12:55 PM
To: [EMAIL PROTECTED]
Subject: Jboss to parse exsisting tomcat server.xml ...


Hi,
Can any one tell me ( or give me ) an example of how to make jboss
parse my existing tomcat server.xml file ???
jboss 3.0.X and tomcat 4.1.18. ( windows / linux )



Thanks & Regards
Guru :-)



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


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



RE: Tomcat problems every morning.

2003-06-02 Thread Paul \(BRI\)
My comment won't be that helpful - but I started out at the same place -
each morning I came in a got a call from staff saying the pages with
content pulled from the dbase was down. 

One thing I know, as others suggested, it has to do with the
JDBC/connection - in our case it happens when the network connection
between our linux box and our sql box os broken at some point - I think
the ISP does late night maintenance on the line (this is setup on an
office DSL line). We are still working to isolate the problem - but it
does seem to be JDBC related. I have tried simply pulling the cable on
the back of one box for a few seconds and the connection does die and
will not reconnect.

I plan to post back to the group when we get a better sense of the
problem - we are still fooling with it. In our case we are using MSSQL
with the MS JDBC driver. I thought I saw a post somewhere that said the
mySQL driver had a autoReconnect=true setting - I think I saw it on the
Apache site.

I hope you figure things out.

Paul

-Original Message-
From: Hollerman Geralyn M [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2003 9:07 PM
To: Tomcat Users List
Subject: Re: Tomcat problems every morning.


On Sun, 01 Jun 2003 18:14:05 -0700, Hemendra Rana wrote
> Are you using mysql database on the backend too. Someone here
> pointed out that by default, mysql driver times out after every 8 
> hours. I still needs to verify whether that is the cause of my 
> problem though. Will let you know of my finds.

Why, yes, I am. And I thought perhaps MySQL was the problem - but I was
told by some people using Oracle and PostgreSQL databases that they'd
seen the problem as well. I tried putting in some code to set the driver
time-out value, but evidently I didn't do it correctly, as the problem
persisted. I don't see the error with versions of Tomcat previous to
4.1.x, tho.

Lynn Hollerman.


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




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



Exclusion of certain file types with JK2

2003-05-29 Thread Paul Gregoire
Does anyone here know how to exclude a file type using JK2? I ask because doing the 
following below will cause all files to be served by Tomcat.. right?

[uri:/myApp/*.jsp]
info=Extension mapping

[uri:/myApp/*]
info=Map the whole webapp

I want Apache to serve all html, xml, css, etc.. 

Also all my servlets are explictly mapped via my web.xml, i do not use the invoker.


The avalanche has already started. It is too late for the pebbles to vote. 

Fw: Jboss to parse exsisting tomcat server.xml ...

2003-05-29 Thread Paul Gregoire
-- this is my 4th attempt to answer a question please disregard if youve
seen it already :) --

To make changes to tomcat under jboss you must edit tomcat41-service.xml not
server.xml; changes made to the server.xml will not be used by tomcat.
The Tomcat bundled with JBoss uses the tomcat41-service.xml file, located in
your /deploy directory of the selected configuration set. This file should
be nearly identical to a regular server.xml.

Might i suggest that you purchase the JBoss 3.0 Handbook for further
details, this book kicks ASS!
http://www.amazon.com/exec/obidos/tg/detail/-/1861008120/qid=1045677540/sr=8-1/ref=sr_8_1/104-9967696-6863144?v=glance&s=books&n=507846

And no i dont get any kickbacks.. :(

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 12:55 PM
To: [EMAIL PROTECTED]
Subject: Jboss to parse exsisting tomcat server.xml ...


Hi,
Can any one tell me ( or give me ) an example of how to make jboss
parse my existing tomcat server.xml file ???
jboss 3.0.X and tomcat 4.1.18. ( windows / linux )



Thanks & Regards
Guru :-)



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



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



Re: deploy in 4.1.24

2003-05-29 Thread Paul Christmann
Jacob Kjome wrote:
All I can say is that you must be mistaken.  I just performed a  
with two different apps.  In both cases, the .war files ended up in 
work/Standalone/localhost/manager and the WEB-INF directory from those 
.war files were also extracted to work/Standalone/localhost/[webapp  name].
:(

I just double checked everything on my system.  I did a clean 
installation of Tomcat 4.1.24-LE and deployed my applications and still 
see the same results: the app ends up unpacked in the 
TOMCAT_HOME/webapps/[webapp name] folder.  NOTE: the webapp war file 
itself does *not* end up in the webapps folder, but I end up with the 
named folder beneath it containing the unpacked files.  I do *not* get 
the [webapp name] folder underneath work/Standalone/localhost, though 
the webapp war does get placed inside work/Standalone/localhost/manager/lib.

The docBase parameter in the server.xml refers to the 
TOMCAT_HOME\webapps\[webapp name] location.  I'm guessing that when you 
tested, the docBase parameter pointed to the Standalone/localhost location?

I'm stumped.

FWIW, here's the ant task that I use (in case this wasn't clear before 
-- I only use ant tasks to invoke the manager, never the manager webapp 
itself):

  


  
the properties are pretty self-explanatory:
catalina.webapps.url = http://localhost:8081
catalina.manager.user/pwd are correct.
deploy.project.name is the name of my webapp ("net").
deploy.war is the name of the war to deploy ("/src/net/build/lib/net.war").
The build file (and all properties) worked fine before this upgrade, so 
I'm truly at a loss.

--
PC
Paul Christmann
Prior Artisans, LLC
mailto:[EMAIL PROTECTED]
504-587-9072


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


deploy in 4.1.24

2003-05-29 Thread Paul Christmann
I'm upgrading from 4.1.12-LE to 4.1.24-LE, and have found what appears 
to be a change in behavior from the  and  tasks in 
catalina-ant.jar.

In 4.1.12, the webapp appeared to be deployed to 
TOMCAT_HOME/work/standalone/localhost/.  It was not placed in 
the TOMCAT_HOME/webapps folder.  This appeared to work fine, though, as 
the app was properly deployed, it worked, it was persisted, etc. etc. 
etc.  The task could then be 'd.

In 4.1.24, war file is placed in the TOMCAT_HOME/webapps folder, and the 
app is deployed from there.  This also works fine for deployment (the 
app works, persisted, etc. etc. etc.).  BUT -- the  fails.  I 
can use the  task to remove the app, though.

Is this an intentional change in behavior?  If so, is there any case 
where the  task should (could?) be used?

--
PC
Paul Christmann
Prior Artisans, LLC
mailto:[EMAIL PROTECTED]
504-587-9072


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


Re: servlet question

2003-05-27 Thread Paul Yunusov
On Tuesday 27 May 2003 06:26 pm, Paul Hsu wrote:
> Hi,
>
> I try to forward a HTTP request from my servlet. I am using the following
> code.
>
> RequestDispatcher rd =
> getServletContext().getRequestDispatcher(direct);
> rd.forward(request, response);
>
> I have no problem with code, but I have one issue is how can I change the
> request method from "POST" to "GET" before I forward the original request.

You can't accomplish this using the RequestDispatcher facility. You will have 
to generate a new HTTP request within the servlet and send it to the desired 
destination.

Paul

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



Re: servlet question

2003-05-27 Thread Paul Hsu
Michael,

If I forward to a servlet, yes I can process the request in second servlet.


- Original Message -
From: "Tam, Michael" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 4:13 PM
Subject: RE: servlet question


I am not possitive.  I am not familiar with flash but can you process your
post data in servlet 1 and form an url with parameters attached and then
redirect?

-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:58 PM
To: Tomcat Users List
Subject: Re: servlet question


My code is doing this way already, but it does not work.You think the method
will change if I forward the "POST" request inside doGet().

- Original Message -
From: "Tam, Michael" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 3:44 PM
Subject: RE: servlet question


Just a wild guess, how about servlet 1 doPost() call its own doGet() and
redirect in the doGet body???

-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:41 PM
To: Tomcat Users List
Subject: Re: servlet question


Thank you for the help. I think you may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward to servlet2 by using "GET". How can I switch from "POST" to "GET" in
servlet1.

thanks

- Original Message -
From: "Jose Euclides da Silva Junior - DATAPREVRJ"
<[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 3:26 PM
Subject: RES: servlet question


try doGet() instead of doPost().
good luck.

-Mensagem original-
De: Paul Hsu [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 27 de maio de 2003 19:27
Para: [EMAIL PROTECTED]
Assunto: servlet question


Hi,

I try to forward a HTTP request from my servlet. I am using the following
code.

RequestDispatcher rd =
getServletContext().getRequestDispatcher(direct);
rd.forward(request, response);

I have no problem with code, but I have one issue is how can I change the
request method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

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


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

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



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

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


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



Re: servlet question

2003-05-27 Thread Paul Hsu
My code is doing this way already, but it does not work.You think the method
will change if I forward the "POST" request inside doGet().

- Original Message -
From: "Tam, Michael" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 3:44 PM
Subject: RE: servlet question


Just a wild guess, how about servlet 1 doPost() call its own doGet() and
redirect in the doGet body???

-Original Message-
From: Paul Hsu [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:41 PM
To: Tomcat Users List
Subject: Re: servlet question


Thank you for the help. I think you may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward to servlet2 by using "GET". How can I switch from "POST" to "GET" in
servlet1.

thanks

- Original Message -
From: "Jose Euclides da Silva Junior - DATAPREVRJ"
<[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 3:26 PM
Subject: RES: servlet question


try doGet() instead of doPost().
good luck.

-Mensagem original-
De: Paul Hsu [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 27 de maio de 2003 19:27
Para: [EMAIL PROTECTED]
Assunto: servlet question


Hi,

I try to forward a HTTP request from my servlet. I am using the following
code.

RequestDispatcher rd =
getServletContext().getRequestDispatcher(direct);
rd.forward(request, response);

I have no problem with code, but I have one issue is how can I change the
request method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

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


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

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



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



Re: servlet question

2003-05-27 Thread Paul Hsu
Actually my servlet try to forward a 'POST' request to a Flash program, but
the Flash program cannot process 'POST', so I must forward the request to
Flash with 'GET' method. That is my issue.

- Original Message -
From: "Hassan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 3:45 PM
Subject: Re: servlet question


> if your dispatched request is getting problems because of non compatible
> types of GET/Post methods at collaborating servlets then at the receiving
> end add a dummy method of (Get or Post), whichever is missing, and forward
> the processing to the actual method. For example:
>
> protected void doGet(HttpServletRequest req, HttpServletResponse res)
>   throws IOException, ServletException
>  {
>   doPost(req, res);
>  }
>
> protected void doPost(HttpServletRequest req, HttpServletResponse res)
>   throws IOException, ServletException
> {
> with full implementation
> }
>
>
>
>
> - Original Message -
> From: "Paul Hsu" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 27, 2003 11:26 PM
> Subject: servlet question
>
>
> Hi,
>
> I try to forward a HTTP request from my servlet. I am using the following
> code.
>
> RequestDispatcher rd =
> getServletContext().getRequestDispatcher(direct);
> rd.forward(request, response);
>
> I have no problem with code, but I have one issue is how can I change the
> request method from "POST" to "GET" before I forward the original request.
>
> I would appreciate any help
>
> Paul
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: servlet question

2003-05-27 Thread Paul Hsu
Thank you for the help. I think you may misunderstand my question. My
question is how can I forward the request to my next URL and change the
method to 'GET' if the orignal request is using 'POST'.
For example:

test1.html call servlet1 by using "POST" method, but servlet1 need to
forward to servlet2 by using "GET". How can I switch from "POST" to "GET" in
servlet1.

thanks

- Original Message -
From: "Jose Euclides da Silva Junior - DATAPREVRJ"
<[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 27, 2003 3:26 PM
Subject: RES: servlet question


try doGet() instead of doPost().
good luck.

-Mensagem original-
De: Paul Hsu [mailto:[EMAIL PROTECTED]
Enviada em: terça-feira, 27 de maio de 2003 19:27
Para: [EMAIL PROTECTED]
Assunto: servlet question


Hi,

I try to forward a HTTP request from my servlet. I am using the following
code.

RequestDispatcher rd =
getServletContext().getRequestDispatcher(direct);
rd.forward(request, response);

I have no problem with code, but I have one issue is how can I change the
request method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul

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


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



servlet question

2003-05-27 Thread Paul Hsu
Hi,

I try to forward a HTTP request from my servlet. I am using the following code.

RequestDispatcher rd =
getServletContext().getRequestDispatcher(direct);
rd.forward(request, response);

I have no problem with code, but I have one issue is how can I change the request 
method from "POST" to "GET" before I forward the original request.

I would appreciate any help

Paul 

RE: 4.1.24 Tag Lib problem

2003-04-04 Thread paul . johnson

I do have a release method, but I am not sure if this is the issue.  It is
only one data member in my tadlib that is not being changed.  The other
five varibles are being generated fine.  It is really wierd.  I am really
not sure what to look at.

Thanks for your help.

Paul R. Johnson



   

  "Arnaud HERITIER"

  <[EMAIL PROTECTED]To:   "'Tomcat Users List'" 
<[EMAIL PROTECTED]>
  roup.com>cc: 

   Subject:  RE: 4.1.24 Tag Lib problem

  04/04/2003 02:15 

  AM   

  Please respond to

  "Tomcat Users

  List"

   

   





Do you use the release method on your tag ???

If yes, you should know that this method isn't called in Tomcat between two
uses of a tag (a same instance is reused several times).

You should reinit all your internal instance variables in the doStartTag
method.

Arnaud


> -Message d'origine-
> De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Envoye : jeudi 3 avril 2003 18:36
> A : [EMAIL PROTECTED]
> Objet : 4.1.24 Tag Lib problem
>
>
> Hello,
>
> I have looked over the archives, and I looked at my code.
>
> I am having an issue with only one thing.  I am sending a url
> back to the
> client, but it only makes it to the first entry.  The others
> are blank.
> (The url is dynamic)  If I refresh the page all the links are
> gone.  The
> code works fine in JBoss/Jetty, Was 3.5, WAS 4.0, WAS 5.0,
> Tomcat 4.04,
> etc.  What should I be looking at to fix it?
>
> Thanks in Advance,
>
> Paul R. Johnson
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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









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



What s the minimum system resources needed for tomcat

2003-04-03 Thread anto paul
Hi,
 I want to know the minimum configuration to run Tomcat 4.1.18 on a
win2k server.We are using this server as a development server. And there are
only three developers accessing the server. The same machine is also used as
the print server. The machine is a P4 with 512 MB RAM.

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



RE: web.xml problem

2003-04-03 Thread paul niemandt
n/p: glad to be of help.

On Fri, 2003-04-04 at 01:15, Srinivasu Gandu wrote:
> Hi Paul,
> I am mistaken.. I gave the lower case (Web-inf) directory... it's my fault..
> because I am in win98.. confuse in the directory letters.. thanks for the
> help .. Srini.
> 
> -Original Message-
> From: paul niemandt [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 6:56 PM
> To: Tomcat Users List
> Subject: Re: web.xml problem
> 
> 
> Hi Srini:
> 
> You most probably don't have the web.xml file in the correct directory.
> It needs to be under the WEB-INF directory of your web application.
> 
> ie.
> 
> $CATALINA_HOME/webapps/YourWebApp/WEB-INF/web.xml
> 
> regards,
> Paul
> 
> On Fri, 2003-04-04 at 00:47, Srinivasu Gandu wrote:
> > Hi, I am using tomcat4.1.18 and trying to run a web application.. I am
> > getting the error.
> > "Missing application web.xml, using defaults only"  when I looked into the
> > server log file.
> > 
> > Because of this I am unable to access my servlet (getting 404).. here is
> my
> > web.xml file
> > 
> > 
> > 
> >  > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> > "http://java.sun.com/dtd/web-app_2_3.dtd";>
> > 
> > 
> > 
> > test
> >   
> > 
> >   TestServlet  
> >   TestServlet
> > 
> > 
> > 
> > 
> >   TestServlet
> >   /TestServlet
> > 
> > 
> > 
> > 
> > 
> > Would tell me what could be the wrong that I am doing..will appreciate.
> > 
> > Thanks - Srini.
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
-- 
paul niemandt <[EMAIL PROTECTED]>


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



help on mod_jk

2003-04-03 Thread Paul Hsu
Hi,

I try to install mod_jk with apache, but I always have problem with jk_mod.
I install tomcat-4.0.6 and download mod_jk2-1.3-eapi.so into modules directory. Then I 
append one line " LoadModule jk_module modules/mod_jk2-1.3-eapi.so" at the end of 
httpd.conf file, I run "apachectl configtest", I got the following error. I am really 
puzzled how this work. Any help will be appreciated.

[root]# ./apachectl configtest
Syntax error on line 1070 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_jk2-1.3-eapi.so into server: /usr/loc
al/apache2/modules/mod_jk2-1.3-eapi.so: undefined symbol: ap_table_get

thanks

Paul



Re: web.xml problem

2003-04-03 Thread paul niemandt
Hi Srini:

You most probably don't have the web.xml file in the correct directory.
It needs to be under the WEB-INF directory of your web application.

ie.

$CATALINA_HOME/webapps/YourWebApp/WEB-INF/web.xml

regards,
Paul

On Fri, 2003-04-04 at 00:47, Srinivasu Gandu wrote:
> Hi, I am using tomcat4.1.18 and trying to run a web application.. I am
> getting the error.
> "Missing application web.xml, using defaults only"  when I looked into the
> server log file.
> 
> Because of this I am unable to access my servlet (getting 404).. here is my
> web.xml file
> 
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> 
> 
> test
>   
> 
>   TestServlet  
>   TestServlet
> 
> 
> 
> 
>   TestServlet
>   /TestServlet
> 
> 
> 
> 
> 
> Would tell me what could be the wrong that I am doing..will appreciate.
> 
> Thanks - Srini.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
paul niemandt <[EMAIL PROTECTED]>


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



RE: Cannot load JDBC Driver class com.ibm.db2.jdbc.app.DB2Driver

2003-04-03 Thread paul . johnson

I have it running with  the net driver.  I could not get eh JNDI lookup to
run with the app dirver.  Are you connecting to a remote db??

Paul R. Johnson



   

  Darian Shimy 

  <[EMAIL PROTECTED]To:   'Tomcat Users List' <[EMAIL 
PROTECTED]>  
  .com>cc: 

   Subject:  RE: Cannot load JDBC Driver 
class com.ibm.db2.jdbc.app.DB2Driver  
  04/03/2003 11:55 

  AM   

  Please respond to

  "Tomcat Users

  List"

   

   





I never had too much success with the net driver.  But I think your problem
is with the class name.  The name of the class is
COM.ibm.db2.jdbc.net.DB2Driver.  Note the COM in all caps.

--
Darian Shimy

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 03, 2003 1:38 AM
> To: Tomcat Users List
> Subject: Re: Cannot load JDBC Driver class
> com.ibm.db2.jdbc.app.DB2Driver
>
>
>
> try using the com.ibm.db2.jdbc.net.DB2Driver . (instead of the
> ...app.DB2Driver.)
> it's a thin client that doesn't require finding libraries locally...
> url would be something like:
> jdbc:db2//localhost/db_name
>
> or if you use a non-standard port and use an ip address instead of a
> hostname:
> jdbc:db2//192.168.1.123:9993/db_name
>
> /gilad
>
>
>
>  Gilad Buzi
>  R&D Engineer * CONCATEL
>
>
>  [EMAIL PROTECTED]
>  c/Sardenya, 229-237 Atic. 2a *
>  08013 Barcelona Spain
>  tel. +34.93.244.88.77 * fax
>  +34.93.244.88.78
>
>   www.concatel.com
>
>
>
>
>
>
>
>
> Stephen
>
> Peterson Para:
> [EMAIL PROTECTED]
>
> <[EMAIL PROTECTED]cc:
>
> oo.com>  Asunto:  Cannot
> load JDBC Driver class com.ibm.db2.jdbc.app.DB2Driver
>
>
> 02/04/2003
>
> 12:28
>
> Por favor,
>
> responda a
>
> "Tomcat Users
>
> List"
>
>
>
>
>
>
>
>
> Hello,
>
> I'm getting this java.sql.SQLException when trying to open a
> connection
> on my datasource.  The WebSphere Test Environment datasource
> opens connections fine,
> but not Tomcat/4.1.24.  Other details, using DB2 Personal
> Edition version 7.2,
> on Windows 2000 Professional.
>
> I copied C:\sqllib\db2java.zip to $CATALINA_HOME/common/lib
> directory, renaming
> to db2java.jar.
>
> I verified that the com.ibm.db2.jdbc.app.DB2Driver class was
> actually in the jar file.
>
> In the server.xml listing below I added parms for username
> and password since I always see them in other postings, although
> I have always spcified the username/password in the
> getConnection
> method call, successfully in websphere.
> ==
> server.xml:
>
> 
>type="javax.sql.DataSource"/>
>   
> 
>   factory
>
> org.apache.commons.dbcp.BasicDataSourceFactory
> 
> 
>   driverClassName
>   COM.ibm.db2.jdbc.app.DB2Driver
> 
> 
>   url
>   jdbc:db2:gupt1b
> 
> 
>   password
>   password
> 
> 
>   username
>   user1
> 
> 
>   maxActive
>   8
> 
> 
>   maxIdle
>   4
> 
>   

4.1.24 Tag Lib problem

2003-04-03 Thread paul . johnson
Hello,

I have looked over the archives, and I looked at my code.

I am having an issue with only one thing.  I am sending a url back to the
client, but it only makes it to the first entry.  The others are blank.
(The url is dynamic)  If I refresh the page all the links are gone.  The
code works fine in JBoss/Jetty, Was 3.5, WAS 4.0, WAS 5.0, Tomcat 4.04,
etc.  What should I be looking at to fix it?

Thanks in Advance,

Paul R. Johnson




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



Re: How to use this mail list

2003-04-02 Thread Paul Yunusov
On Wednesday 02 April 2003 05:26 pm, HAMILTON, DALE K (SBCSI) wrote:
> Sorry I'm a newbie.  I read the Jakarta site and the contents of the
> subscription emails.
> I wanted to get a list of past topics with
> <[EMAIL PROTECTED]> syntax, it doesn't seem to
> work.
>
> Where is a good reference on news list usage?
>
> > Dale K. Hamilton

http://jakarta.apache.org/site/mail.html

Start from here.

Paul

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



Re: Form Auth

2003-04-01 Thread Paul Yunusov
On Tuesday 01 April 2003 10:05 am, Michael D. Kirkpatrick wrote:
> I am not quite sure if this question is suitable for this mailing list.  If
> not, please forgive me.
>
> I am using the form authentication for adding security to one of my apps.
> Since this app will be in use with several web sites, I am forced to pass
> something like "?site=somesite" in my url.
> The problem that I am running into is that on the actual login form, I do
> not have access to the original query string.
> The login page has 2 links: Create account and Recover Password.
> I need that original query string so I can reference the proper web site's
> information.
> What I have access to is the query string of
> "/some_app/login.jsp?name=value" for displaying the login screen.
> That query is what I have placed in web.xml.
>
> So here is my question.  How can I capture the original query string or
> make the query string in web.xml dynamic?

I have a gut feeling you want to know how to keep a parameter across requests. 
There is an abstraction called "session" for storing data across multiple 
servlet requests from the same client. Check the 
javax.servlet.http.HttpSession interface and, in particular, its setAttribute 
and getAttribute methods.

Paul

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



how to print multi page report from jsp

2003-03-31 Thread anto paul
Hi,
I have developed an intranet application using jsp/servlets. I need to
print a multipage report which have common header and footer. Also I have to
specify the page size and font. For single page printing I was using
javascript function window.print(). But it is impossible to use in it in
this case. Also I want to avoid the print dialog of the browser. All client
machines are using IE 5 or above. Is there any open source java api which
can be run inside to generate the report and print it. Or is there any HTML
way for it.
Thanx in advance.
Anto


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



Re: shared resources

2003-03-30 Thread Paul Hsu
Todd,

You need to put your jar file under $CATALINA_HOME/common direcotry.
$CATALINA_HOME/shared directory are only available to Catalina engine, not
application but /common can be seen by both engine and application.

Paul
- Original Message -
From: "Pat McGroin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 30, 2003 5:32 PM
Subject: Re: shared resources


> Craig,
>
> Thanks again for the information.
> The info. you've supplied has been very useful.
> However, my problem remains:
>
> I cannot access the class that resides in a JAR file (utilities.jar) in
/shared/lib and get a java.lang.NoClassDefFoundError
>
> I am spinning my wheels on this so hopefully some details will shed some
light on my problem. I wrote a very simple servlet that attempts to use the
class in the shared dir.
>
> 
> import com.myco.utilities.CASDate;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
>
> public class Test1 extends HttpServlet {
> //
> public void doGet(HttpServletRequest request, HttpServletResponse
response) throws javax.servlet.ServletException, java.io.IOException {
>
> System.out.println("GET method of Test1 invloked");
> performTask(request, response);
> }
> //
> public void doPost(HttpServletRequest request, HttpServletResponse
response) throws javax.servlet.ServletException, java.io.IOException {
>
> System.out.println("POST method of Test1 invloked");
> performTask(request, response);
> }
> /**
> * Test the use of a shared class.
> */
> public void performTask(HttpServletRequest request, HttpServletResponse
response) {
>
> try {
> java.io.PrintWriter pw = response.getWriter();
> CASDate today = new CASDate();
> pw.println("CASDate today is " + today.toString());
> pw.println("CASDate class loaded...");
> }
> catch(Throwable theException) {
> System.out.println("Error...");
> theException.printStackTrace(System.out);
> }
> }
> }
> 
> This is the utility class (some getXXX methods deleted for brevity):
> 
> package com.myco.utilities;
>
> import java.util.Calendar;
> import java.util.GregorianCalendar;
>
> public class CASDate {
> private int ccc = 0;
> private int yyy = 0;
> private int mmm = 0;
> private int ddd = 0;
> private int time = 0;
> /**
> * Default constructor is to create CAS date using the current date.
> */
> public CASDate() {
> super();
> GregorianCalendar cal = new GregorianCalendar();
> ccc = 20;
> yyy = cal.get(Calendar.YEAR) - 2000;
> mmm = cal.get(Calendar.MONTH) + 1;
> ddd = cal.get(Calendar.DAY_OF_MONTH);
> }
> /**
> * Return a string in MM/DD/CCYY format.
> */
> public String toString() {
> String returnValue = getMonth() + "/" + getDay() + "/" +
getYearAndCentury();
> return returnValue;
> }
> }
> 
>
> The error I get is:
> java.lang.NoClassDefFoundError: com/myco/utilities/CASDate
>
> When I moved utilities.jar to /WEB-INF/lib the error goes away.
> I hope this provides some clues as to what is going wrong. At this point
it looks like a bug but I hope I'm wrong. I am using Tomcat 4.1.18.
>
> Any help is GREATLY appreciated.
>
> Thanks,
> Todd
>
>
> -Original Message-
> From: "Craig R. McClanahan"<[EMAIL PROTECTED]>
> To: "Pat McGroin"<[EMAIL PROTECTED]>
> Date: Thu Mar 27 13:53:24 PST 2003
> Subject: Re: shared resources
>
> >
> >
> >On Thu, 27 Mar 2003, Pat McGroin wrote:
> >
> >> Date: Thu, 27 Mar 2003 12:57:03 -0800 (PST)
> >> From: Pat McGroin <[EMAIL PROTECTED]>
> >> To: Craig R. McClanahan <[EMAIL PROTECTED]>
> >> Subject: Re: Re: shared resources
> >>
> >> Craig,
> >>
> >> Thanks very much for the detailed reply.
> >> That is very useful information for getting at resource files.
> >> However, my problem is much simpler. I am simply getting
java.lang.NoClassDefFoundError errors when I try to use classes in JAR files
in the /shared/lib directory.
> >> When I move the jar files to my /WEB-INF/lib the classes
are loaded just fine and I don't see these errors.
> >>
> >
> >One likely cause for this sort of thing: if a class in your "problem
> >child" JAR file is itself loaded from the shared class loader, but tries
> >to access a different class that is in the webapp class loader, you'll
get
> >exactly this sort of problem.
> >
> >Note that NoClassDefFound errors do *not* say that the class named in the
> &g

Question about mod_jk

2003-03-28 Thread Paul Hsu
Hi,

I try to set up mod_jk on Apache 2.0.44 on window 2000. I download mod_jk.dll and save 
into modules/ directory. Then I put one line in httpd.conf file as following:

LoadModule jk_module modules/mod_jk.dll

then I use test configuration to test my setting. I always receive the message "Cannot 
load C:/apache/apache2/modules/mod_jk.dll into server: the specified module cannot be 
found". I wonder the mod_jk.dll is the right file. Thanks in advance if any one can 
help me.

Paul



 




page buffer && tomcat 4.0.4

2003-03-27 Thread Paul Eberwaldes
Hello,

I want migrate my tomcat 3.2.3 to 4.0.4, and I have a problem:

In the jsp-pages I set the page buffer to 50kb (<%@ page buffer="50kb" ...)
and I get the error-messages:  java.io.IOException: Stream closed.

If I make the buffer smaller like 8kb, I don't get the error messages.

Does anybody know, how I must configurate tomcat, that I can use 50kb?

Best regards,
Paul

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


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



RE: Servlet help

2003-03-27 Thread Paul Gregoire
Once you have compiled the new servlet either jar it up or copy it
directly to your WEB-INF/classes, if you jar'd it then copy the jar to
WEB-INF/lib.
Now within moments your servlet should be available unless you have:
- turned servlet reloading off
- have not made an entry for the servlet in your web.xml
If you have not then delete the subdirectories within your "work"
directory, as this will cause tomcat to regenerate all the webapp files
thus providing your users with the most current version.

hope that helps...

-Original Message-
From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 3:01 PM
To: 'Tomcat Users List'
Subject: Servlet help


This seems like a silly question: 
when I make changes in my servlet what do I have to do to load the new
file?

I have tried just saving it. I have tried restarting Tomcat. I have
tried
recompiling the file. I have tried recompiling while Tomcat was shutdown
and
while Tomcat was running. I have tried restarting the machine. Only
restarting the machine seems to work.
Comments? Suggestions? Ridicule?

Sandra Patricia Hunter
Systems Development and Web Design 
 


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


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



Re: Tomcat 5 and Ant install/reload/remove

2003-03-22 Thread Paul Campbell
Thanks Guys, that has sorted that out.

Thanks very much and sorry for the confusion.

On Sat, Mar 22, 2003 at 11:24:25AM -0600, Jacob Kjome wrote:
> 
> You are missing the point of using the ant install task.  It installs your 
> app from wherever it is on the file system.  If you copy stuff into the 
> webapps directory, you have done a more permanent install.  You can't do 
> both of these at once.
> 
> So, either copy the contents of your webapp to the "webapps" directory *or* 
> do "ant install" from wherever you are on the file system and provide the 
> location of the docBase to the ant install task.
> 
> Jake
> 
> At 04:28 PM 3/22/2003 +, you wrote:
> >Following the docs for the deployment process I created a simple HelloWorld
> >servlet.
> >
> >I cannot be certain, but I believe, proir to running ant install, I manually
> >copied the servlet directory to TOMCAT/webapps/HelloWorld.  After running ant
> >install the servlet ran perfectly.
> >
> >However, modifting the development copy of the srevlet and rerunning ant
> >install produced no effect.
> >
> >I deleted the TOMCAT/webapps/HelloWorld directory and ran "ant remove 
> >clean all
> >install".  All reported fine, but NO evidence of anything on TOMCAT/webapps/
> >
> >I double check the server has write access and it does.  I eventually 
> >manually
> >copied the contents of HelloWorld/build to TOMCAT/webapps/ and renamed it
> >HelloWorld.  Nothing.  I reran ant install and it said, OK.  Servlet Not
> >Avaliable or 404 errors was all I could get.
> >
> >I can not get the ant install to work at all.  It registers it with the
> >manager, but that is it.
> >
> >To get subsequent versions even after minor edits to work, I need to...
> >
> >ant compile
> >cp build/* -r /opt/tomcat/webapps/HelloWorld
> >ant install
> >/opt/tomcat/bin/shutdown.sh
> >[ .. wait 20 seconds .. ]
> >ps ax
> >possibly:   /opt/tomcat/bin/shutdown.sh  again
> >
> >/opt/tomcat/bin/startup.sh
> >[ takes over a minute to restart ]
> >
> >Finally the app works.
> >
> >Unless I am doing something wrong, this conflicts with the documentation 
> >on the
> >deployment process that states all you need to do to get the app running
> >temporarily on the server during development is to run ant install.
> >
> >Any help and advice would be very greatfully recieved.  Thanks.
> >
> >--
> >
> >Paul Campbell
> >
> >Campbell Multimedia
> >Web Design | PC Sales
> >+===+
> >[ WWW:   http://campbell-multimedia.com ]
> >[ Tel:   07970 510549   ]
> >[ Email: [EMAIL PROTECTED]   ]
> >+===+
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]

-- 

Paul Campbell

Campbell Multimedia
Web Design | PC Sales
+===+
[ WWW:   http://campbell-multimedia.com ]
[ Tel:   07970 510549   ]
[ Email: [EMAIL PROTECTED]   ]
+===+


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



Tomcat 5 and Ant install/reload/remove

2003-03-22 Thread Paul Campbell
Following the docs for the deployment process I created a simple HelloWorld
servlet.

I cannot be certain, but I believe, proir to running ant install, I manually
copied the servlet directory to TOMCAT/webapps/HelloWorld.  After running ant
install the servlet ran perfectly.

However, modifting the development copy of the srevlet and rerunning ant
install produced no effect.

I deleted the TOMCAT/webapps/HelloWorld directory and ran "ant remove clean all
install".  All reported fine, but NO evidence of anything on TOMCAT/webapps/

I double check the server has write access and it does.  I eventually manually 
copied the contents of HelloWorld/build to TOMCAT/webapps/ and renamed it 
HelloWorld.  Nothing.  I reran ant install and it said, OK.  Servlet Not
Avaliable or 404 errors was all I could get.

I can not get the ant install to work at all.  It registers it with the
manager, but that is it.

To get subsequent versions even after minor edits to work, I need to...

ant compile
cp build/* -r /opt/tomcat/webapps/HelloWorld
ant install
/opt/tomcat/bin/shutdown.sh
[ .. wait 20 seconds .. ]
ps ax
possibly:   /opt/tomcat/bin/shutdown.sh  again

/opt/tomcat/bin/startup.sh
[ takes over a minute to restart ]

Finally the app works.

Unless I am doing something wrong, this conflicts with the documentation on the
deployment process that states all you need to do to get the app running
temporarily on the server during development is to run ant install.

Any help and advice would be very greatfully recieved.  Thanks.

-- 

Paul Campbell

Campbell Multimedia
Web Design | PC Sales
+===+
[ WWW:   http://campbell-multimedia.com ]
[ Tel:   07970 510549   ]
[ Email: [EMAIL PROTECTED]   ]
+===+


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



Help Tomcat 4.1.18 jsp reloading problem

2003-03-18 Thread anto paul
Hello,
I am using tomcat 4.1.18 binary downloaded from
jakarta site. The server is running on windows 200
server service pack 2 and I am working on windows 98
machine with the tomcat drive mapped as a local drive.
The problem with is it is not reloading the jsp page
when it is changed. But it works when I change the
system date to a newer date than the current date.
Changing the time is not working. Is it a bug. Or I
will have to work with the system date changes to
tomorrows date ?.

Anto

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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



Re: A strange problem

2003-03-14 Thread Paul Yunusov
On Friday 14 March 2003 01:55 pm, V Y wrote:
> Dear All:
> I come across a very strange error and appreciate any help/tips.
>
> My env:
>I am using Jakarta Tomcat 4.1.12 (on Linux) and 4.1.18 (on Solaris).
>I have installed MySQL JDBC connector and I have written
>some JSP code to input/retrieve data from my MySQL database.
>The MySQL DB is running on the Linux box.
>
>In my JSP code, I used a lot of these methods to get around
>between pages:
>
>   RequestDispatcher dp =
> getServletContext().getRequestDispatcher("some path to a page");
>  dp.forward(request, response);
>
>At some other pages that does not have JSP, the standard HTTP post
>is used for going to the next page.
>I have also some backend Java code that sits in the
>shared/lib directory that my JSP code will interact with.
>I have worked on this for about a month and just this
>week, I came to notice this problem.
>
>A single operation involves 4 pages of fill-in-blanks on different
>forms.  I would go through one cycle (the 4 pages) once.  Redirect
>back to the beginning and if I would go through right away
>the same cycle, I would choke in between pages.  The browser is spinning
> after I press that "Continue" button and after a while
> would display the standard "Page cannot be loaded" message.
>If I restart the servlet engine, everything is fine again for
>the first time and the cycle repeats.
>If I comment out the RequestDispatcher section above
>from a page that it was choking on, then it displayed that
>page just fine.
>
>Everything seems to point to the RequestDispatcher not able
>to actually forward to the next page.  Sometimes, those static
>HTTP post pages have the same problems too though not as consistent.
>
>Not sure what I did wrong.  I did not do any extra config and use
>Tomcat right out of the download.
>
>Any help/tip much appreciated
>
>
>--Vincent

The JSP page that forwards to the next one has its own response (the generated 
HTML) wiped out when the forward method is called because that's how the 
forward method works:

"forward should be called before the response has been committed to the client 
(before response body output has been flushed). If the response already has 
been committed, this method throws an IllegalStateException. Uncommitted 
output in the response buffer is automatically cleared before the forward."
(from the Servlet 2.3 API spec)

In general, using RequestDispatcher's forward method in a JSP page is 
ineffective because JSPs' purpose is to generate the final response (usually, 
HTML) and the RequestDispatcher's purpose is to delegate producing the 
response to another resource.

Try to use the RequestDispatcher's include method or one of the include tags 
to have several JSPs produce a single response (HTML) together. Remember, a 
JSP is just a template to generate HTML and using it for any other purpose 
such as coordinating workflows is an invitation for trouble. Introduce a 
controller servlet instead but discussing this is beyond the scope of this 
mailing list (as, in fact, all of the above but since Tomcat is a reference 
implementation of the Servlet/JSP spec, people close their eyes on this. They 
do, right?)

Paul

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



RE: Loadbuild Problem

2003-03-14 Thread Paul Randolph
You may also want to ask the developer Group at [EMAIL PROTECTED]

-Original Message-
From: kevin carey [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 4:10 PM
To: [EMAIL PROTECTED]
Subject: Loadbuild Problem


Hi,

I'm building Tomcat from scratch using directions from
http://jakarta.apache.org/tomcat/building.html

I'm running JDK 1.4 on Linux.

After about 3 hours, build fails with message:

BUILD FAILED
file:/home/kevin/apps/tomcat/src/jakarta-tomcat-5/build.xml:465:
Basedir /home/kevin/apps/tomcat/src/jakarta-commons/el
does not exist

Any thoughts?

newbie.


__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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


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



Re: unable to start admin app...Can someone please respond

2003-03-14 Thread Paul Yunusov
On Friday 14 March 2003 09:16 am, krip pane wrote:
> All,
>
> Can someone please help with running the admin
> application (running on solaris 2.8, tomcat4.1.18).  I
> keep getting the following errors (truncated):
>
> 2003-03-13 09:17:18 WebappLoader[/admin]: Deploying
> class repositories to work directory
> /opt/jakarta-tomcat-4.1.18/work/Standalone/localhost/admin
> 2003-03-13 09:17:18 WebappLoader[/admin]: Deploy class
> files /WEB-INF/classes to
> /opt/jakarta-tomcat-4.1.18/webapps/../server/webapps/admin/WEB-INF/classes
> 2003-03-13 09:17:18 WebappLoader[/admin]: Deploy JAR
> /WEB-INF/lib/struts.jar to
> /opt/jakarta-tomcat-4.1.18/webapps/../server/webapps/admin/WEB-INF/lib/stru
>ts.jar 2003-03-13 09:17:19 ContextConfig[/admin] Exception
> processing JAR at resource path
> /WEB-INF/lib/struts.jar
> javax.servlet.ServletException: Exception processing
> JAR at resource path /WEB-INF/lib/struts.jar
> at
> org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930
>)
>
>
> - Root Cause -
> java.io.IOException: Permission denied
> at
> java.io.UnixFileSystem.createFileExclusively(Native
> Method)
> at java.io.File.checkAndCreate(File.java:1313)
> at java.io.File.createTempFile(File.java:1401)
> at java.io.File.createTempFile(File.java:1438)
>
> Please help.
>
> TIA

Make sure the user that runs Tomcat owns CATALINA_HOME all the way down or has 
a write permission for it.

If it's a real pain, do this (dangerous because you are making CATALINA_HOME 
writable for everyone):

su
chmod a+wx $CATALINA_HOME

Paul

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



Re: Configuration of tomcat

2003-03-14 Thread Paul Yunusov
On Friday 14 March 2003 01:53 pm, Eamonn Walsh wrote:
> Could you please help me with the following problem.
> I have installed the JDK and tomcat successfully on my PC. I am now
> ready to develop my own web application using JSP. I have admin rights
> on the PC.
> How do I set the context so that when I sdave my JSP files on my hard
> dsik, tomcat will know where they are?
> Regards,
> Eamonn

I understand you want to save your webapp files in a non-default location. You 
can set your own "docBase" for any context in server.xml or a separate 
context conf file.

Go to the Tomcat doc page at http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ 
and find the Server Configuration Reference link. After following it, go to 
the Context page (the link is under Containers on the left hand side) and 
find the docBase paragraph under Attributes. It won't hurt reading the whole 
page though.

Paul

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



Re: question

2003-03-09 Thread Paul Hsu
Reynir,

Thank you for your advice. So the main reason to intergrate with Apache is
using Apache to ease the load from Tomcat. In other word, every static
content will be rendered by Apache without Tomcat. If a web application use
dynamic content mechanism such as JSP/Servlet, then the integration won't
benifit us at all. Am I correct. I know some one use Apache for traffic load
balance only.

thanks

Paul
- Original Message -
From: "Reynir Hübner" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Sunday, March 09, 2003 8:59 AM
Subject: RE: question


You can set up virtual hosts with tomcat.

You should set up another HTTP server  (such as apache, IIS) if you want to
use apaches capabilities and performance.
Obviously having tomcat delivering static documents, such as images and
.html can be a waste of resource.

Performance is the biggest single reason to intergrate with apache. This
dependes on the type of application you are using, and how big part of it is
static content rather than dynamic content such as servlets/jsp.

Then of course know-how of the people that will be running the system long
term is very often a reason enough to deploy with either apache or IIS, as
they don't neccesarily know how to configure tomcats security, but know how
to do it in IIS/apache.

Hope it helps,

-reynir


> -Original Message-
> From: Paul Hsu [mailto:[EMAIL PROTECTED]
> Sent: 9. mars 2003 16:53
> To: Tomcat Users List
> Subject: question
>
>
> Hi,
>
> I know tomcat already provide web server capability, under
> what knid circustance you need to intergrate apache with
> tomcat. My thinking is when you want to set up virtual host.
> I don't know this answer is correct? If any one can give me
> advice, thank you in advance.
>
> Paul
>

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


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



question

2003-03-09 Thread Paul Hsu
Hi,

I know tomcat already provide web server capability, under what knid circustance you 
need to intergrate apache with tomcat. My thinking is when you want to set up virtual 
host. I don't know this answer is correct? If any one can give me advice, thank you in 
advance.

Paul

Java mail

2003-03-08 Thread Paul Hsu
Hi,

I try to develope a java mail. I have a problem about how to authenticate email sender 
against email server. Since the email server ask for authentication if you want to 
send a email through that server because of spam issue. I got 
javax.mail.MessagingException==553 Authentication is required to send mail as <[EMAIL 
PROTECTED]>
error every time. The following is my Mailer class. I wonder if any one know what is 
wrong with my code. Any help will be appreciated.

package com.smartequip.email;

import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.FileDataSource;
import javax.activation.DataHandler;
import java.util.*;
import java.io.*;
import com.smartequip.common.AppBase;

public class Mailer extends AppBase
{

public static String TEXTPLAIN = "1";
public static String TEXTHTML = "2";
public static String EDI = "3";

private String smtpHost=null;
private String subject=null;
private String from=null;
private Vector toV = new Vector();
private Vector ccV = new Vector();
private Vector attachedV = new Vector();
private String textMessage=null;
private String message_type = "1";
private String userName="";
private String password="";
private Auth auth;
private Session session;

public Mailer()
{
}

public Mailer(String smtpHost)
{
this.smtpHost = smtpHost;
}

public void setUserName(String s)
{
this.userName = s;
}

public void setPassword(String s)
{
this.password = s;
}

public void setSmtpHost(String smtpHost)
{
this.smtpHost = smtpHost;
}

public void setFrom(String from)
{
this.from = from;
}

public void addTo(String to)
{
toV.add(to);
}

public void addCc(String cc)
{
ccV.add(cc);
}
public void setSubject(String subject)
{
this.subject = subject;
}

public void addAttached(String attached)
{
attachedV.add(attached);
}

public void setTextMessage(String message)
{
this.textMessage = message;
}


public void setMessageType(String t)
{
this.message_type = t;
}

public void send() throws Exception
{

Message msg = prepareHeader();
if(message_type.equals(TEXTPLAIN))
msg.setContent(textMessage, "text/plain");
if(message_type.equals(TEXTHTML))
msg.setContent(textMessage, "text/html");
sendMesg(msg);
}


private void sendMesg(Message msg) throws Exception
{
msg.saveChanges(); // implicit with send()
Transport transport = session.getTransport("smtp");
transport.connect(smtpHost, userName, password);
transport.sendMessage(msg, msg.getAllRecipients());
transport.close();
}


private Message prepareHeader() throws Exception
{
Properties props = new Properties();
if(smtpHost == null)
throw new Exception("No SMTP Host specified.");
props.put("mail.smtp.host", smtpHost);
props.put("mail.user", userName);
props.put("password", password);

session = Session.getDefaultInstance(props, null);
session.setDebug(true);
Message msg = new MimeMessage(session);
// set from
if(from == null)
throw new Exception("No Sender specified.");
InternetAddress addr = new InternetAddress(from);
msg.setFrom(addr);
// set to
if(toV.size() == 0)
throw new Exception("No Recipients specified.");
for (int i = 0; i < toV.size(); i++)
{
InternetAddress addrt = new InternetAddress((String)toV.get(i));
msg.addRecipient(Message.RecipientType.TO, addrt);
}

// set cc
for (int i = 0; i < ccV.size(); i++)
{
InternetAddress addrt = new InternetAddress((String)ccV.get(i));
msg.addRecipient(Message.RecipientType.CC, addrt);
}

// set subject
if(subject == null)
throw new Exception("No Subject specified.");
msg.setSubject(subject);
msg.setSentDate(new Date());

return msg;

}

} // Mailer


thanks

Paul 

Configuring subdomains

2003-03-04 Thread Paul Jans
Hi there,

I'm trying to configure subdomains with Tomcat 4.1.18
on Windows 2000. I'd like sub1.mydomain.com to point
to sub1.html and sub2.mydomain.com to point to
sub2.html. mydomain.com is registered with my ISP.

I've read a bit about virtual hosts etc but can't seem
to get anything working. I've also searched the
archives, though being a newbie I am probably missing
something.

Can someone perhaps post an example config for a
simple subdomain setup like the above ? Do I need DNS
entries for the subdomains (ie do I need to work with
my ISP for this) ? Is it possible to test the
configuration on localhost ?

Any help is much appreciated.

Thanks,
Paul

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



Re: no startup.sh

2003-03-04 Thread Paul Warner
You are correct - the tomcat4 executable is in
/usr/bin, and "tomcat4 start" does initiate the
startup process (although it aborts with some errors -
needs configuring).  I am going to use the tar.gz
binary distribution as you (and Yoav) recommend - but
I see that the rpm version may work with some loving
care.

Thanks for the info,
Paul

--- Jon Roberts <[EMAIL PROTECTED]> wrote:
> The rpm is very different, and mysteriously only has
> .jar files in the 
> /bin directory. I believe you'll find tomcat startup
> commands in 
> /usr/bin, but you can check the initialization
> script in /etc/init.d to 
> find the commands for sure.
> 
> I wrestled with the rpm for a while, but switched to
> the binary 
> distribution based on many suggestions from this
> list. Exactly nobody 
> was able to help me with the rpm. I recommend using
> the binary version.
> 
> Jon Roberts
> www.mentata.com
> 
> Paul Warner wrote:
> > I installed Tomcat 4.1.18 (the rpm, with the
> command
> > rpm -i) on Redhat 8.  I cannot locate a startup
> script
> > in /var/tomcat4/bin/ or anywhere else.  No
> shutdown
> > script either.
> > 
> > I checked the tomcat documentation and the
> archives -
> > everything indicates the startup script should be
> > there.  I couldn't find anything on this problem.
> > Any help would be appreciated.
> 
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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



RE: no startup.sh

2003-03-04 Thread Paul Warner
Thanks, Yoav!  Yes, the tar.gz install worked just
fine.  Must be a problem with the rpm version.

Thanks for the help.

Paul

--- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
> 
> Howdy,
> I don't have any experience with the rpm, so I'd
> suggest using another
> distribution (the .gz or .zip one) in a clean
> directory, not overwriting
> any existing installation.
> 
> Yoav Shapira
> Millennium ChemInformatics
> 
> 
> >-Original Message-
> >From: Paul Warner [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, March 04, 2003 10:04 AM
> >To: [EMAIL PROTECTED]
> >Subject: no startup.sh
> >
> >Hello,
> >
> >I installed Tomcat 4.1.18 (the rpm, with the
> command
> >rpm -i) on Redhat 8.  I cannot locate a startup
> script
> >in /var/tomcat4/bin/ or anywhere else.  No shutdown
> >script either.
> >
> >I checked the tomcat documentation and the archives
> -
> >everything indicates the startup script should be
> >there.  I couldn't find anything on this problem.
> >
> >I also have tomcat3.3 installed on this system.  I
> >didn't take the time to uninstall, since rpm -e
> >claimed it couldn't find the installation, and I
> >wanted a demo ready by tomorrow.
> >
> >Any help would be appreciated.
> >
> >Paul Warner
> >
>
>-
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> 
> This e-mail, including any attachments, is a
> confidential business communication, and may contain
> information that is confidential, proprietary and/or
> privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not
> be saved, copied, printed, disclosed or used by
> anyone else.  If you are not the(an) intended
> recipient, please immediately delete this e-mail
> from your computer system and notify the sender. 
> Thank you.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


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



no startup.sh

2003-03-04 Thread Paul Warner
Hello,

I installed Tomcat 4.1.18 (the rpm, with the command
rpm -i) on Redhat 8.  I cannot locate a startup script
in /var/tomcat4/bin/ or anywhere else.  No shutdown
script either.

I checked the tomcat documentation and the archives -
everything indicates the startup script should be
there.  I couldn't find anything on this problem.

I also have tomcat3.3 installed on this system.  I
didn't take the time to uninstall, since rpm -e
claimed it couldn't find the installation, and I
wanted a demo ready by tomorrow.

Any help would be appreciated.

Paul Warner

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



Re: R: Bypassing security-constraint in 4.0.2

2003-03-04 Thread Paul Downs
* Simone Chiaretta ([EMAIL PROTECTED]) wrote :
> Don't know
> probably it's bug of 4.0.2
> it's a very old release... I've 4.0.4, I tried bypassing the security to
> test if I'm affected too
> but it always ask me authentication
> 
> I suggest that u upgrade to a newer release of the server

Hi,
  Sadly that has severe implications for me in this instance.  Oh well I
have replaced all the sites affected with .htaccess authentication for now.
Does anyone know what jar file controls this?  Perhaps I can use a really
kludgy fix for now by just upgrading the one aspect?

Paul

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



Bypassing security-constraint in 4.0.2

2003-03-04 Thread Paul Downs

Hi,
  If I have the following configuration:


  
site
/secret/*
  
  
administrator
  


  I get prompted for a username and password for this url:

www.testing.com/secret/
  
  but not for this:

www.testing.com//secret

  was this a known bug, I couldn't find much about it and thought it may be
quicker to ask you guys?

Paul

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



Re: Own Login page

2003-02-26 Thread Paul Mahoney
From: James Chrystal [mailto:[EMAIL PROTECTED] 
Sent: 25 February 2003 20:34
To: [EMAIL PROTECTED]
Subject: Own Login page


Paul,

I've run into your problem as well, and here's how I solved it.
Please post this answer to the mailing archives, as I don't want to
subscribe and get all that email myself!  This was a little tricky to
figure out, but it does work.

Jim

BTW - I work for Red 5 Interactive, here in Des Moines, IA.  We're web
integrators, so if you need any work done, give us a call!


A couple of pieces of information you probably already know:

1)  When you request a secure resource from tomcat, tomcat redirects to
the login page defined in the deployment descriptor (web.xml).
2)  You cannot submit to j_security_check without having requested a
secure resource, because Tomcat would not know where to send you once
you logged in.
3)  From the .jsp/servlet/.html page which comprises your login, you
have no way of accessing the secure url originally requested.

Here's what you need in your deployment descriptor:

  
403
/loginError.jsp
  
  
FORM

  /loginHandler.jsp
  /loginError.jsp

  

Here's how it works:

1)  User fills out login form, and submits - there are hidden fields on
the form to tell the next .jsp in the change where to redirect.
2)  preLogin.jsp receives the request, puts the j_username/j_password in
the session, and redirects to the secureUrl.
3)  Tomcat intercepts the request to the secureUrl and realizes the user
is not logged in.  Tomcat caches the securlUrl for that user, and
forwards to the page
defined in the deployment descriptor as the , in our
case, loginHandler.jsp.
4)  The loginHandler.jsp page sends a redirect to the j_security_check
url stored in the session, but not before appending the j_username and
j_password from the session.
5)  Tomcat again intercepts the request.  If the j_username and
j_password evaluate to a valid user, Tomcat will forward to the
originally requested resource.  If the credentials are invalid, Tomcat
will redirect to the  defined in the deployment
descriptor.  This way, the user can re-enter his/her information and try
to submit again.


Here's some examples:

1)  Create a login form - this can be a static html page or anything you
like, and it can exist anywhere on your site.





  
j_username

  
  
j_password

  
  

  

  

2)  Create a preLogin.jsp - this must be a jsp page, as we're going to
do some work

<%
request.getSession( true );

request.setAttribute( "j_username", request.getParameter( "j_username" )
);
request.setAttribute( "j_password", request.getParameter( "j_password" )
);
request.setAttribute( "j_security_check", request.getParameter(
"j_security_check" ) );

response.sendRedirect( request.getParameter( "secureUrl" ) );
%>


3)  Create a loginHandler.jsp page

<%
response.sendRedirect( request.getSession().getAttribute(
"j_security_check" ) + "?j_username=" +
request.getSession().getAttribute( "j_username" ) + "&j_password=" +
request.getSession().getAttribute( "j_password" ) );
%>


4)  Create a login error page - loginerror.jsp

 



  
j_username

  
  
j_password

  
  

  




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



Own Login page

2003-02-25 Thread Paul Mahoney
Dear Team

I've been scanning the web, and this mail archive, looking for the
answer to a question many have asked, but to which I not find any clear
answer. Please bare with me...

We are using form based authentication... works fine.

However, on occasion we want to show a login form on a page. The user
puts in their name and password, clicks "submit" and is taken to some
protected url having been authorised.

The way I see it, we need to set the "action" of this login form to a
"jsp/servlet", of our making, that takes the name and password,
validates and sets up the appropriate authority object and forwards them
to the target page or to an error page. Because we've set up the
authority object for the session/context, the standard form based dialog
does not appear.
(Does this make sense?)

But I can't see how we do what the j_security_check action must do.

Someone must have "been there, done that!". Could they enlighten me?
I've waded through enough javadoc now :(

Many thanks

Paul



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



Re: Catalina Ant tasks

2003-02-21 Thread Paul Yunusov
On Friday 21 February 2003 05:51 pm, Rasputin wrote:
> * Paul Yunusov <[EMAIL PROTECTED]> [0205 22:05]:
> > People complained about a lack of documentation for Catalina Ant tasks.
>
> Not complaints as such, just wondered if there was any really :)
>
> > best fairly accessible document I could find to date is the App Dev Guide
> > at the Tomcat doc site.
> > However, I also strongly suggest looking at the tasks'  source code. Look
> > under /catalina/src/share/org/apache/catalina/ant/ in the source
> > distribution.
>
>  
>
> > It can tip you off as to allowed task attributes and reveal things like
> > that the tasks are implemented using java.net.URLConnection. ;)
>
> Allowed attributes is what I was after - thanks Paul.

Glad I could be of help :)

Paul

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



Catalina Ant tasks

2003-02-21 Thread Paul Yunusov
People complained about a lack of documentation for Catalina Ant tasks. The 
best fairly accessible document I could find to date is the App Dev Guide at 
the Tomcat doc site.

However, I also strongly suggest looking at the tasks'  source code. Look 
under /catalina/src/share/org/apache/catalina/ant/ in the source 
distribution.

It can tip you off as to allowed task attributes and reveal things like that 
the tasks are implemented using java.net.URLConnection. ;)

It's strange that Catalina tasks are not list in the external task list at the 
Ant site.

Paul

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



Re: tomcat ant tasks (docs?)

2003-02-20 Thread Paul Yunusov
On Thursday 20 February 2003 02:56 pm, Wendy Smoak wrote:
> > Wendy, why are you dealing with war files during development at all? Ant
>
> does
>
> > a great job installing and reloading from "docBases" at arbitrariry
>
> locations
>
> > on the filesystem.
>
> At the moment, I don't have my development files arranged in a "webapp"
> structure (with WEB-INF, etc.).  I was developing directly underneath
> /path/to/tomcat/webapps with everything expanded, and I recently moved it
> all to a different location.  I thought I was doing it "right" actually,
> but now I see the error of my ways. ;)  I also didn't realize that
> "docBase" could *be* anywhere outside of the Tomcat directory structure!
>
> Rearranging everything now... thanks for the advice.

One more benefit of a standardized project directory structure is relative 
ease of checking source code in a source control system. CVS + Ant's Catalina 
tasks + Tomcat, of course (and, s, Linux) -- my life is beautiful.

Paul

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




Re: tomcat ant tasks (docs?)

2003-02-20 Thread Paul Yunusov
On Thursday 20 February 2003 12:51 pm, Wendy Smoak wrote:
> On advice given here, I've got tomcat configured to _not_ unpack my .war
> file.  Then my ant 'deploy' target [not task] simply copies the .war file
> over to /path/to/tomcat/webapps.

Wendy, why are you dealing with war files during development at all? Ant does 
a great job installing and reloading from "docBases" at arbitrariry locations 
on the filesystem. I may not have read into your problem carefully enough but 
the very mentioning of war files with Ant Catalina tasks being used for 
something other that final distribution causes misgivings about your setup.
Paul

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




Re: ant deploy task?

2003-02-20 Thread Paul Yunusov
On Thursday 20 February 2003 06:43 am, Rasputin wrote:
> * John Ruffin <[EMAIL PROTECTED]> [0205 18:05]:
> > I asked this same question last week - with no response.
> >
> > What I did was tell TC to not auto-expand and get everything from the war
> > file itself.  Ant will copy the war file to catalina_home/webapps.  Then
> > I use Manager to stop and start the app - restart doesn't work for me.
> >
> > Testing "Best Practices" from the seasoned folks on the list is greatly
> > appreciated.
>
> That works a treat - thanks John, Obviously the file being physically
> in webapps means it survives a reboot without requiring edits to server.xml
> too.
>
> I just need to figure out how to remove them now:
>
> a  task takes care of the WARfile, then a  ant task
> will drop the context, but I get problems if the remove fails while the
> file is still there.
>
> Does anyone jnow where the documentation for the catalina ant tasks is?

Ant install task doesn't create any war files. It creates a context with the 
docBase at the same location as your build files. There is no need at all for 
any war files to use Ant's Catalina tasks. Please read the App Dev Guide at 
the Tomcat doc site. It is extremely useful.
Paul

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




Re: deployment with ant

2003-02-19 Thread Paul Yunusov
On Wednesday 19 February 2003 09:14 am, Rasputin wrote:
> Does the install ant task from 'catalina-ant.jar' work for anyone?
>
> When I try to use it works fine until I restart the server -
> it seems like the install task uses a HTTP PUT to put the warfile
> under work/ then catalina edits its own server.xml so the new
> context will survive a reboot.
> This is just what I need, but it seems to write invalid xml back to it.
>


Have you read this:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

scroll down to the fourth paragraph under Introduction ("In addition to 
nesting...", etc).

Paul

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




Re: ant deploy task?

2003-02-19 Thread Paul Yunusov
On Wednesday 19 February 2003 12:55 pm, Wendy Smoak wrote:
> What's the least amount of work I can do to deploy a new version of my
> webapp?  I've been cheating and developing directly under the webapps
> directory.  Now I've moved to a separate directory structure and am
> building a .war file which gets copied over to webapps.
>
> Since Tomcat auto-expands the war file, I find I have to delete the
> directory and restart in order to get the new version in place.
>
> I found an ant task named 'deploy' but it doesn't seem to be apparently
> requires another .jar file, and I'm having no luck finding that with
> Google. It isn't, as far as I can tell, a core ant task:
>
> W:\java\bendev>ant deploy
> Buildfile: build.xml
> deploy:
> BUILD FAILED
> file:W:/java/bendev/build.xml:136: Could not create task or type of type:
> deploy.
> Ant could not find the task or a class this task relies upon.
>
> 
>   http://my.development.box"; path="${context}"
> war="${dist}/${context}.war"
> username="wendy" password="password" />
> 
>
> I'm also not sure how this is going to work... Tomcat is on the same
> machine so right now I'm just copying the war file over.  Would it be
> better to use the 'install' or 'restart' tasks instead?
>
> Thanks,

Wendy,

There is a wonderful document on the Tomcat's website called App Developer 
Guide that shows some best practices for project and build management. Its 
sample application relies on Ant tasks you're interested in and a full 
build.xml is provided. Ant makes building and deploying webapps a breeze, and 
I wish all Tomcat users read that little guide to make their lives easier.

Thanks again to Craig for authoring it.

Paul

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




RE: JK2 2.0.1 and Apache 2.0.44 problem

2003-02-19 Thread Paul Gregoire
To make changes to tomcat under jboss you must edit tomcat41-service.xml
not server.xml; changes made to the server.xml will not be used by
tomcat.
The tomcat41-service.xml file will be located in your /deploy directory
of the selected configuration set.

Might i suggest that you purchase the JBoss 3.0 Handbook for further
details, this book kicks ASS!
http://www.amazon.com/exec/obidos/tg/detail/-/1861008120/qid=1045677540/
sr=8-1/ref=sr_8_1/104-9967696-6863144?v=glance&s=books&n=507846


-Original Message-
From: Mete Kural [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 9:51 AM
To: Tomcat Users List
Subject: RE: JK2 2.0.1 and Apache 2.0.44 problem


I think so. This is in my servlet.xml:




One thing to mention, I am using the Tomcat that comes
bundled with JBoss, which is Tomcat 4.1.12. Do you
think the fact that Tomcat is invoked by JBoss make a
difference? Any ideas?

Thanks,
Mete

--- "Turner, John" <[EMAIL PROTECTED]> wrote:
> 
> Do you have a Connector configured for port 8009 in
> server.xml?
> 
> John
> 
> 
> > -Original Message-
> > From: Mete Kural [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 19, 2003 11:35 AM
> > To: Tomcat Users List
> > Subject: RE: JK2 2.0.1 and Apache 2.0.44 problem
> > 
> > 
> > Thanks for the feedback. Hmm.. for some reason it
> > doesn't tell you to add the lines that you gave me
> in
> > the workers2.properties file in the JK2
> documentation.
> > But anyways, I added these lines to
> > workers2.properties:
> > 
> > [shm]
> > file=$/usr/apache/logs/shm.file
> > size=1048576
> > 
> > Now I don't get the "shm.init(): No file" errors
> any
> > more. But the Apache-Tomcat connection still
> doesn't
> > happen. Even after adding those lines to
> > workers2.properties, I still get these errors:
> > 
> > 
> > [Wed Feb 19 08:30:59 2003] [notice] Apache/2.0.44
> > (Unix) mod_jk2/2.0.0 configured -- resuming normal
> > operations
> > [Wed Feb 19 08:31:06 2003] [error]
> > channelSocket.open() connect failed localhost:8009
> 111
> > Connection refused
> > [Wed Feb 19 08:31:06 2003] [error] ajp13.connect()
> > failed ajp13:localhost:8009
> > [Wed Feb 19 08:31:06 2003] [error] ajp13.service()
> > failed to connect endpoint errno=111 Connection
> > refused
> > [Wed Feb 19 08:31:06 2003] [error] ajp13.service()
> > Error  forwarding ajp13:localhost:8009 1 1
> > [Wed Feb 19 08:31:06 2003] [error] lb.service()
> worker
> > failed ajp13:localhost:8009
> > [Wed Feb 19 08:31:06 2003] [error]
> > channelSocket.open() connect failed localhost:8009
> 111
> > Connection refused
> > [Wed Feb 19 08:31:06 2003] [error] ajp13.connect()
> > failed ajp13:localhost:8009
> > [Wed Feb 19 08:31:06 2003] [error] ajp13.service()
> > failed to connect endpoint errno=111 Connection
> > refused
> > [Wed Feb 19 08:31:06 2003] [error] ajp13.service()
> > Error  forwarding ajp13:localhost:8009 1 1
> > [Wed Feb 19 08:31:06 2003] [error] lb.service()
> worker
> > failed ajp13:localhost:8009
> > [Wed Feb 19 08:31:06 2003] [error]
> lb_worker.service()
> > all workers in error or disabled state
> > [Wed Feb 19 08:31:06 2003] [error]
> mod_jk.handler()
> > Error connecting to tomcat 12
> > 
> > Do you have any idea?
> > 
> > Thanks,
> > Mete
> > 
> > --- "Turner, John" <[EMAIL PROTECTED]> wrote:
> > > 
> > > I'm pretty sure you need a shared memory block
> in
> > > your workers2.properties
> > > file.
> > > 
> > > I don't use JK2, but I think it should look
> > > something like this:
> > > 
> > > [shm]
> > > file=${serverRoot}/logs/shm.file
> > > size=1048576
> > > 
> > > John
> > > 
> > > > -Original Message-
> > > > From: Mete Kural [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, February 18, 2003 7:56 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: JK2 2.0.1 and Apache 2.0.44 problem
> > > > 
> > > > 
> > > > Hello guys,
> > > > 
> > > > I'm having trouble connecting Apache and
> Tomcat
> > > with
> > > > JK2 v2.0.1. I am using Apache 2.0.44 and
> Tomcat
> > > 4.1.12
> > > > which is bundled inside of the JBoss 3.0.4
> > > > distribution. I'm on a Red Hat Linux 8.0. I
> set up
> > > the
> > > > configuration as the minimum recommended on
> the
> > > jk2
> > > > documentation website.
> > > > 
> > > > The only line I added to httpd.conf is:
> > > > LoadModule jk2_module modules/mod_jk2.so
> > > > 
> > > > My workers2.properties file looks like this:
> > > > 
> > > > # Define the communication channel
> > > > [channel.socket:localhost:8009]
> > > > info=Ajp13 forwarding over socket
> > > > tomcatId=localhost:8009
> > > > # Map the Tomcat examples webapp to the Web
> server
> > > uri
> > > > space
> > > > [uri:/examples/*]
> > > > info=Map the whole webapp
> > > > 
> > > > And I left jk2.properties as it came with
> Tomcat
> > > > 4.1.12, i.e. all the lines inside it are
> commented
> > > > out.
> > > > 
> > > > When I try to access localhost/examples, I get
> > > this
> > > > page:
> > > > <<<
> > > > Internal Server Error
> > > > The server encount

RE: SessionId across webapps in tomcat

2003-02-19 Thread Paul French
Not sure how tomcat implements its session management using cookies. It
would make sense to keep web apps separate (i.e have their own session
cookie).

If you create your own cookie have you tried explicitly setting the path of
the cookie to '/'. Perhaps tomcat defaults the path of a cookie to the root
of the web application (I'm guessing here!!). It should then be visible to
all webapps on the same domain.

-Original Message-
From: Robin de Villiers [mailto:[EMAIL PROTECTED]] 
Sent: 19 February 2003 18:35
To: Tomcat Users List
Subject: Re: SessionId across webapps in tomcat

I'm trying to use the JSESSIONID cookie to synchronize the data across
sessions.

I tried to use a different cookie but all cookies are dropped when you
change from one webapp to another. (That is the Cookie header isn't included
in the request).  The webapps are running on the same machine, no
clustering.  The domain is the same.

Cheers

Robin


- Original Message -
From: "Sean Dockery" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 12:36 PM
Subject: Re: SessionId across webapps in tomcat


> Hello, Robin.
>
> What do you mean when you say that your cookie didn't make it across the
> divide?  Could you not access your cookie in the other web application?
How
> are you trying to synchronize the sessions between the web applications?
> Are the web applications running in the same domain?  Are the web
> applications running on the same machine in a non-clustered environment?
>
>
> --
> Sean Dockery
> [EMAIL PROTECTED]
> Certified Java Web Component Developer
> Certified Delphi Programmer
> SBD Consultants
> http://www.sbdconsultants.com
>
> "Robin de Villiers" <[EMAIL PROTECTED]> wrote in message
> 006701c2d79c$b9ba9cc0$dabe24c4@malbec">news:006701c2d79c$b9ba9cc0$dabe24c4@malbec...
> Hi
>
> I have a problem with sessions not being carried across multiple webapps.
I
> realise that the specification prevents this.  However I have come across
> some hacks for this rule.
> 1. Have a static hashtable in the tomcat classloader space used by
> individual webapps.  This works but I have the problem that the JSessionId
> isn't carried across webapplications.  So although I can move a value
across
> the gap, I cannot safely tie a value to a session in order to retrieve the
> correct value.
> 2. Implement the crossContext mechanism used in tomcat. Unfortunately I
> don't think this is 'session safe'.  Please correct me if I am wrong.  (So
> back to no 1s problem)
> 3. I've tried adding my own cookie, but my cookie didn't make it across
the
> 'divide' either.
> 4. carry the value across in the query string.  I can't do this because it
> means modifying every link on every application and is a security risk.
>
>
>
> I'm thinking of creating a Valve for use with tomcat but I can't afford
the
> developement time for this.
>
> What I want to do is create an object and place it in the session that
> contains user information, group information, skin support, language
support
> and permissions.
>
> The SingleSignOn doesn't seem to cater for this set of data.  The valve
must
> filter based on the permissions in this object.  And the object must be in
> the session
> for web pages to access in order to present only-allowed links.  I'm using
> ldap to store all of this information.  Finally I'm not interested in
> specifying security constraints in the web.xml file because I want to
> specify this stuff in LDAP related to a user's role.
>
> The reason I want this in LDAP is for maintainance purposes.
>
>
> So please send me any comments either on preserving a session id accross
> webapps, or on the applicability of using a Valve or ease or difficulty of
> developing one for use in this context.
>
>
> I would appreciate any help.
>
> Robin
>
> PS I've tried resin, but have had similar results.
>
>
>
>
>
>
>
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

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




RE: Using Tomcat as a service in Windows 2000

2003-02-18 Thread Paul Bothma
Hi,

Here is some docs on using IIS and Tomcat.

http://paul.xtracker.co.za/iis.zip

Paul

-Original Message-
From: AllStarRewards, Inc. Tech Support
[mailto:[EMAIL PROTECTED]]
Sent: 18 February 2003 10:26
To: [EMAIL PROTECTED]
Subject: Using Tomcat as a service in Windows 2000


Hello,

I'm trying to run Tomcat as a service on Windows 2000 Server and 
am having a few difficulties.  I have the wrapper.properties setup 
and working properly and the jk_nt_service file installed as a 
service, but the service will not run.

My configuration is as follows:
Server running Windows 2000 Server and Tomcat 4.1.12

Any help would be appreciated.

Thanks.

Michael
---
AllStarRewards, Inc.
Michael D Downing - CTO
3900 Crosby Dr,  Suite 2204 Telephone: 859-272-9393
Lexington, KY 40515   Toll Free: 877-834-2003
Fax: 859-273-3662 Email: [EMAIL PROTECTED]


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


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




RE: Tomcat querry

2003-02-18 Thread Paul Bothma
Hi,

Look in the file /conf/tomcat-users.xml. If you want to use the Tomcat
Administration or Manager tools, you will need something like this:



  
  
  
  
  
  
  
  


You can also look at: http://localhost:8080/tomcat-docs/realm-howto.html,
for other methods of adding users, i.e. JDBC.

Regards,

Paul.

-Original Message-
From: Jayanshu Gandhi [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2003 07:36
To: [EMAIL PROTECTED]
Subject: Tomcat querry


Dear Sir,
I have installed tomcat-4.1.18 on red hat linux-8.0
My problem is how to set password and username for
administrator and manager and also for other users and
group. Kindly show me steps.

Thanking you,
Jayanshu Gandhi

__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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


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




RE: Error while running JSP's on tomcat 3.2.4

2003-02-18 Thread Paul Bothma
Hi,

Which version of Java do you have. I see that there is no direct reference
to any format function in JspCalendar.java.

>From the stack trace, it appears that the error occurs somewhere in
org.apache.jasper.Constant.getString(). The problem might be that you have
some setting in your server.xml or web.xml file that is not well formed or
something.

The Jasper API has the following information for the getString() functions:

Format the string that is looked up using "key" using "args".

..and..

Get hold of a "message" or any string from our resources database

I've got no idea though were it is trying to get a message from in the
resource database. My guess would be with some Locale specific string. Try
setting your Locale to en_UK or en_US and see what happens.

The java.text.Format.format I guess comes from the java.text.DateFormat
class, which uses the Locale information supplied by the call to
org.apache.jasper.Constants.getString().

Hope some of this help.

Paul


-Original Message-
From: Gupta, Ashish (CORP, Consultant)
[mailto:[EMAIL PROTECTED]]
Sent: 17 February 2003 19:59
To: Tomcat Users List
Subject: RE: Error while running JSP's on tomcat 3.2.4


Hi Paul,
The Code is as follows :-




<%@ page session="false"%>






Day of month: is  
Year: is  
Month: is  
Time: is  
Date: is  
Day: is  
Day Of Year: is  
Week Of Year: is  
era: is  
DST Offset: is  
    Zone Offset: is  







-Original Message-
From: Paul Bothma [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 17, 2003 12:50 PM
To: Tomcat Users List
Subject: RE: Error while running JSP's on tomcat 3.2.4


Hi,

Could you please post the JSP file.

The problem appears to be with a MessageFormat.format() call in your code
somewhere.

Paul

-Original Message-
From: Gupta, Ashish (CORP, Consultant)
[mailto:[EMAIL PROTECTED]]
Sent: 17 February 2003 15:24
To: [EMAIL PROTECTED]
Subject: Error while running JSP's on tomcat 3.2.4


Hello All,
   I have an installation of Tomcat 3.2.4 on a windows 2000 professional
box. The server parses the HTML pages fine, however on parsing the JSP pages
i get the following error:

Error: 500
Location: /examples/jsp/dates/date.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:630)
at org.apache.jasper.servlet.JasperLoader.loadJSP(JasperLoader.java:332)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:258)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80
6)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:474)
Root cause:
java.lang.IllegalArgumentException: Unknown argument
at java.text.MessageFormat.format(MessageFormat.java:643)
at java.text.MessageFormat.format(MessageFormat.java:449)
at java.text.Format.format(Format.java:128)
at org.apache.jasper.Constants.getString(Constants.java:211)
at org.apache.jasper.Constants.message(Constants.java:247)
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:677)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:116)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader.loadJSP(JasperLoader.java:332)
at org.apache.jasper.servlet.JspServlet.loadJSP

JAR problems with Tomcat 4.1.12 on Redhat 7.1

2003-02-17 Thread Paul Bothma
Hi,

This is a two part question, although I think the problems are related. I'm
using Tomcat 4.1.12 on Redhat 7.1 and JDK 1.4.1 RPM. Tomcat starts up fine
except for the following errors:

The /admin context doesn't want to load due to the following error:

2003-02-18 09:00:34 WebappLoader[/admin]: Deploying class repositories to
work directory /usr/jakarta-tomcat-4.1.12/work/Standalone/localhost/admin
2003-02-18 09:00:34 WebappLoader[/admin]: Deploy class files
/WEB-INF/classes to
/usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/classes
2003-02-18 09:00:34 WebappLoader[/admin]: Deploy JAR /WEB-INF/lib/struts.jar
to
/usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/lib/strut
s.jar
2003-02-18 09:00:34 ContextConfig[/admin] Exception processing JAR at
resource path /WEB-INF/lib/struts.jar
javax.servlet.ServletException: Exception processing JAR at resource path
/WEB-INF/lib/struts.jar
..

- Root Cause -
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1313)
at java.io.File.createTempFile(File.java:1401)
at java.io.File.createTempFile(File.java:1438)
at sun.net.www.protocol.jar.URLJarFile$1.run(URLJarFile.java:169)

The struts.jar file is located in /server/webapps/admin/WEB-INF/lib, not
sure if the part: /WEB-INF/lib/struts.jar to
/usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/lib/strut
s.jar, is correct though. I didn't make any changes to /conf/server.xml and
the directory structure has not been altered either, so I can't see why this
shouldn't work.

The rest of Tomcat works, for exaple the /manager context works fine, and
can be accessed via: http://localhost:8080/manager/.

The other problem is that when I try to compile some JAVA classes that I
wrote located in /HP/WEB-INF/classes using  the following command:
$JAVA_HOME/bin/javac -classpath $PATH_TO_LIB/servlets.jar
$PATH_TO_WEB-INF/classes/*.java, I get the following error: Permission
denied  (I'm running all of this as root). Then I did chmod a+x
servlets.jar, and then I get the following: Cannot execute a binary file.
The file location is correct, etc. I think there is something wrong with the
handling of JAR files, becuase I can't connection to a MySQL database using
org.gjt.mm.Driver either. Doesn't give a ClassNotFoundException through.

Anyway, if someone has any ideas, please help.

Attached are the log files for the admin context and localhost.

Thanks,

Paul

2003-02-18 09:00:34 WebappLoader[/admin]: Deploying class repositories to work 
directory /usr/jakarta-tomcat-4.1.12/work/Standalone/localhost/admin
2003-02-18 09:00:34 WebappLoader[/admin]: Deploy class files /WEB-INF/classes to 
/usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/classes
2003-02-18 09:00:34 WebappLoader[/admin]: Deploy JAR /WEB-INF/lib/struts.jar to 
/usr/jakarta-tomcat-4.1.12/webapps/../server/webapps/admin/WEB-INF/lib/struts.jar
2003-02-18 09:00:34 ContextConfig[/admin] Exception processing JAR at resource path 
/WEB-INF/lib/struts.jar
javax.servlet.ServletException: Exception processing JAR at resource path 
/WEB-INF/lib/struts.jar
at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)
at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3493)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at 
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:529)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java:1036)
at 
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:579)
at 
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java:646)
at 
org.apache.xerces.impl.dtd.XMLDTDValidator.ha

RE: Error while running JSP's on tomcat 3.2.4

2003-02-17 Thread Paul Bothma
Hi,

Could you please post the JSP file.

The problem appears to be with a MessageFormat.format() call in your code
somewhere.

Paul

-Original Message-
From: Gupta, Ashish (CORP, Consultant)
[mailto:[EMAIL PROTECTED]]
Sent: 17 February 2003 15:24
To: [EMAIL PROTECTED]
Subject: Error while running JSP's on tomcat 3.2.4


Hello All,
   I have an installation of Tomcat 3.2.4 on a windows 2000 professional
box. The server parses the HTML pages fine, however on parsing the JSP pages
i get the following error:

Error: 500
Location: /examples/jsp/dates/date.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for JSP
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:630)
at org.apache.jasper.servlet.JasperLoader.loadJSP(JasperLoader.java:332)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:258)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80
6)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:474)
Root cause:
java.lang.IllegalArgumentException: Unknown argument
at java.text.MessageFormat.format(MessageFormat.java:643)
at java.text.MessageFormat.format(MessageFormat.java:449)
at java.text.Format.format(Format.java:128)
at org.apache.jasper.Constants.getString(Constants.java:211)
at org.apache.jasper.Constants.message(Constants.java:247)
at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
ntListener.java:677)
at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
ener.java:116)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader.loadJSP(JasperLoader.java:332)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
rvlet.java:258)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80
6)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:474)

 I have been trying to figure out the cause of the problem but in vain.

Would appreciate any help or clues as to what the problem might be.

Thanks,
Ashish

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


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




<    4   5   6   7   8   9   10   11   12   13   >