Re: How does Tomcat manage Form-based authentication?

2004-04-02 Thread Malcolm Warren
Thank you for your answer. Sorry about the new thread for new topic 
business - I hadn't understood the thread mechanism.
I presume for this topic I'd better continue as we are and I'll get it 
right next time.

I was wondering exactly how the servlet container knows whether the user 
has already authenticated or not.
With BASIC authorization an Authorization header is sent and based on 
that the programmes know whether to re-present the sign in or not.

I'm using an old nuts and bolts programme that actually programmatically 
sent the Authorization header string for BASIC authorization, and I'd 
like to continue using this programme, but I have to tell the new FORM 
version that I've already signed in, and I don't know how.

On Thu, 1 Apr 2004 09:10:18 -0600, QM [EMAIL PROTECTED] wrote:

On Thu, Apr 01, 2004 at 04:38:49PM +0200, Malcolm Warren wrote:
: With BASIC authorization, which I used to use, the browser was sent an
: Authorization header.
:
: This doesn't happen with FORM-based authorization.
: I believe Tomcat deals with it all, but how? Anybody know?
Not sure I understand your question -- with FORM-based auth:
- the container detects an attempt to access a protected resource
- container sends requestor to designated form page, which posts
  to the blackbox j_security_check
- success = user is taken to originally-requested page
- failure = user is taken designated no-go page
Is that the answer to your question?

btw, please start new threads for new topics -- replying to an old
message plays hell with thread-aware mail readers, even if you change
the subject. ;)
-QM



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


Re: Of .war and .jar files - and .jsp class files

2004-04-02 Thread Malcolm Warren
That's not quite what I meant, but I shan't want to bother people any more 
with this question.
I can get along with what you told me in another email.

Thanks for you time.
Malcolm Warren
On Thu, 1 Apr 2004 09:06:51 -0600, QM [EMAIL PROTECTED] wrote:

: The automatically generated .class files in Tomcat are in the
: org.apache.jsp package, but the folders /org/apache/jsp aren't there in
: the file system, if you see what I mean. It would have been nice if the
: package logic had been followed through.
?
I'm not sure I follow.
I just checked my own jar of precompiled JSPs and saw the following:
org/apache/jsp/index_jsp.class
(etc, etc ...)
Perhaps I missed this in your original post: do you run Tomcat4 or 5?

My knowledge of (Tomcat) precomp is solely from the 5.x series.

-QM



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


RE: How does Tomcat manage Form-based authentication?

2004-04-02 Thread Ralph Einfeldt
That information is stored in the session.

So your programm has to include the session id 
that was created by tomcat in the requests (either
as cookie or as query parameter) 

 -Original Message-
 From: Malcolm Warren [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 02, 2004 10:12 AM
 To: Tomcat Users List
 Subject: Re: How does Tomcat manage Form-based authentication?
 
 I'm using an old nuts and bolts programme that actually 
 programmatically sent the Authorization header string 
 for BASIC  authorization, and I'd  like to continue using 
 this programme, but I have to tell the new FORM 
 version that I've already signed in, and I don't know how.
 
 


RE: mod_jk2 build error

2004-04-02 Thread Yiannis Mavroukakis
SImple :) don't follow the instructions. 
Do a ./configure --help to get the options you need (--with-apxs2 --with-jni
--with-pcre and related java/tomcat options) then do a straight make and
manually copy the binary to your web server's module location.

-Original Message-
From: Thomas D. Zeimet [mailto:[EMAIL PROTECTED]
Sent: 02 April 2004 05:42
To: [EMAIL PROTECTED]
Subject: mod_jk2 build error


Hi,

I am trying to build the latest release of the JK2 connector:
jakarta-tomcat-connectors-jk2-2.0.4-src. I'm running Red Hat Linux 9.0,
Apache
httpd-2.0.49 and Tomcat jakarta-tomcat-5.0.19.

I follow the directions in
jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/BUILD.txt

cd jakarta-tomcat-connectors/jk/native2
./configure --with-apxs2=/your/path/to/apxs
make
cd ../build/jk2/apache2
apxs -n jk2 -i mod_jk2.so

but the make fails with the following:

libtool: install: warning: remember to run `libtool --finish
/usr/local/apache2/modules'
/bin/cp ../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so
../../../build/jk2/apache2/mod_jk2.so
/bin/cp: cannot stat
`../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so': No such
file or directory
make[1]: *** [../../../build/jk2/apache2/mod_jk2.so] Error 1
make[1]: Leaving directory
`/usr2/download/jk/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/server
/apache2'
make: *** [jk2-build] Error 1

The ./configure step ends with the following:
checking for rm... /bin/rm
checking for grep... /bin/grep
checking for echo... /bin/echo
checking for sed... /bin/sed
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
no apxs given
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
building connector for apache-2.0
checking checking for apache13.. not provided
checking checking for apache20.. not provided
checking checking for iis.. not provided
checking checking for iPlanet.. not provided
checking for tomcat33 location... not provided
checking for tomcat40 location... not provided
checking for tomcat41 location... not provided
configure: creating ./config.status
config.status: creating Makefile
config.status: creating server/apache13/Makefile
config.status: creating server/apache13/Makefile.apxs
config.status: creating server/apache2/Makefile
config.status: creating server/apache2/Makefile.apxs
config.status: creating ../build.properties
config.status: creating scripts/build/unix/dummy
config.status: executing depfiles commands

I didn't have any problems with the previous JK2 version.  Can anyone give
me a
hint on how to resolve this?

Thanks much,
-Tom


__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.


Note:__
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and
all copies of it from your system, destroy any hard copies of it and
notify the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Jaguar Freight Services and any of its subsidiaries
each reserve the right to monitor all e-mail communications through its
networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state them to be the views of any such entity.

This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs.

JSP Include and URL encoding

2004-04-02 Thread Dennis Thrysøe
Hi,

I'm having problems including a JSP page from another JSP page using 
parameters with special characters.

I looked through the archives, but couldn't find anything about this issue.

I can encode a string, and the result is correct

  URLEncoder.encode(blåbærgrød, ISO-8859-1)

But if I make an include with the same value

  jsp:include page=bar.jsp flush=true
jsp:param name=word value=blåbærgrød /
  /jsp:include
The special characters are replaced with question marks '?' (%3F). So 
the query string seen from bar.jsp becomes

  word=bl%3Fb%3Frgr%3Fd

In fact the generated java code for the main jsp file contains this 
string also. So the problem is already during parsing or servlet generation.

The requests character encoding is null. The page directive's 
pageEncoding attribute is ISO-8859-1 (or not present - doesn't make a 
difference.

The user properties user.country and user.language are 'US' and 'en' 
respectively. Might that be the cause?

The problem is on Tomcat 4.1.29 on Linux.

By the way: I still haven't figured out whether Tomcat 4.1.30 is 
supposed to be able to run on JDK 1.3.1.

Any help appreciated,

-dennis

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


Re: How does Tomcat manage Form-based authentication?

2004-04-02 Thread Malcolm Warren
I've tried including the session id, but it creates a new one.

It's calling a url in another application in the same engine. Can't 
session info be shared across applications?
I've allowed single sign-on in server.xml.

I don't want to merge them into one application, because I may put one of 
them in another virtual machine.



On Fri, 2 Apr 2004 10:31:59 +0200, Ralph Einfeldt 
[EMAIL PROTECTED] wrote:

That information is stored in the session.

So your programm has to include the session id
that was created by tomcat in the requests (either
as cookie or as query parameter)
-Original Message-
From: Malcolm Warren [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:12 AM
To: Tomcat Users List
Subject: Re: How does Tomcat manage Form-based authentication?
I'm using an old nuts and bolts programme that actually
programmatically sent the Authorization header string
for BASIC  authorization, and I'd  like to continue using
this programme, but I have to tell the new FORM
version that I've already signed in, and I don't know how.



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


Re: JSP Include and URL encoding

2004-04-02 Thread Hiroshi Iwatani
(1)Set page directive attributes right
   (Maybe, pageEncoding = your platform encoding and charset = UTF-8)
(2)Use a Servlet/JSP container other than Tomcat. For example, Resin
from caucho.com.
quote
Scott Ferguson wrote:
 Actually, the underlying problem is a difficult one. Unfortunately, URLs
 don't have an official character encoding. It looks like we're drifting
 toward UTF-8 as a default, but that's not specified in the HTTP
 specifications.

 Because the HTTP request does not specify the URL encoding, the web
 server needs to guess. It's somewhat of an ugly problem.
Today's JSPs have page directive, its contentType and pageEncoding
attributes. A server doesn't need to bring rabbit out of a hat. Simply
put in other words, Tomcat behavior is just substandard negligence.
I have noticed that servlet generated from JSP by Resin has correct
setCharacterEncoding() call even when the original JSP doesn't have
the call. Resin may be called 'superstandard.' :)
 That somewhat translates into the Servlet/JSP forward/include issue.
 Resin's approach is to realize that the Java string for the
 URL/QueryString is 16-bits, so there's no need to do any encoding until
 there's a sendRedirect or something similar.

 -- Scott
/quote
Dennis Thrysøe wrote:
Hi,

I'm having problems including a JSP page from another JSP page using 
parameters with special characters.

I looked through the archives, but couldn't find anything about this issue.

I can encode a string, and the result is correct

  URLEncoder.encode(blåbærgrød, ISO-8859-1)

But if I make an include with the same value

  jsp:include page=bar.jsp flush=true
jsp:param name=word value=blåbærgrød /
  /jsp:include
The special characters are replaced with question marks '?' (%3F). So 
the query string seen from bar.jsp becomes

  word=bl%3Fb%3Frgr%3Fd

In fact the generated java code for the main jsp file contains this 
string also. So the problem is already during parsing or servlet 
generation.

The requests character encoding is null. The page directive's 
pageEncoding attribute is ISO-8859-1 (or not present - doesn't make a 
difference.

The user properties user.country and user.language are 'US' and 'en' 
respectively. Might that be the cause?

The problem is on Tomcat 4.1.29 on Linux.

By the way: I still haven't figured out whether Tomcat 4.1.30 is 
supposed to be able to run on JDK 1.3.1.

Any help appreciated,

-dennis

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Hiroshi Iwatani
*stop cruelty* Annual number of institutionally euthanized cats and dogs 
including kittens and puppies: US 5 million, JP 500 thousand. How about your 
country? *for our better karma*
-

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


Re: Connection Pool setup.

2004-04-02 Thread Kawthar Bt M Sulaiman

Hello, 

I'd like to know how to implement connection pooling in my
application.
This is what I had done so far.  Pls let me know what I need to change

to use the pooling mechanism.

1.  I created a singleton class: DatabaseOperations.
2.  It has an Connection instance: conn.
3.  During initialization, it gets connection as follows:
 DataSource ds  = (DataSource)
ctx.lookup(java:comp/env/jdbc/mySQLDatabase);
 conn = ds.getConnection();

4.  I have several public operations method (e.g selectOperations(...),
insertOperations(...)).
5.  Let's say I'd like to perform a select statement.  Inside my
selectOperations(...):
 Statement stmt = conn.createStatement();
 ResultSet rs = stmt.executeQuery(...);
 process the result

 In my finally block, I have:
 rslt.close();
 stmt.close();

Questions:
1.  Do I need to code any different to enable the connection pooling?

2.  When I called ds.getConnection(), does it opens up several
connections for pooling
 or just one connection?

3.  Do I need to close conn every time as well?  Since conn is an
instance, 
 how does it gets connection everytime an operation method is
called? (insert, select, update).

That's all I have for now.  Thanks,
--Kawthar



Confidential information may be contained in this e-mail and any files transmitted 
with it ('Message'). If you are not the addressee indicated in this Message (or 
responsible for delivery of this Message to such person), you are hereby notified that 
any dissemination, distribution, printing or copying of this Message or any part 
thereof is strictly prohibited. In such a case, you should delete this Message 
immediately and advise the sender by return e-mail. Opinions, conclusions and other 
information in this Message that do not relate to the official business of Maxis shall 
be understood as neither given nor endorsed by Maxis.

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



Re: Tomcat configuration

2004-04-02 Thread Harry Mantheakis
Hello

I think this:


form method=POST action=GetInput


Should read:


form method=POST action=/myapplication/GetInput


Also, consider packing your classes, so that this servlet registration:


servlet
servlet-nameGetInput/servlet-name
servlet-classGetInput/servlet-class
 /servlet


Becomes something like:


servlet
servlet-nameGetInput/servlet-name
servlet-classcom.foo.bar.GetInput/servlet-class
 /servlet


Packaging is not necessary to invoke a servlet, but it used to be necessary
if you used JavaBeans in JSPs. (Maybe JavaBeans in JSPs is old hat now, I'm
not sure.)


Finally, $TOMCAT_HOME is not used. Only $CATALINA_HOME is needed.


Good luck!


Harry
 


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



Re: Servlet on Tomcat + Oracle +ISU 8859-8 (Hebrew CharSet) - encodin g problem

2004-04-02 Thread Veniamin Fichin
Hi there.

   May be this bug report 
http://issues.apache.org/bugzilla/show_bug.cgi?id=23929 will enlighten 
you, me and others who have issues with i18n. Very professional 
explanation of the problem, thanks to Remy.

[EMAIL PROTECTED] wrote:

The problem:
I am using Oracle 8.1.7 DB , in a Charest ISU 8859-9-8 ( Hebrew ), I use a
thin client as the JDBC driver .
I have a servlet that all it does is getting and updating one of the table
cut/
I  use the doGet method of a servlet to get parameters to retrieve from
Oracle. this is done through the URL, for example :
I send the parameters like this :
http://localhost:8080/myapp/myapp?name=yair
http://localhost:8080/myapp/myapp?name=yairfamily=fine family=fine
for name= yair, family = fine
 
There is no problem in getting and inserting English characters.
There is a problem when i try to get or to insert Hebrew characters.
i get  in DB , for both if i write yair in the url in Hebrew , or i
write yair in %E9%E9%E9%F8 which is the decimal representation 
 
For example , if i insert a string in Hebrew , it looks like this ? (
in SQL +)
 
this is how i get the requests from the url
Enumeration paramEnum = request.getParameterNames(); // get request
parameters from the url , in param/value pairs
String myParam = (String) paramEnum.nextElement(); //get parameter
String myValue = request.getParameter(myParam);  //get value
 
String myStatment = insert into mytable values('19', '+myValue+') insert
to table 19 , myvalue
ResultSet rs = stmt.executeQuery(myStatment);
 
does any one have a solution for that ?


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


Re: JSP Include and URL encoding

2004-04-02 Thread Dennis Thrysøe
Hiroshi Iwatani wrote:
(1)Set page directive attributes right
   (Maybe, pageEncoding = your platform encoding and charset = UTF-8)
They are correct. The generated servlet already contains the wrong value 
'%3F'.

(2)Use a Servlet/JSP container other than Tomcat. For example, Resin
from caucho.com.
I guess that could be an option, but this Tomcat instance is running at 
our service provider, so they would have to think so too.

The problem has now been fixed by setting the language and country 
properties to 'da' and 'DK' respectively. This was apparently necesarry 
for the JSP parser to read the file correctly.

quote
Scott Ferguson wrote:
  Actually, the underlying problem is a difficult one. Unfortunately, URLs
  don't have an official character encoding. It looks like we're drifting
  toward UTF-8 as a default, but that's not specified in the HTTP
  specifications.
 
  Because the HTTP request does not specify the URL encoding, the web
  server needs to guess. It's somewhat of an ugly problem.
For JSP includes this doesn't seem to be the problem. It is because of 
characters being replaced with '?' when reading the JSP.

Thanks anyway,

-dennis

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


Re: JSP Include and URL encoding

2004-04-02 Thread Veniamin Fichin
Dennis Thrysøe wrote:

Hi,

I'm having problems including a JSP page from another JSP page using 
parameters with special characters.

I looked through the archives, but couldn't find anything about this issue.
   Try this URL: 
http://issues.apache.org/bugzilla/show_bug.cgi?id=23929 . Connector 
attributes mentioned there available since 5.0.19, as I understand.



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


Error compiling mod_jk on Red Hat 9

2004-04-02 Thread Ivan Venuti
Hi,

I'm trying to compile the AJP connectors from source in order to communicate
with Apache 2.0.40 installed in my Red Hat 9a. I've installed tomcat 4.1.29
and I've done:

$ unzip jakarta-tomcat-connectors-jk-1.2-src-current.zip
$ cd jakarta-tomcat-connectors-jk-1.2.5-src/jk/native
$ ./buildconf.sh
$ ./configure --with-apxs=/usr/sbin/apxs --enable-EAPI
$ make

This command doesn't terminate correctly. This is the error:

i386-redhat-linux-gcc: ../common/jk_ajp12_worker.lo: No such file or
directory
i386-redhat-linux-gcc: ../common/jk_connect.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_msg_buff.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_util.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_ajp13.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_pool.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_worker.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_ajp13_worker.lo: No such file or
directory
i386-redhat-linux-gcc: ../common/jk_lb_worker.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_sockbuf.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_map.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_uri_worker_map.lo: No such file or
directory
i386-redhat-linux-gcc: ../common/jk_ajp14.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_ajp14_worker.lo: No such file or
directory
i386-redhat-linux-gcc: ../common/jk_md5.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_ajp_common.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_context.lo: No such file or directory
make[1]: *** [mod_jk.la] Error 1
make[1]: Leaving directory
`/home/caribel/INSTALL.d/jakarta-tomcat-connectors-jk
-1.2.5-src/jk/native/apache-2.0'
make: *** [all-recursive] Error 1

anyone can help me?
Thanks in advance

-- Ivan Venuti



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



Accessing JNDI resource bound in tomcat

2004-04-02 Thread Chandu
Hi,

I have one resource made bound in tomcat. Lets assume that its name is mysqlds and the
resource type is javax.sql.DataSource. The connection pooling, jdbc driver classes and 
other
supporting classes are all deployed tomcat. Now I have a test case which uses the 
mysqlds
resource to create connections.

Now I want to lookup that resource from testcase. The test case shall be executed in a 
different
process i.e., its a standalone junit execution. The tomcat server is located somewhere 
else in the
network. If my test case looks up the resource using the javax.naming.InitialContext 
it is reporting
error to set the inital context factory class.

Tomcat is running in a JVM at some other place, and my testcase is running at another 
place in the
same network in a different JVM. 

How do I access the resource bound in tomcat from the testcase?

- Chandu.

Re: JSP Include and URL encoding

2004-04-02 Thread Dennis Thrysøe
Veniamin Fichin wrote:
Dennis Thrysøe wrote:

Hi,

I'm having problems including a JSP page from another JSP page using 
parameters with special characters.

I looked through the archives, but couldn't find anything about this 
issue.
   Try this URL: http://issues.apache.org/bugzilla/show_bug.cgi?id=23929 
. Connector attributes mentioned there available since 5.0.19, as I 
understand.
Thanks, that may be related. Perhaps it could override the VM's language 
properties. But we fixed it by changing those properties instead.

Besides the problem was on 4.1.29.

-dennis

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


Re: JSP Include and URL encoding

2004-04-02 Thread Hiroshi Iwatani
Dennis Thrysøe wrote:
Hiroshi Iwatani wrote:

(1)Set page directive attributes right
   (Maybe, pageEncoding = your platform encoding and charset = UTF-8)


They are correct. The generated servlet already contains the wrong value 
'%3F'.

(2)Use a Servlet/JSP container other than Tomcat. For example, Resin
from caucho.com.
Oh no! (1)+ (2) is a SET. Not separate issues. Tomcat JSP translator doesn't
use these page directive entries. So I called it substandard negligence.
Anyway, thanks for an enjoyable reply!

BTW, bugzilla 23929 OP is wrong.



I guess that could be an option, but this Tomcat instance is running at 
our service provider, so they would have to think so too.

The problem has now been fixed by setting the language and country 
properties to 'da' and 'DK' respectively. This was apparently necesarry 
for the JSP parser to read the file correctly.

quote
Scott Ferguson wrote:
  Actually, the underlying problem is a difficult one. Unfortunately, 
URLs
  don't have an official character encoding. It looks like we're 
drifting
  toward UTF-8 as a default, but that's not specified in the HTTP
  specifications.
 
  Because the HTTP request does not specify the URL encoding, the web
  server needs to guess. It's somewhat of an ugly problem.


For JSP includes this doesn't seem to be the problem. It is because of 
characters being replaced with '?' when reading the JSP.

Thanks anyway,

-dennis

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

--
Hiroshi Iwatani
*stop cruelty* Annual number of institutionally euthanized cats and dogs 
including kittens and puppies: US 5 million, JP 500 thousand. How about your 
country? *for our better karma*
-

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


RE: Connection Pool setup.

2004-04-02 Thread Kal Govindu
Hi,

Hello, 

I'd like to know how to implement connection pooling in my
application.
This is what I had done so far.  Pls let me know what I need to change

to use the pooling mechanism.

1.  I created a singleton class: DatabaseOperations.
2.  It has an Connection instance: conn.
3.  During initialization, it gets connection as follows:
 DataSource ds  = (DataSource)
ctx.lookup(java:comp/env/jdbc/mySQLDatabase);
 conn = ds.getConnection();

4.  I have several public operations method (e.g selectOperations(...),
insertOperations(...)).
5.  Let's say I'd like to perform a select statement.  Inside my
selectOperations(...):
 Statement stmt = conn.createStatement();
 ResultSet rs = stmt.executeQuery(...);
 process the result

 In my finally block, I have:
 rslt.close();
 stmt.close();

Questions:
1.  Do I need to code any different to enable the connection pooling?
NO

2.  When I called ds.getConnection(), does it opens up several
connections for pooling
 or just one connection?
Depends on how you have it configured. maxActive and maxIdle settings for the 
resource.

3.  Do I need to close conn every time as well?  Since conn is an
instance, 
 how does it gets connection everytime an operation method is
called? (insert, select, update).

Yes, you have to close the connection each time, which returns the connection 
to the pool for
other processes to use. 

I have the following methods in my generic DataBase Operations class.
static public Connection getConnection() throws SQLException {
Connection conn = null;
try{
conn = ds.getConnection();
}
catch (Exception e) {
e.printStackTrace();
}
return conn;
}

static public void releaseConnection(Connection con){
try{
if (con != null)
con.close();
}
catch (Exception e) {
e.printStackTrace();
}
}

which get and close my connections for me. So, when I am in the selectOperations(..) I 
call the getConnetion()
to get a connection and in the finally block I call the releaseConnection() method.


Hope this helps.
Kal.


CONFIDENTIALITY NOTE:  All e-mail sent to or from this address will be received by the 
Waterfield Group corporate e-mail system and is subject to archival, monitoring, 
and/or review by someone other than the recipient or the sender.

This e-mail and any of its attachments may contain proprietary information, which is 
privileged and confidential.  This e-mail is intended solely for the use of the 
individual or entity to which it is addressed.  If you are not the intended recipient 
of this e-mail, you are hereby notified that any dissemination, distribution, copying, 
or action taken in relation to the contents of and attachments to this e-mail is 
strictly prohibited and may be unlawful.  If you have received this e-mail in error, 
please notify the sender immediately and permanently delete the original and any copy 
of this e-mail and any printout.  Thank you.


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



RE: Connection Pool setup.

2004-04-02 Thread Paul Mansfield
On Fri, 2004-04-02 at 13:47, Kal Govindu wrote:
 I'd like to know how to implement connection pooling in my
 application.
 This is what I had done so far.  Pls let me know what I need to change


you don't have to write any database pooling functions, it comes built
in!

http://jakarta.apache.org//tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

basically, add some stuff to the server.xml file (and restart)

then in your app (note paranoid cleaning up of database handles!):
Connection con = null;
Statement stmt = null;
ResultSet rst = null;
try
{
Context ctx = new InitialContext();
if(ctx == null )
{
System.err.println(No Context\n);
}
else
{
DataSource ds =
(DataSource)ctx.lookup(java:comp/env/jdbc/MySQLDB);
if (ds != null)
{
con = ds.getConnection();
stmt = con.createStatement();
String sql = select ;
rst = stmt.executeQuery(sqlStmt.toString());
while rst.next()
{
blah blah
}
   rst.close(); rst = null;
   stmt.close(); stmt = null;
}
}
}
catch (java.sql.SQLException sqle)
{
if (rst != null)
try { rst.close(); rst = null; } catch (SQLException
sqle3) { }
if (stmt != null)
try { stmt.close(); stmt = null;} catch (SQLException
sqle2) { }
}


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



Re: Tomcat Site slow and stops responding after certain number of threads

2004-04-02 Thread s prasad
We have 4 gigs of memory on the box, although the entire machine peaks at 
around 2 Gigs we have other sites on the same server running same code that 
are perfectly alright. But, when the thread count on a site increases beyond 
the magic number of 107, its slow responding and then a little later it 
stops responding.

Prasad

From: Peter Lin [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Tomcat Site slow and stops responding after certain number of 
threads
Date: Thu, 1 Apr 2004 20:37:30 -0800 (PST)

windows by default allocates 1mb of memory per thread.
107 threads shouldn't cause any problems, unless your
system only has 128mb of ram. From first hand
experience, once the allocated memory reach half the
physical ram, windows starts to disk cache. Once that
happens, GC performance gets worse. In fact in .NET
1.0, disk caching causes heap fragmentation and memory
leaks. If disk cache is kicking in, the performance
issues may be the result of heap fragmentation, which
kills GC performance.
peter lin

--- sp k [EMAIL PROTECTED] wrote:
 We have a Tomcat site which becomes terribly slow
 and then stops responding
 after the thread count in windows task manager
 reaches 107 threads. We are
 using Tomcat 4.1.27 on windows 2000 machine.  Our
 load tests could never
 emulate this behavior that occurs under real load.
 When the site crashes the
 memory consumption of the site is less than the
 initial max heap size set
 for it.

 Did any one ever face similar issues, we are baffled
 as to why 107 threads?
 Is related to the connector threads or JVM's garbage
 collection?

 Does anyone have any idea why the site would crash
 at the same thread level?

 Thanks,
 Prasad


_
 Get rid of annoying pop-up ads with the new MSN
 Toolbar – FREE!
 http://toolbar.msn.com/go/onm00200414ave/direct/01/



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

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Get rid of annoying pop-up ads with the new MSN Toolbar – FREE! 
http://toolbar.msn.com/go/onm00200414ave/direct/01/

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


302 response when accessing web app context path

2004-04-02 Thread Jan Peter Hecking
Hi,

after switching from WebLogic 6.1 to Tomcat 5.0.19 as our web app 
container we're running into a problem with a slight difference in how 
these two containers handle HTTP request to the context path of our web 
app. We have a web app with a context path /external and on WebLogic 
GET requests to this URL will get mapped to the default servlet. Tomcat 
however sends a 302 (Moved temporarily) responds an redirects the 
request to the URL /external/ (note the extra slash at the end). 
Unfortunately in our case the URL /external is configured in another 
server outside our direct control and this server does also not follow 
HTTP redirects. So this small difference causes requests from the 
external server to our web app to fail.

I tried using different URL mappings for the default servlet in our web 
app but neither /, /*, nor * changed Tomcats behaviour. Is there 
some way to control Tomcats behaviour to map all requests to the context 
path of the web app directly to the default servlet?

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


RE: Accessing JNDI resource bound in tomcat

2004-04-02 Thread Shapira, Yoav

Hi,
In general, read the FAQ:
http://jakarta.apache.org/tomcat/faq/misc.html#externalJndi

And to your specific case, consider Cactus
(http://jakarta.apache.org/cactus/).

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Chandu [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 6:30 AM
To: Tomcat Users List
Subject: Accessing JNDI resource bound in tomcat

Hi,

I have one resource made bound in tomcat. Lets assume that its name is
mysqlds and the
resource type is javax.sql.DataSource. The connection pooling, jdbc
driver
classes and other
supporting classes are all deployed tomcat. Now I have a test case
which
uses the mysqlds
resource to create connections.

Now I want to lookup that resource from testcase. The test case shall
be
executed in a different
process i.e., its a standalone junit execution. The tomcat server is
located somewhere else in the
network. If my test case looks up the resource using the
javax.naming.InitialContext it is reporting
error to set the inital context factory class.

Tomcat is running in a JVM at some other place, and my testcase is
running
at another place in the
same network in a different JVM.

How do I access the resource bound in tomcat from the testcase?

- Chandu.



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]



RE: Tomcat configuration

2004-04-02 Thread Shapira, Yoav

Hi,
What are your files under ROOT instead of just under webapps?

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Taj [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 2:26 AM
To: 'Tomcat Users List'
Subject: Tomcat configuration

Hi



Iam having problem in setting my application running in Tomcat 4.1

The applications directory is situated at
/Tomcat4.1/webapps/ROOT/myapplication

This is the only place that my pages are visible to the server.

My class files are situated at
/Tomcat4.1/webapps/ROOT/myapplication/WEB-INF/classes/



The html pages in the directory /Tomcat4.1/webapps/ROOT/myapplication/
are
visible to the server but my class files

are not. I have tried everthing. The web.xml file is kept in the
directory
/Tomcat4.1/webapps/ROOT/myapplication/WEB-INF/

and the web.xml file goes like:



web-app



   servlet

servlet-nameGetInput/servlet-name

servlet-classGetInput/servlet-class

   /servlet



   servlet-mapping

servlet-nameGetInput/servlet-name

url-pattern/GetInput/url-pattern

   /servlet-mapping



/web-app



Where the GetInput in the servlet-name.



The HTML page that calls the servlet has the following syntax for the
POST
command:



form method=POST action=GetInput



I have also added to the environment variables of my OS, the following:



CATALINA_HOME=E:\Program Files\Apache Group\Tomcat 4.1

TOMCAT_HOME=E:\Program Files\Apache Group\Tomcat 4.1

But to no difference



Even after all this I get the 404 error: the required source was not
found.

I would by very thankful to anyone who can find what I have missed and
help
me out.



Thanks


























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]



RE: Tomcat Site slow and stops responding after certain number of threads

2004-04-02 Thread STOCKHOLM, Raymond
Are you sure the JVM has enough memory ?

long totalMemory = Runtime.getRuntime().totalMemory();
long freeMemory = Runtime.getRuntime().freeMemory();
long maxMemory = Runtime.getRuntime().maxMemory();
log.info(totalMemory=+totalMemory);
log.info(freeMemory =+freeMemory);
log.info(maxMemory  =+maxMemory);


-Message d'origine-
De : s prasad [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 2 avril 2004 15:12
À : [EMAIL PROTECTED]
Objet : Re: Tomcat Site slow and stops responding after certain number
of threads


We have 4 gigs of memory on the box, although the entire machine peaks at 
around 2 Gigs we have other sites on the same server running same code that 
are perfectly alright. But, when the thread count on a site increases beyond 
the magic number of 107, its slow responding and then a little later it 
stops responding.

Prasad

From: Peter Lin [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: Tomcat Site slow and stops responding after certain number of 
threads
Date: Thu, 1 Apr 2004 20:37:30 -0800 (PST)


windows by default allocates 1mb of memory per thread.
107 threads shouldn't cause any problems, unless your
system only has 128mb of ram. From first hand
experience, once the allocated memory reach half the
physical ram, windows starts to disk cache. Once that
happens, GC performance gets worse. In fact in .NET
1.0, disk caching causes heap fragmentation and memory
leaks. If disk cache is kicking in, the performance
issues may be the result of heap fragmentation, which
kills GC performance.

peter lin


--- sp k [EMAIL PROTECTED] wrote:
  We have a Tomcat site which becomes terribly slow
  and then stops responding
  after the thread count in windows task manager
  reaches 107 threads. We are
  using Tomcat 4.1.27 on windows 2000 machine.  Our
  load tests could never
  emulate this behavior that occurs under real load.
  When the site crashes the
  memory consumption of the site is less than the
  initial max heap size set
  for it.
 
  Did any one ever face similar issues, we are baffled
  as to why 107 threads?
  Is related to the connector threads or JVM's garbage
  collection?
 
  Does anyone have any idea why the site would crash
  at the same thread level?
 
  Thanks,
  Prasad
 
 
_
  Get rid of annoying pop-up ads with the new MSN
  Toolbar - FREE!
  http://toolbar.msn.com/go/onm00200414ave/direct/01/
 
 
 
-
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/

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


_
Get rid of annoying pop-up ads with the new MSN Toolbar - FREE! 
http://toolbar.msn.com/go/onm00200414ave/direct/01/


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


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



Tomcat 5 Clustering - Loadbalancing

2004-04-02 Thread armalai
Hi.,
   My environements are.,
Windows 2000
Tomcat 5.x + Apache 2.X + Mod_JK2

I have three tomcat instances and Apache server in a single machine..
Clusterring and load balancing is working fine.
But i'm getting this error in Apache error.log file.
1.Can you please check my Apache logs and worker properties file and give me your 
suggestion.
2.My main tomcat instance prints the nomal log information  with the symbol 
warning..why this is happeneing?
3.In tomcat I'm not able to set the docBase value for the context as a Absolute 
path.I'm using like ../webapps/appfolder.
  so i have to copy the appfolder to all instances.
  How do i access the appfolder from common place?

---Tomcat log
Apr 2, 2004 9:09:07 AM org.apache.jk.common.HandlerRequest decodeRequest
WARNING: Error registering request
--
-Apache log-
[Thu Apr 01 16:54:28 2004] [error] env.createBean2(): Error getting factory for 
[worker.list] (null)
[Thu Apr 01 16:54:28 2004] [error] config.update(): Can't create worker.list
[Thu Apr 01 16:54:28 2004] [notice] Parent: Created child process 2232
[Thu Apr 01 16:54:28 2004] [error] env.createBean2(): Error getting factory for 
[worker.list] (null)
[Thu Apr 01 16:54:28 2004] [error] config.update(): Can't create worker.list
[Thu Apr 01 16:54:28 2004] [notice] Child 2232: Child process is running
[Thu Apr 01 16:54:28 2004] [error] mod_jk child init 1 0
[Thu Apr 01 16:54:28 2004] [notice] Child 2232: Acquired the start mutex.
[Thu Apr 01 16:54:28 2004] [notice] Child 2232: Starting 250 worker threads.
[Thu Apr 01 17:07:32 2004] [error] ajp13.service() error sending, reconnect 
channel.socket:localhost:8019 -1 0 No error
[Thu Apr 01 17:07:33 2004] [error] ajp13.service() error sending, reconnect 
channel.socket:localhost:8019 -1 0 No error
[Thu Apr 01 17:10:45 2004] [error] ajp13.service() error sending, reconnect 
channel.socket:localhost:8019 -1 0 No error
[Thu Apr 01 17:10:46 2004] [error] ajp13.service() error sending, reconnect 
channel.socket:localhost:8009 -1 0 No error
[Thu Apr 01 17:10:46 2004] [error] ajp13.service() error sending, reconnect 
channel.socket:localhost:8009 -1 0 No error
[Thu Apr 01 17:10:59 2004] [error] ajp13.service() error sending, reconnect 
channel.socket:localhost:8019 -1 0 No error
--

--worker.properties--
# workers2.properties
# Define the TCP socket communication channel 
#ps=/
worker.list=tomcat,tomcatA,tomcatB loadbalancer
#worker.tomat.
[channel.socket:localhost:8009]
worker.tomcat.port=8009
worker.tomcat.host=localhost
worker.tomcat.lbfactor=2
#--
#worker.tomat.
[channel.socket:localhost:8019]
worker.tomcatA.port=8019
worker.tomcatA.host=localhost
worker.tomcatA.lbfactor=2
#--
#worker.tomat.
[channel.socket:localhost:8029]
worker.tomcatB.port=8029
worker.tomcatB.host=localhost
worker.tomcatB.lbfactor=2
#--
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat,tomcatA,tomcatB
# Map the Tomcat webapp to the Web server uri space
[uri:/*]
info=Map the entire examples webapp
debug=0
# Configure the shared memory file
[shm]
file=C:\$Java\3_AS\Apache2\logs\jk2.shm
size=1048576
debug=0


Tomcat5 and java.util.logging

2004-04-02 Thread Andreas Schildbach
Hello everyone,

has anyone managed to make Tomcat5 cooperate with java.util.logging (JDK 
1.4)?

1) How can I redirect all logging output by, for example, a 
Logger.global.log(hi there) in my application to the Servlet log (the 
resource that is defined with the Logger element in server.xml?

2) How can I specify the logging levels? (The verbosity attribute of 
the Logger element is not granular enough - I'd like to specify levels 
on a per-class basis).

Note that my web applications are not using commons-logging, they use 
java.util.logging directly.

Regards,

Andreas

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


Re: file uploading

2004-04-02 Thread k2ma
Hi Peter,

Thanks!

Just wondering what this background process you speak of would be... and how 
I would run it... would it be a piece of java code and if so, where would I 
place it within Tomcat for execution?

Thanks,
Kay

- Original Message - 
From: Peter Johnson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 12:08 AM
Subject: Re: file uploading


 Always the way, you think of something else just as you hit send.
 
 The other option would be to have a background process which checks the
 upload directory and then moves the files as appropriate.
 
 PJ
 
 On Fri, 2004-04-02 at 15:06, Peter Johnson wrote:
  Kay,
  
  I would have thought that you could use commons-fileupload to do this
  with a little form preprocessing to determine location.
  
  PJ
  
  On Fri, 2004-04-02 at 14:49, Kayley Ma wrote:
   Hi,
   
   Is it possible to copy/move uploaded files in Tomcat5 to different
   directories on the machine outside of the Tomcat folder?  ie rather than a
   static transfer of uploaded file from tomcat to another directory, 
copy/move
   file to its proper subdirectory depending on the uploaded file names/type?
   Where would I place this code or is there an xml file that I would need to
   configure/modify?
   
   Thanks!
   Kay
   
   



This mail sent through www.mywaterloo.ca

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



Re: mod_jk2 build error

2004-04-02 Thread Walter Truitt
I would try making the directory for it possibly.

I don't know why it does this, but it puts a usr/local/apache2/modules
directory under the build directory.

/bin/cp ../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so
./../../build/jk2/apache2/mod_jk2.so
/bin/cp: cannot stat
`../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so': No such
file or directory

Since it is the copy that is failing, I would look at that.  

 -walter

 Hi,
 
 I am trying to build the latest release of the JK2 connector:
 jakarta-tomcat-connectors-jk2-2.0.4-src. I'm running Red Hat Linux 9.0, Apache
 httpd-2.0.49 and Tomcat jakarta-tomcat-5.0.19.
 
 I follow the directions in
 jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/BUILD.txt
 
 cd jakarta-tomcat-connectors/jk/native2
 ./configure --with-apxs2=/your/path/to/apxs
 make
 cd ../build/jk2/apache2
 apxs -n jk2 -i mod_jk2.so
 
 but the make fails with the following:
 
 libtool: install: warning: remember to run `libtool --finish
 /usr/local/apache2/modules'
 /bin/cp ../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so
 ./../../build/jk2/apache2/mod_jk2.so
 /bin/cp: cannot stat
 `../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so': No such
 file or directory
 make[1]: *** [../../../build/jk2/apache2/mod_jk2.so] Error 1
 make[1]: Leaving directory
 `/usr2/download/jk/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/server/apache2'
 make: *** [jk2-build] Error 1
 
 The ./configure step ends with the following:
 checking for rm... /bin/rm
 checking for grep... /bin/grep
 checking for echo... /bin/echo
 checking for sed... /bin/sed
 checking for cp... /bin/cp
 checking for mkdir... /bin/mkdir
 no apxs given
 need to check for Perl first, apxs depends on it...
 checking for perl... /usr/bin/perl
 building connector for apache-2.0
 checking checking for apache13.. not provided
 checking checking for apache20.. not provided
 checking checking for iis.. not provided
 checking checking for iPlanet.. not provided
 checking for tomcat33 location... not provided
 checking for tomcat40 location... not provided
 checking for tomcat41 location... not provided
 configure: creating ./config.status
 config.status: creating Makefile
 config.status: creating server/apache13/Makefile
 config.status: creating server/apache13/Makefile.apxs
 config.status: creating server/apache2/Makefile
 config.status: creating server/apache2/Makefile.apxs
 config.status: creating ../build.properties
 config.status: creating scripts/build/unix/dummy
 config.status: executing depfiles commands
 
 I didn't have any problems with the previous JK2 version.  Can anyone give me a
 hint on how to resolve this?
 
 Thanks much,
 -Tom
 
 
 __
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway 
 http://promotions.yahoo.com/design_giveaway/

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



RE: file uploading

2004-04-02 Thread Shapira, Yoav

Hi,

Just wondering what this background process you speak of would be...
and
how
I would run it... would it be a piece of java code and if so, where
would I
place it within Tomcat for execution?

Not necessarily within tomcat: you can write a simple java class and
execute it as a cron job.

Yoav Shapira



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]



Re: file uploading

2004-04-02 Thread k2ma
What's a cron job?? How do I create/execute one?

thanks!
~Kayley~

 
- Original Message - 
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:01 AM
Subject: RE: file uploading


 
 Hi,
 
 Just wondering what this background process you speak of would be...
 and
 how
 I would run it... would it be a piece of java code and if so, where
 would I
 place it within Tomcat for execution?
 
 Not necessarily within tomcat: you can write a simple java class and
 execute it as a cron job.
 
 Yoav Shapira
 
 
 
 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]
 


This mail sent through www.mywaterloo.ca

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



configuring hosts in server.xml

2004-04-02 Thread Nadia Kunkov
HI,
I'd like to run two websites ( one straight HTML the other JSP and servlets ) on one 
Linux server that is running Tomcat 5.  I don't have apache to use it's virtual hosts. 
On my DNS server I set up two domain names corresponding to the same IP address. 
Tomcat documentation says I need to configure server.xml to have multiple hosts with 
their own sets of webapps.  As I understand each host will have it's own appbase 
different from one another.  Now I need to setup a default html or jsp page.  Under 
webapps/ROOT there is index.jsp.  Am I right thinking that for my new hosts under 
/newwebapps/ROOT I need to set up either index.jsp or index.html to be redirected to 
my websites?  How does tomcat picks up a default page? Also, do I need to use Host 
Name aliase?  

Thanks as always for your help

N.K.

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



RE: file uploading

2004-04-02 Thread Shapira, Yoav

Hi,
Dude, google ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:08 AM
To: Tomcat Users List
Subject: Re: file uploading

What's a cron job?? How do I create/execute one?

thanks!
~Kayley~


- Original Message -
From: Shapira, Yoav [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:01 AM
Subject: RE: file uploading



 Hi,

 Just wondering what this background process you speak of would
be...
 and
 how
 I would run it... would it be a piece of java code and if so, where
 would I
 place it within Tomcat for execution?

 Not necessarily within tomcat: you can write a simple java class and
 execute it as a cron job.

 Yoav Shapira



 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]



This mail sent through www.mywaterloo.ca

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



Re: file uploading

2004-04-02 Thread Parsons Technical Services
What's your environment?
OS version
Tomcat version
JVM version


- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:07 AM
Subject: Re: file uploading


 What's a cron job?? How do I create/execute one?

 thanks!
 ~Kayley~


 - Original Message - 
 From: Shapira, Yoav [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, April 02, 2004 10:01 AM
 Subject: RE: file uploading


 
  Hi,
 
  Just wondering what this background process you speak of would be...
  and
  how
  I would run it... would it be a piece of java code and if so, where
  would I
  place it within Tomcat for execution?
 
  Not necessarily within tomcat: you can write a simple java class and
  execute it as a cron job.
 
  Yoav Shapira
 
 
 
  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]
 

 
 This mail sent through www.mywaterloo.ca

 -
 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: file uploading

2004-04-02 Thread k2ma

Hi,

 What's your environment?
 OS version

Windows 2000

 Tomcat version

Tomcat 5

 JVM version

j2sdk1.4.2_03

Thanks!



 
 - Original Message - 
 From: [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Friday, April 02, 2004 10:07 AM
 Subject: Re: file uploading
 
 
  What's a cron job?? How do I create/execute one?
 
  thanks!
  ~Kayley~
 
 
  - Original Message - 
  From: Shapira, Yoav [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Friday, April 02, 2004 10:01 AM
  Subject: RE: file uploading
 
 
  
   Hi,
  
   Just wondering what this background process you speak of would be...
   and
   how
   I would run it... would it be a piece of java code and if so, where
   would I
   place it within Tomcat for execution?
  
   Not necessarily within tomcat: you can write a simple java class and
   execute it as a cron job.
  
   Yoav Shapira
  
  
  
   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.
  
  



This mail sent through www.mywaterloo.ca

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



RPM for Tomcat 4.1.30 ?

2004-04-02 Thread Philippe Couas
Hi,
 
Anyone know where i can found RPM for Tomcat 4.1.30 ?
 
Regards
Philippe
 
 


Re: file uploading

2004-04-02 Thread Parsons Technical Services
Hey Yoav, we got another one from that there windows place!!

But seriously, a few years ago I had no I idea what one was either. It is
akin to task scheduler in windows.

That's why it is asked to put the environment information in to start with.
It guides the list to suggest the appropriate information.

Now if you ask what Task Scheduler is, then go Google.

Doug

- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:21 AM
Subject: Re: file uploading



 Hi,

  What's your environment?
  OS version

 Windows 2000

  Tomcat version

 Tomcat 5

  JVM version

 j2sdk1.4.2_03

 Thanks!



 
  - Original Message - 
  From: [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Friday, April 02, 2004 10:07 AM
  Subject: Re: file uploading
 
 
   What's a cron job?? How do I create/execute one?
  
   thanks!
   ~Kayley~
  
  
   - Original Message - 
   From: Shapira, Yoav [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Friday, April 02, 2004 10:01 AM
   Subject: RE: file uploading
  
  
   
Hi,
   
Just wondering what this background process you speak of would
be...
and
how
I would run it... would it be a piece of java code and if so, where
would I
place it within Tomcat for execution?
   
Not necessarily within tomcat: you can write a simple java class and
execute it as a cron job.
   
Yoav Shapira
   
   
   
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.
   
   


 
 This mail sent through www.mywaterloo.ca

 -
 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: RPM for Tomcat 4.1.30 ?

2004-04-02 Thread Jeanfrancois Arcand


Philippe Couas wrote:

Hi,

Anyone know where i can found RPM for Tomcat 4.1.30 ?
 

jpackage has Tomcat 5 (I did look for Tomcat 4.x...maybe it's there)

http://www.jpackage.org/rpm.php?id=2571


-- Jeanfrancois

Regards
Philippe


 



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


Re: RPM for Tomcat 4.1.30 ?

2004-04-02 Thread Jeanfrancois Arcand


Jeanfrancois Arcand wrote:



Philippe Couas wrote:

Hi,

Anyone know where i can found RPM for Tomcat 4.1.30 ?

Here : http://www.jpackage.org/rpm.php?id=2570

:-)

-- Jeanfrancois

 

jpackage has Tomcat 5 (I did look for Tomcat 4.x...maybe it's there)

http://www.jpackage.org/rpm.php?id=2571


-- Jeanfrancois

Regards
Philippe


 



-
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: file uploading

2004-04-02 Thread Shapira, Yoav

Hi,
I suppose what I consider a basic level of technical competency is not
basic, or in general I set the bar too high...  But then again, I don't
particularly care ;)

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Parsons Technical Services
[mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:37 AM
To: Tomcat Users List
Subject: Re: file uploading

Hey Yoav, we got another one from that there windows place!!

But seriously, a few years ago I had no I idea what one was either. It
is
akin to task scheduler in windows.

That's why it is asked to put the environment information in to start
with.
It guides the list to suggest the appropriate information.

Now if you ask what Task Scheduler is, then go Google.

Doug

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:21 AM
Subject: Re: file uploading



 Hi,

  What's your environment?
  OS version

 Windows 2000

  Tomcat version

 Tomcat 5

  JVM version

 j2sdk1.4.2_03

 Thanks!



 
  - Original Message -
  From: [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Friday, April 02, 2004 10:07 AM
  Subject: Re: file uploading
 
 
   What's a cron job?? How do I create/execute one?
  
   thanks!
   ~Kayley~
  
  
   - Original Message -
   From: Shapira, Yoav [EMAIL PROTECTED]
   To: Tomcat Users List [EMAIL PROTECTED]
   Sent: Friday, April 02, 2004 10:01 AM
   Subject: RE: file uploading
  
  
   
Hi,
   
Just wondering what this background process you speak of
would
be...
and
how
I would run it... would it be a piece of java code and if so,
where
would I
place it within Tomcat for execution?
   
Not necessarily within tomcat: you can write a simple java
class
and
execute it as a cron job.
   
Yoav Shapira
   
   
   
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.
   
   


 
 This mail sent through www.mywaterloo.ca

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




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]



RE : RPM for Tomcat 4.1.30 ?

2004-04-02 Thread Philippe Couas
Thanks for this website
http://www.jpackage.org/rpm.php?id=2570

-Message d'origine-
De : Jeanfrancois Arcand [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 2 avril 2004 17:47
À : Tomcat Users List
Objet : Re: RPM for Tomcat 4.1.30 ?




Philippe Couas wrote:

Hi,
 
Anyone know where i can found RPM for Tomcat 4.1.30 ?
  


jpackage has Tomcat 5 (I did look for Tomcat 4.x...maybe it's there)

 http://www.jpackage.org/rpm.php?id=2571


-- Jeanfrancois

 
Regards
Philippe
 
 

  



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



Memory Leak Solution?

2004-04-02 Thread LILES, DAVID (CONTRACTOR)
I've searched previous postings for a possible solution regarding the memory leak 
thread that was posted previously but didn't seem to find an answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually decreases to the 
point where the server needs to be rebooted.

Does anyone know of a solution for this?

Thanks.

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



Unix utils for Windows?

2004-04-02 Thread Shaw, Laurence
Does anyone know where I can find a workable version awk for Windows,( and for that 
matter most common [U}[Lin]ix utilities) that will run on a windows 2000 box? I was 
attempting to run the makefile for Apache Server using MS C++  but at the end of the 
build it  tries to execute an awk script to build the config file for the server and 
errors because awk can not be found in my environment. I'd prefer not to have to run 
in a unix shell on a windows box, but...

Thanks,
Laurence 

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



Odd Memory Problem

2004-04-02 Thread Rob Wichterman
I have been battling a memory problem for a few months now with no luck.  I
have used profilers and everything else you could imagine.  The problem is
we have never been able to duplicate it on the testing servers it only
happens on production which does not see much load at all (100 users a day).
I noticed something very odd yesterday though.  I am using the
-XX:+UseConcMarkSweepGC and -Xms512m. I was monitoring the garbage
collection activity very closely and I was receiving good performance for 3
days.  I was seeing one garbage collection about every 5 minutes in the
Catalina.out.  Then out of nowhere the garbage collection starting going
crazy, about one garbage collection a second, I checked the cpu usage and it
was stuck around 60% used.  There were only 2-4 people logged in at a time.
The crazy garbage collection went on for a couple of hours before it
eventually crapped out with Out of Memory errors.  It almost seems like a
section of the app caused this sudden outburst but there is no way our QA
department hasn't went over the same section.  I was hoping some one seen or
heard of this before.  Below is my environment.

 

Thanks,

 

Apache2.0.47 using mod_jk2

2 * tomcat4.1.24

J2sdk1.4.2_04



RE: Unix utils for Windows?

2004-04-02 Thread Shapira, Yoav

Hi,
Cygwin perhaps? http://www.cygwin.com/.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Shaw, Laurence [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 11:03 AM
To: [EMAIL PROTECTED]
Subject: Unix utils for Windows?

Does anyone know where I can find a workable version awk for Windows,(
and
for that matter most common [U}[Lin]ix utilities) that will run on a
windows 2000 box? I was attempting to run the makefile for Apache
Server
using MS C++  but at the end of the build it  tries to execute an awk
script to build the config file for the server and errors because awk
can
not be found in my environment. I'd prefer not to have to run in a unix
shell on a windows box, but...

Thanks,
Laurence

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



RE: Odd Memory Problem

2004-04-02 Thread Shapira, Yoav

Hi,
As you say, it's unfortunate you can't reproduce this on a test server.
What if you setup a test server and let JMeter pound at it for a few
days?

Is there something in your application, e.g. a user action, that would
trigger an infinite loop or infinite recursion?  That would cause that
behavior you've described.  And it would only take one user doing it one
time, i.e. a very light load, to produce this problem.  You'd have to
carefully scrutinize your code...

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Rob Wichterman [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 11:17 AM
To: [EMAIL PROTECTED]
Subject: Odd Memory Problem

I have been battling a memory problem for a few months now with no
luck.  I
have used profilers and everything else you could imagine.  The problem
is
we have never been able to duplicate it on the testing servers it only
happens on production which does not see much load at all (100 users a
day).
I noticed something very odd yesterday though.  I am using the
-XX:+UseConcMarkSweepGC and -Xms512m. I was monitoring the garbage
collection activity very closely and I was receiving good performance
for 3
days.  I was seeing one garbage collection about every 5 minutes in the
Catalina.out.  Then out of nowhere the garbage collection starting
going
crazy, about one garbage collection a second, I checked the cpu usage
and
it
was stuck around 60% used.  There were only 2-4 people logged in at a
time.
The crazy garbage collection went on for a couple of hours before it
eventually crapped out with Out of Memory errors.  It almost seems
like a
section of the app caused this sudden outburst but there is no way our
QA
department hasn't went over the same section.  I was hoping some one
seen
or
heard of this before.  Below is my environment.



Thanks,



Apache2.0.47 using mod_jk2

2 * tomcat4.1.24

J2sdk1.4.2_04




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]



Re: Unix utils for Windows?

2004-04-02 Thread Jon Wingfield
http://www.cygwin.com/

I'm using grep, tail and scp on windows xp all the time :)

I also like gVim on windows. http://www.vim.org/

Shaw, Laurence wrote:

Does anyone know where I can find a workable version awk for Windows,( and for that matter most common [U}[Lin]ix utilities) that will run on a windows 2000 box? I was attempting to run the makefile for Apache Server using MS C++  but at the end of the build it  tries to execute an awk script to build the config file for the server and errors because awk can not be found in my environment. I'd prefer not to have to run in a unix shell on a windows box, but...

Thanks,
Laurence 

-
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: Unix utils for Windows?

2004-04-02 Thread Paul Mansfield
On Fri, 2004-04-02 at 17:03, Shaw, Laurence wrote:
 Does anyone know where I can find a workable version awk for Windows,( and for that 
 matter most common [U}[Lin]ix utilities) that will run on a windows 2000 box? I was 
 attempting to run the makefile for Apache Server using MS C++  but at the end of the 
 build it  tries to execute an awk script to build the config file for the server and 
 errors because awk can not be found in my environment. I'd prefer not to have to run 
 in a unix shell on a windows box, but...

cygwin




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



RE: Memory Leak Solution?

2004-04-02 Thread John Thompson
I've been fighting a similar symptom.  I downloaded the eval copy of
JProfiler and found the problem pretty quickly.  I had some static classes
that kept allocating memory that never got de-referenced.

John

-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Memory Leak Solution?

I've searched previous postings for a possible solution regarding the memory
leak thread that was posted previously but didn't seem to find an answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually decreases
to the point where the server needs to be rebooted.

Does anyone know of a solution for this?

Thanks.

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


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



RE: Unix utils for Windows?

2004-04-02 Thread Shaw, Laurence
Thanks to all, The winner seems to be cygwin.

 -Original Message-
From:   Paul Mansfield [mailto:[EMAIL PROTECTED] 
Sent:   Friday, April 02, 2004 10:16 AM
To: Tomcat Users List
Subject:Re: Unix utils for Windows?

On Fri, 2004-04-02 at 17:03, Shaw, Laurence wrote:
 Does anyone know where I can find a workable version awk for Windows,( and for that 
 matter most common [U}[Lin]ix utilities) that will run on a windows 2000 box? I was 
 attempting to run the makefile for Apache Server using MS C++  but at the end of the 
 build it  tries to execute an awk script to build the config file for the server and 
 errors because awk can not be found in my environment. I'd prefer not to have to run 
 in a unix shell on a windows box, but...

cygwin




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



any standart way to keep passwords encripted???

2004-04-02 Thread Emerson Cargnin
Is there any standart way to keep the passwords of databases encripted 
when creating a pool through tomcat?

--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[OT] The Way Java Handles Date

2004-04-02 Thread Yansheng Lin

Hi, Just wondering if anyone found this aspect of Java annoying.  I know this is
usually a faq, and a lot of people have put a lot of efforts making it better.
But I just find that the learning curve is a bit too steep for new comers.  And
it hasn't been improve in j2sdk-1.5 either, at least from the interface point of
view.  For example, a developer still has to go through the whole Calendar and
DateFormat process to get a Date from a String 

I feel like complaining today:). 

-yan


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



Re: Memory Leak Solution?

2004-04-02 Thread Malcolm Warren
I'd be very interested to hear how one can allocate memory without it 
being de-referenced.
It's obviously something to avoid. Can you give a bit of detail?

Thanks.

On Fri, 2 Apr 2004 10:28:22 -0600, John Thompson 
[EMAIL PROTECTED] wrote:

I've been fighting a similar symptom.  I downloaded the eval copy of
JProfiler and found the problem pretty quickly.  I had some static 
classes
that kept allocating memory that never got de-referenced.

John

-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Memory Leak Solution?
I've searched previous postings for a possible solution regarding the 
memory
leak thread that was posted previously but didn't seem to find an answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually 
decreases
to the point where the server needs to be rebooted.

Does anyone know of a solution for this?

Thanks.

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



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


How to set up JAVA_OPTS while running tomcat as a service

2004-04-02 Thread Mandy Joss
I am running Tomcat 4.1.24 as service but under stress I get 
OutOfMemmoryError. To cure this I want to pass JAVA_OPTS=-server -Xms256m 
-Xmx1000m -Xincgc to the Tomcat. Can somebody please tell me where should I 
specify JAVA_OPTS so that Tomcat running as service will look at them.

_
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/

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


problem with url - extra / appended before action

2004-04-02 Thread Chris
Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



RE: Memory Leak Solution?

2004-04-02 Thread Shapira, Yoav

Hi,
You might want to search the others.  Others as well as I have provided
examples of how easy this is to do.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Malcolm Warren [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 11:53 AM
To: Tomcat Users List
Subject: Re: Memory Leak Solution?

I'd be very interested to hear how one can allocate memory without it
being de-referenced.
It's obviously something to avoid. Can you give a bit of detail?

Thanks.


On Fri, 2 Apr 2004 10:28:22 -0600, John Thompson
[EMAIL PROTECTED] wrote:

 I've been fighting a similar symptom.  I downloaded the eval copy of
 JProfiler and found the problem pretty quickly.  I had some static
 classes
 that kept allocating memory that never got de-referenced.

 John

 -Original Message-
 From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 02, 2004 9:50 AM
 To: [EMAIL PROTECTED]
 Subject: Memory Leak Solution?

 I've searched previous postings for a possible solution regarding the
 memory
 leak thread that was posted previously but didn't seem to find an
answer.

 I'm running TC5 on IIS5 and have noticed that the memory gradually
 decreases
 to the point where the server needs to be rebooted.

 Does anyone know of a solution for this?

 Thanks.

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


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





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



Re: How to set up JAVA_OPTS while running tomcat as a service

2004-04-02 Thread Thomas Tang
Hi,

You would need to specify this prior to starting up Tomcat.
Just set your environment variables accordingly and fire up the tomcat 
afterwards.

Thomas



Mandy Joss [EMAIL PROTECTED] 
04/02/2004 11:54 AM
Please respond to
Tomcat Users List [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
How to set up JAVA_OPTS while running tomcat as a service






I am running Tomcat 4.1.24 as service but under stress I get 
OutOfMemmoryError. To cure this I want to pass JAVA_OPTS=-server -Xms256m 
-Xmx1000m -Xincgc to the Tomcat. Can somebody please tell me where should 
I 
specify JAVA_OPTS so that Tomcat running as service will look at them.

_
MSN Toolbar provides one-click access to Hotmail from any Web page ? FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


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




RE: Memory Leak Solution?

2004-04-02 Thread LILES, DAVID (CONTRACTOR)
I'm wondering if the leak isn't maybe in Tomcat. I have an environment that has only 
be configured for about a week and there are only two java projects that have been 
deployed. One is nothing more then a simple Struts site with no heavy code. The other 
site only uses Java to send SMTP messages from submitted forms.

-Original Message-
From: John Thompson [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:28 AM
To: 'Tomcat Users List'
Subject: RE: Memory Leak Solution?


I've been fighting a similar symptom.  I downloaded the eval copy of
JProfiler and found the problem pretty quickly.  I had some static classes
that kept allocating memory that never got de-referenced.

John

-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Memory Leak Solution?

I've searched previous postings for a possible solution regarding the memory
leak thread that was posted previously but didn't seem to find an answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually decreases
to the point where the server needs to be rebooted.

Does anyone know of a solution for this?

Thanks.

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


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


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



RE: Memory Leak Solution?

2004-04-02 Thread John Thompson
It was basically a bug in my code that I'm not proud of but the point is
that I found it with the profiler.  It showed me exactly which class
continued to absorb memory.  It also showed me what memory allocation looked
like for the whole JVM.

-Original Message-
From: Malcolm Warren [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:53 AM
To: Tomcat Users List
Subject: Re: Memory Leak Solution?

I'd be very interested to hear how one can allocate memory without it 
being de-referenced.
It's obviously something to avoid. Can you give a bit of detail?

Thanks.


On Fri, 2 Apr 2004 10:28:22 -0600, John Thompson 
[EMAIL PROTECTED] wrote:

 I've been fighting a similar symptom.  I downloaded the eval copy of
 JProfiler and found the problem pretty quickly.  I had some static 
 classes
 that kept allocating memory that never got de-referenced.

 John

 -Original Message-
 From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 02, 2004 9:50 AM
 To: [EMAIL PROTECTED]
 Subject: Memory Leak Solution?

 I've searched previous postings for a possible solution regarding the 
 memory
 leak thread that was posted previously but didn't seem to find an answer.

 I'm running TC5 on IIS5 and have noticed that the memory gradually 
 decreases
 to the point where the server needs to be rebooted.

 Does anyone know of a solution for this?

 Thanks.

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


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





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



Application loading twice

2004-04-02 Thread Chris
Hello,

 

Particulars: tomcat 5.0.19, fedora core 1, java 1.4.2

 

When starting tomcat my application loads twice, and I don't know why. The
engine portion of my server.xml is as follows:

 

Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host

/Engine

 

 

This causes my application to be served out not only on www.myApp.com/ but
also to www.myApp.com/myApp.

 

I have a domain name registered and my linux box is serving tomcat out on
port 80.  I guess maybe what I need to know is how to exactly map tomcat to
my domain.

 

Thanks,

 

c.




 



RE: Application loading twice

2004-04-02 Thread Shapira, Yoav

Hi,
It's probably because you have autoDeploy set to true AND an explicit
context with a different path for your webapp.  So tomcat deploys it
twice, one with your explicit context and once via autoDeploy with a
path=/ + the app name, i.e. /myApp.  Pick one, in your case probably
you should set autoDeploy=false.

In addition, you don't want path=/, you want path=.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 12:13 PM
To: [EMAIL PROTECTED]
Subject: Application loading twice

Hello,



Particulars: tomcat 5.0.19, fedora core 1, java 1.4.2



When starting tomcat my application loads twice, and I don't know why.
The
engine portion of my server.xml is as follows:



Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host

/Engine





This causes my application to be served out not only on www.myApp.com/
but
also to www.myApp.com/myApp.



I have a domain name registered and my linux box is serving tomcat out
on
port 80.  I guess maybe what I need to know is how to exactly map
tomcat to
my domain.



Thanks,



c.









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]



Virtual Hosts Kill My JSPs

2004-04-02 Thread Lisa Simaki
Hi, 

Thought I'd try again :)

We are using Tomcat v5.0.19 as a stand-alone server,
with the Coyote HTTP 1.1 Connector, on Windows 2000.
We have Tomcat configured with two virtual hosts
(i.e., two Host elements). The virtual hosting is
working great except for a problem with identically
named JSPs across hosts:

NUTSHELL

In a nutshell, when Tomcat translates a JSP into a
servlet, it is *NOT* taking into account which Host
the JSP belongs to. It translates the JSP into a
servlet and dumps the resulting Java source code in
the same directory, regardless of what Host the JSP
came from. 

This causes a big problem if the different hosts have
a JSP that happens to be the same name, like, say,
index.jsp. Since the generated Java code
(index_jsp.java) is dumped into the same directory,
regardless of which Host the JSP originated from,
Tomcat will serve the index.jsp that got translated
first. So, both hosts end up sharing the same
index.jsp.
 

MORE SPECIFICS (More Details)
--
In my server.xml I have two Host elements
configured:

Host name=xxx.test2.com debug=0
  appBase=C:\TestWebSites\test2
  unpackWARs=true deployOnStartup='true'
  autoDeploy=false
   Context path=/ docBase= debug=0
reloadable=false /
/Host

Host name=xxx.test1.com debug=0
  appBase=C:\TestWebSites\test1
  unpackWARs=true deployOnStartup='true'
  autoDeploy=false
  Context path=/ docBase= debug=0
   reloadable=false /
/Host

The name attribute of the first Host element is
xxx.test1.com and the name attribute on
the second Host is xxx.text2.com. Of course, I also
have the Windows hosts file set up so that both host
names are associated with 127.0.0.1. In other words,
the hosts file has entries for both xxx.test1.com
and xxx.test2.com and they both point to 127.0.0.1.

Both test1 and test2 have their own directories. In
other words, both appBase attributes of the Host
elements point to the directory appropriate to that
host (xxx.test1.com or xxx.test2.com). 

I hope this is clear so far. 

With Tomcat running I can browse to either
http://xxx.test1.com or http://xxx.test2.com and the
correct page is served. Tomcat seems to be using
virtual hosting just fineexcept...

If both test1 and test2 have a JSP with the same name
(like, say, index.jsp), then there's confusion. The
first index.jsp that gets compiled is the one that
gets served for *BOTH* hosts. For example:

Assume no JSPs are yet compiled.
I go to http://xxx.test1.com/index.jsp, causing the
test1's index.jsp to be compiled and rendered. That's
expected. Now, go to http://xxx.test2.com/index.jsp 
-- the result is still test1's version of index.jsp!

Now, if I modify test2's index.jsp and I go to
http://xxx.test2.com/index.jsp I see what I expect --
test2's JSP with the modification I just made. But now
if I go to http://xxx.test1.com/index.jsp I also see
test2's index.jsp, not test1's JSP!!!

HERE'S WHY IT HAPPENS!
-
Now, I know, partially why this is happening. You know
that Tomcat uses a separate directory to store
compiled JSPs. As I mentioned, Tomcat is not
differentiating between hosts when it writes the Java
source code (from the translated JSP) to this
directory. It's simply putting *all*
compiled JSPs into the same directory (WINNT/temp).
Since both test1 and test2 have identically named
index.jsp files, Tomcat does not distinguish them.
In both cases it generates index_jsp.java as needed,
overwriting the previous version. That is the crux of
what's causing my grief.

One would think Tomcat would build a directory
structure reflective of the host name and contexts so
that identically named JSPs from different hosts do
not over-write each other.

Can anyone offer any comments on this? Is anyone still
reading at this point?

Thanks,

LS

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



RE: Memory Leak Solution?

2004-04-02 Thread Shapira, Yoav

Hi,
Wonder wonder wonder ;)  Pick up a profiler (you can get free evals),
find the leak, and post your results.  If it's in tomcat I guarantee it
will be fixed very quickly (these are top-priority fixes always).

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 12:07 PM
To: Tomcat Users List
Subject: RE: Memory Leak Solution?

I'm wondering if the leak isn't maybe in Tomcat. I have an environment
that
has only be configured for about a week and there are only two java
projects that have been deployed. One is nothing more then a simple
Struts
site with no heavy code. The other site only uses Java to send SMTP
messages from submitted forms.

-Original Message-
From: John Thompson [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:28 AM
To: 'Tomcat Users List'
Subject: RE: Memory Leak Solution?


I've been fighting a similar symptom.  I downloaded the eval copy of
JProfiler and found the problem pretty quickly.  I had some static
classes
that kept allocating memory that never got de-referenced.

John

-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Memory Leak Solution?

I've searched previous postings for a possible solution regarding the
memory
leak thread that was posted previously but didn't seem to find an
answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually
decreases
to the point where the server needs to be rebooted.

Does anyone know of a solution for this?

Thanks.

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


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


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



RE: Memory Leak Solution?

2004-04-02 Thread Peter Lin
 
there's no need to be embarrased. happens to everyone. I know I've done that before, 
but since I stress test regularly, like weekly or bi-weekly I usually catch these 
before it escalates.
 
maybe I'm anal, but when ever I add a significant feature or module to my webapp, I 
always run a quick stress test. If it looks suspicious, I run more tests. so far it's 
worked well for me and increases my chances of delivering a solid app.
 
peter lin


Shapira, Yoav [EMAIL PROTECTED] wrote:

Hi,
Wonder wonder wonder ;) Pick up a profiler (you can get free evals),
find the leak, and post your results. If it's in tomcat I guarantee it
will be fixed very quickly (these are top-priority fixes always).

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 12:07 PM
To: Tomcat Users List
Subject: RE: Memory Leak Solution?

I'm wondering if the leak isn't maybe in Tomcat. I have an environment
that
has only be configured for about a week and there are only two java
projects that have been deployed. One is nothing more then a simple
Struts
site with no heavy code. The other site only uses Java to send SMTP
messages from submitted forms.

-Original Message-
From: John Thompson [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:28 AM
To: 'Tomcat Users List'
Subject: RE: Memory Leak Solution?


I've been fighting a similar symptom. I downloaded the eval copy of
JProfiler and found the problem pretty quickly. I had some static
classes
that kept allocating memory that never got de-referenced.

John

-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Memory Leak Solution?

I've searched previous postings for a possible solution regarding the
memory
leak thread that was posted previously but didn't seem to find an
answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually
decreases
to the point where the server needs to be rebooted.

Does anyone know of a solution for this?

Thanks.

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


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


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


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

RE: Virtual Hosts Kill My JSPs

2004-04-02 Thread LILES, DAVID (CONTRACTOR)
We are configured with multiple host tags and each project has identically named 
JSPs but we don't seem to be experiencing what you have described 

We followed the following document we created 
www.dynamichostings.com/TomCat5IIS5.do

-Dave

-Original Message-
From: Lisa Simaki [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 11:19 AM
To: [EMAIL PROTECTED]
Subject: Virtual Hosts Kill My JSPs


Hi, 

Thought I'd try again :)

We are using Tomcat v5.0.19 as a stand-alone server,
with the Coyote HTTP 1.1 Connector, on Windows 2000.
We have Tomcat configured with two virtual hosts
(i.e., two Host elements). The virtual hosting is
working great except for a problem with identically
named JSPs across hosts:

NUTSHELL

In a nutshell, when Tomcat translates a JSP into a
servlet, it is *NOT* taking into account which Host
the JSP belongs to. It translates the JSP into a
servlet and dumps the resulting Java source code in
the same directory, regardless of what Host the JSP
came from. 

This causes a big problem if the different hosts have
a JSP that happens to be the same name, like, say,
index.jsp. Since the generated Java code
(index_jsp.java) is dumped into the same directory,
regardless of which Host the JSP originated from,
Tomcat will serve the index.jsp that got translated
first. So, both hosts end up sharing the same
index.jsp.
 

MORE SPECIFICS (More Details)
--
In my server.xml I have two Host elements
configured:

Host name=xxx.test2.com debug=0
  appBase=C:\TestWebSites\test2
  unpackWARs=true deployOnStartup='true'
  autoDeploy=false
   Context path=/ docBase= debug=0
reloadable=false /
/Host

Host name=xxx.test1.com debug=0
  appBase=C:\TestWebSites\test1
  unpackWARs=true deployOnStartup='true'
  autoDeploy=false
  Context path=/ docBase= debug=0
   reloadable=false /
/Host

The name attribute of the first Host element is
xxx.test1.com and the name attribute on
the second Host is xxx.text2.com. Of course, I also
have the Windows hosts file set up so that both host
names are associated with 127.0.0.1. In other words,
the hosts file has entries for both xxx.test1.com
and xxx.test2.com and they both point to 127.0.0.1.

Both test1 and test2 have their own directories. In
other words, both appBase attributes of the Host
elements point to the directory appropriate to that
host (xxx.test1.com or xxx.test2.com). 

I hope this is clear so far. 

With Tomcat running I can browse to either
http://xxx.test1.com or http://xxx.test2.com and the
correct page is served. Tomcat seems to be using
virtual hosting just fineexcept...

If both test1 and test2 have a JSP with the same name
(like, say, index.jsp), then there's confusion. The
first index.jsp that gets compiled is the one that
gets served for *BOTH* hosts. For example:

Assume no JSPs are yet compiled.
I go to http://xxx.test1.com/index.jsp, causing the
test1's index.jsp to be compiled and rendered. That's
expected. Now, go to http://xxx.test2.com/index.jsp 
-- the result is still test1's version of index.jsp!

Now, if I modify test2's index.jsp and I go to
http://xxx.test2.com/index.jsp I see what I expect --
test2's JSP with the modification I just made. But now
if I go to http://xxx.test1.com/index.jsp I also see
test2's index.jsp, not test1's JSP!!!

HERE'S WHY IT HAPPENS!
-
Now, I know, partially why this is happening. You know
that Tomcat uses a separate directory to store
compiled JSPs. As I mentioned, Tomcat is not
differentiating between hosts when it writes the Java
source code (from the translated JSP) to this
directory. It's simply putting *all*
compiled JSPs into the same directory (WINNT/temp).
Since both test1 and test2 have identically named
index.jsp files, Tomcat does not distinguish them.
In both cases it generates index_jsp.java as needed,
overwriting the previous version. That is the crux of
what's causing my grief.

One would think Tomcat would build a directory
structure reflective of the host name and contexts so
that identically named JSPs from different hosts do
not over-write each other.

Can anyone offer any comments on this? Is anyone still
reading at this point?

Thanks,

LS

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

-
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: Virtual Hosts Kill My JSPs

2004-04-02 Thread QM
On Fri, Apr 02, 2004 at 09:18:54AM -0800, Lisa Simaki wrote:
: Host name=xxx.test2.com debug=0
:   appBase=C:\TestWebSites\test2
:   unpackWARs=true deployOnStartup='true'
:   autoDeploy=false
:Context path=/ docBase= debug=0
: reloadable=false /
: /Host
: 
: Host name=xxx.test1.com debug=0
:   appBase=C:\TestWebSites\test1
:   unpackWARs=true deployOnStartup='true'
:   autoDeploy=false
:   Context path=/ docBase= debug=0
:reloadable=false /
: /Host

It's a stretch, but:
I know using workDir has been recommended already; but
did you restart Tomcat after adding it?

-also, did said dirs already exist?  

For example,

Host name=xxx.test1.com
workDir=c:\temp\TomcatWork-test1.com ...
Host name=xxx.test2.com
workDir=c:\temp\TomcatWork-test2.com ...

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: How to set up JAVA_OPTS while running tomcat as a service

2004-04-02 Thread Mandy Joss
I have already tried this if I set up an environment variable called 
JAVA_OPTS as -Dmy.prop=myProp and then try to get it in my application thru 
System.getProperty(my.prop); Its null. So I don't think it looks at the 
environment variables.
  If I specify the same thing in the startup.bat file, I am able to get 
System.getProperty(my.prop);


From: Thomas Tang [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Subject: Re: How to set up JAVA_OPTS while running tomcat as a service
Date: Fri, 2 Apr 2004 12:03:46 -0500
Hi,

You would need to specify this prior to starting up Tomcat.
Just set your environment variables accordingly and fire up the tomcat
afterwards.
Thomas



Mandy Joss [EMAIL PROTECTED]
04/02/2004 11:54 AM
Please respond to
Tomcat Users List [EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
How to set up JAVA_OPTS while running tomcat as a service




I am running Tomcat 4.1.24 as service but under stress I get
OutOfMemmoryError. To cure this I want to pass JAVA_OPTS=-server -Xms256m
-Xmx1000m -Xincgc to the Tomcat. Can somebody please tell me where should
I
specify JAVA_OPTS so that Tomcat running as service will look at them.
_
MSN Toolbar provides one-click access to Hotmail from any Web page ? FREE
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_
Persistent heartburn? Check out Digestive Health  Wellness for information 
and advice. http://gerd.msn.com/default.asp

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


Re: How to set up JAVA_OPTS while running tomcat as a service

2004-04-02 Thread Paul Mansfield
On Fri, 2004-04-02 at 17:54, Mandy Joss wrote:
 I am running Tomcat 4.1.24 as service but under stress I get 
 OutOfMemmoryError. To cure this I want to pass JAVA_OPTS=-server -Xms256m 
 -Xmx1000m -Xincgc to the Tomcat. Can somebody please tell me where should I 
 specify JAVA_OPTS so that Tomcat running as service will look at them.

I put the settings into the catalina.sh file, e.g.

 
 # $Id: catalina.sh,v 1.11 2003/10/22 00:28:44 jfarcand Exp $
 # -
  
 JAVA_OPTS=-Djava.library.path=/usr/local/jakarta-tomcat/so




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



Re: [OT] The Way Java Handles Date

2004-04-02 Thread Paul Mansfield
On Fri, 2004-04-02 at 17:47, Yansheng Lin wrote:
 Hi, Just wondering if anyone found this aspect of Java annoying.  I know this is
 usually a faq, and a lot of people have put a lot of efforts making it better.
 But I just find that the learning curve is a bit too steep for new comers.  And
 it hasn't been improve in j2sdk-1.5 either, at least from the interface point of
 view.  For example, a developer still has to go through the whole Calendar and
 DateFormat process to get a Date from a String 

yeah, it's a pain, took me a while to get what I wanted (especially to
get the right locale)... but java.sql.Date can be a nice shortcut if
you're not fussy about presentation!




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



RE: problem with url - extra / appended before action

2004-04-02 Thread Yansheng Lin
it's hard to say what's causing the problem exactly without knowing your context
and your action-mappings.  maybe in your action mapping, you have one extra / in
front.  and tomcat would add that to the requestURL?

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



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



Test

2004-04-02 Thread The Gman
As requested.

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.com/go/onm00200415ave/direct/01/

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


RE: Test

2004-04-02 Thread Shapira, Yoav

Hi,
Looks fine.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: The Gman [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 12:42 PM
To: [EMAIL PROTECTED]
Subject: Test

As requested.

_
FREE pop-up blocking with the new MSN Toolbar - get it now!
http://toolbar.msn.com/go/onm00200415ave/direct/01/


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



Re: Memory Leak Solution?

2004-04-02 Thread Antonio Fiol Bonnn
public interface MemoryLeak {
public void leak();
}
-

import java.util.Vector;
public class C implements MemoryLeak {
Vector v = new Vector();
public void leak() {
v.add(new Object());
}
}
-

public class MyLeakerServlet extends javax.servlet.http.HttpServlet {
C lk = new C();
public void doGet(javax.servlet.http.HttpServletRequest req, 
javax.servlet.http.HttpServletResponse res) {
 lk.leak();
 res.getWriter().println(I'm leaking!!);
}
}

;-)

Antonio Fiol

Malcolm Warren wrote:

I'd be very interested to hear how one can allocate memory without it 
being de-referenced.
It's obviously something to avoid. Can you give a bit of detail?

Thanks.

On Fri, 2 Apr 2004 10:28:22 -0600, John Thompson 
[EMAIL PROTECTED] wrote:

I've been fighting a similar symptom.  I downloaded the eval copy of
JProfiler and found the problem pretty quickly.  I had some static 
classes
that kept allocating memory that never got de-referenced.

John

-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Memory Leak Solution?
I've searched previous postings for a possible solution regarding the 
memory
leak thread that was posted previously but didn't seem to find an 
answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually 
decreases
to the point where the server needs to be rebooted.

Does anyone know of a solution for this?

Thanks.

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



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




smime.p7s
Description: S/MIME Cryptographic Signature


RE: problem with url - extra / appended before action

2004-04-02 Thread Chris
Sorry, I made a mistake in my previous post.  I end up losing the domain
name in the link i.e I get http://action.do?parameter=blah instead of
Http://www.companyname.com/action.do?parameter=blah.  When I look at the
page source, the href attribute becomes href=//action.do instead of
href=/action.do.  And yes, I am using struts 1.1.

c.

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action

Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



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



RE: problem with url - extra / appended before action

2004-04-02 Thread Chris
Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host
/Engine

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



-
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: Virtual Hosts Kill My JSPs

2004-04-02 Thread Lisa Simaki
Are you using IIS as the server? Does IIS forward JSP
requests to Tomcat or are you using Tomcat as your
stand-alone web server?



--- LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
wrote:
 We are configured with multiple host tags and each
 project has identically named JSPs but we don't seem
 to be experiencing what you have described 
 
 We followed the following document we created
 www.dynamichostings.com/TomCat5IIS5.do
 
 -Dave
 
 -Original Message-
 From: Lisa Simaki [mailto:[EMAIL PROTECTED]
 Sent: Friday, April 02, 2004 11:19 AM
 To: [EMAIL PROTECTED]
 Subject: Virtual Hosts Kill My JSPs
 
 
 Hi, 
 
 Thought I'd try again :)
 
 We are using Tomcat v5.0.19 as a stand-alone server,
 with the Coyote HTTP 1.1 Connector, on Windows 2000.
 We have Tomcat configured with two virtual hosts
 (i.e., two Host elements). The virtual hosting is
 working great except for a problem with identically
 named JSPs across hosts:
 
 NUTSHELL
 
 In a nutshell, when Tomcat translates a JSP into a
 servlet, it is *NOT* taking into account which
 Host
 the JSP belongs to. It translates the JSP into a
 servlet and dumps the resulting Java source code in
 the same directory, regardless of what Host the
 JSP
 came from. 
 
 This causes a big problem if the different hosts
 have
 a JSP that happens to be the same name, like, say,
 index.jsp. Since the generated Java code
 (index_jsp.java) is dumped into the same directory,
 regardless of which Host the JSP originated from,
 Tomcat will serve the index.jsp that got translated
 first. So, both hosts end up sharing the same
 index.jsp.
  
 
 MORE SPECIFICS (More Details)
 --
 In my server.xml I have two Host elements
 configured:
 
 Host name=xxx.test2.com debug=0
   appBase=C:\TestWebSites\test2
   unpackWARs=true deployOnStartup='true'
   autoDeploy=false
Context path=/ docBase= debug=0
 reloadable=false /
 /Host
 
 Host name=xxx.test1.com debug=0
   appBase=C:\TestWebSites\test1
   unpackWARs=true deployOnStartup='true'
   autoDeploy=false
   Context path=/ docBase= debug=0
reloadable=false /
 /Host
 
 The name attribute of the first Host element is
 xxx.test1.com and the name attribute on
 the second Host is xxx.text2.com. Of course, I
 also
 have the Windows hosts file set up so that both
 host
 names are associated with 127.0.0.1. In other words,
 the hosts file has entries for both xxx.test1.com
 and xxx.test2.com and they both point to 127.0.0.1.
 
 Both test1 and test2 have their own directories. In
 other words, both appBase attributes of the Host
 elements point to the directory appropriate to that
 host (xxx.test1.com or xxx.test2.com). 
 
 I hope this is clear so far. 
 
 With Tomcat running I can browse to either
 http://xxx.test1.com or http://xxx.test2.com and the
 correct page is served. Tomcat seems to be using
 virtual hosting just fineexcept...
 
 If both test1 and test2 have a JSP with the same
 name
 (like, say, index.jsp), then there's confusion. The
 first index.jsp that gets compiled is the one that
 gets served for *BOTH* hosts. For example:
 
 Assume no JSPs are yet compiled.
 I go to http://xxx.test1.com/index.jsp, causing the
 test1's index.jsp to be compiled and rendered.
 That's
 expected. Now, go to http://xxx.test2.com/index.jsp 
 -- the result is still test1's version of index.jsp!
 
 Now, if I modify test2's index.jsp and I go to
 http://xxx.test2.com/index.jsp I see what I expect
 --
 test2's JSP with the modification I just made. But
 now
 if I go to http://xxx.test1.com/index.jsp I also see
 test2's index.jsp, not test1's JSP!!!
 
 HERE'S WHY IT HAPPENS!
 -
 Now, I know, partially why this is happening. You
 know
 that Tomcat uses a separate directory to store
 compiled JSPs. As I mentioned, Tomcat is not
 differentiating between hosts when it writes the
 Java
 source code (from the translated JSP) to this
 directory. It's simply putting *all*
 compiled JSPs into the same directory (WINNT/temp).
 Since both test1 and test2 have identically named
 index.jsp files, Tomcat does not distinguish them.
 In both cases it generates index_jsp.java as
 needed,
 overwriting the previous version. That is the crux
 of
 what's causing my grief.
 
 One would think Tomcat would build a directory
 structure reflective of the host name and contexts
 so
 that identically named JSPs from different hosts do
 not over-write each other.
 
 Can anyone offer any comments on this? Is anyone
 still
 reading at this point?
 
 Thanks,
 
 LS
 
 __
 Do you Yahoo!?
 Yahoo! Small Business $15K Web Design Giveaway 
 http://promotions.yahoo.com/design_giveaway/
 

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

-
 To unsubscribe, e-mail:
 

Re: Can Tomcat servers files outside the webapps directory

2004-04-02 Thread Kam Lung Leung
Hi Emerson,

Thank you for your help. But I don't understand why I do I have to write Java
code to transmit the file. Shouldn't Tomcat already has this capability. For
example, when we press a link that references to a image said
http://hostName:portNumber/ImageFile/myImage.jpeg from a browser, then image is
render by the web container to the browser so that the user on the other end can
see it. I thought all I have to do is to create a context for this purpose.
Where the context path for this web component points to the directory at /audio
instead of a directory under the webapps. 

Thanks,
Kam 
On Thu, 01 Apr 2004 19:15:55 -0300, Emerson Cargnin wrote:

 
 I think you have to do the inverted way as described in the thread Re: 
 redirecting uploaded files in tomcat5, by TomK, you have to accept the 
   http request, read from an InputStream  and write to an OutputStream...
 
 Just suggest to use Buffered streams, as it will help in the performance.
 
 BufferedInputStream bf=new BufferedInputStream(new 
 FileInputStream(/file_or_dir));
 
 The rest of the code remaisn the same...
 
 []s
 Emerson
 
 Kam Lung Leung wrote:
  Hi,
  
  I am working on a project that needs to retrieve audio files under the root
  directory of a server (/audio). My question is that Can Tomcat 4.x servers
 files
  that are not in the webapps directory. If it can, can someone point me to an
  example of such set up. Here is an example of how the audio file may be
  requested from a servlet using http.
 http://hostName:portNumber/myApp/Hi.wav
  Tomcat should fetch the audio file Hi.wav from the /audio directory and not
 from
  the myApp that is under the webapps directory.
  
  Thank you in advance,
  Kam
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -- 
 Emerson Cargnin
 Analista de Sistemas
 Setor de Desenvolvimento de Sistemas - TRE-SC
 tel : (048) - 251-3700 - Ramal 3181
 
 -
 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: Memory Leak Solution?

2004-04-02 Thread Emerson Cargnin
You can use hyades from eclipse, I tested it a long ago and it must be a 
lot more stable (it worked nice when I tried).

http://www.eclipse.org/hyades/

Shapira, Yoav wrote:
Hi,
Wonder wonder wonder ;)  Pick up a profiler (you can get free evals),
find the leak, and post your results.  If it's in tomcat I guarantee it
will be fixed very quickly (these are top-priority fixes always).
Yoav Shapira
Millennium Research Informatics


-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 12:07 PM
To: Tomcat Users List
Subject: RE: Memory Leak Solution?
I'm wondering if the leak isn't maybe in Tomcat. I have an environment
that

has only be configured for about a week and there are only two java
projects that have been deployed. One is nothing more then a simple
Struts

site with no heavy code. The other site only uses Java to send SMTP
messages from submitted forms.
-Original Message-
From: John Thompson [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 10:28 AM
To: 'Tomcat Users List'
Subject: RE: Memory Leak Solution?
I've been fighting a similar symptom.  I downloaded the eval copy of
JProfiler and found the problem pretty quickly.  I had some static
classes

that kept allocating memory that never got de-referenced.

John

-Original Message-
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Memory Leak Solution?
I've searched previous postings for a possible solution regarding the
memory
leak thread that was posted previously but didn't seem to find an
answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually
decreases
to the point where the server needs to be rebooted.
Does anyone know of a solution for this?

Thanks.

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



--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] The Way Java Handles Date

2004-04-02 Thread Rhino
I agree. I found date manipulation a real pain when I first started using
them.

On the other hand, I know how to work with them now and I'm not prepared to
write anything better than the existing Java date/calendar classes so I can
live with it now.

I think a short tutorial is probably the best answer for explaining this to
people who are new to date manipulation in Java but I'm too busy with other
things to write one myself, at least for the next few weeks.

Maybe you could write a tutorial as you learn what you need to know?

Rhino

- Original Message - 
From: Yansheng Lin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 11:47 AM
Subject: [OT] The Way Java Handles Date



Hi, Just wondering if anyone found this aspect of Java annoying.  I know
this is
usually a faq, and a lot of people have put a lot of efforts making it
better.
But I just find that the learning curve is a bit too steep for new comers.
And
it hasn't been improve in j2sdk-1.5 either, at least from the interface
point of
view.  For example, a developer still has to go through the whole Calendar
and
DateFormat process to get a Date from a String

I feel like complaining today:).

-yan


-
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: Application loading twice

2004-04-02 Thread Nikola Milutinovic
Shapira, Yoav wrote:

Hi,
It's probably because you have autoDeploy set to true AND an explicit
context with a different path for your webapp.  So tomcat deploys it
twice, one with your explicit context and once via autoDeploy with a
path=/ + the app name, i.e. /myApp.  Pick one, in your case probably
you should set autoDeploy=false.
 

What should one do if he has a VHost with many web applications, all of 
them rooted in one dir (i.e. ~owner/WebApps/) and wants to setup some 
context bound things, like DataSources?

If autodeploy is on, the webapp with DataSource will load twice. If it 
is off, then each webapp has to be deployed manually.

Nix.

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


Re: Can Tomcat servers files outside the webapps directory

2004-04-02 Thread Emerson Cargnin
You can do this way, but a context just for containing the audio files 
is a kind of weird. Other approach is to have a symbolic link from your 
context to the audio directory...

Kam Lung Leung wrote:
Hi Emerson,

Thank you for your help. But I don't understand why I do I have to write Java
code to transmit the file. Shouldn't Tomcat already has this capability. For
example, when we press a link that references to a image said
http://hostName:portNumber/ImageFile/myImage.jpeg from a browser, then image is
render by the web container to the browser so that the user on the other end can
see it. I thought all I have to do is to create a context for this purpose.
Where the context path for this web component points to the directory at /audio
instead of a directory under the webapps. 

Thanks,
Kam 
On Thu, 01 Apr 2004 19:15:55 -0300, Emerson Cargnin wrote:


I think you have to do the inverted way as described in the thread Re: 
redirecting uploaded files in tomcat5, by TomK, you have to accept the 
 http request, read from an InputStream  and write to an OutputStream...

Just suggest to use Buffered streams, as it will help in the performance.

BufferedInputStream bf=new BufferedInputStream(new 
FileInputStream(/file_or_dir));

The rest of the code remaisn the same...

[]s
Emerson
Kam Lung Leung wrote:

Hi,

I am working on a project that needs to retrieve audio files under the root
directory of a server (/audio). My question is that Can Tomcat 4.x servers
files

that are not in the webapps directory. If it can, can someone point me to an
example of such set up. Here is an example of how the audio file may be
requested from a servlet using http.
  http://hostName:portNumber/myApp/Hi.wav
Tomcat should fetch the audio file Hi.wav from the /audio directory and not
from

the myApp that is under the webapps directory.

Thank you in advance,
Kam
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
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]



--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Can Tomcat servers files outside the webapps directory

2004-04-02 Thread Kam Lung Leung
Thank Emerson,

That was what we had done so far. This is what we did;
1) deploy the myApp.war to the webapps directory.
2) start up tomcat and watching tomcat unpacks the myApp.war
3) stop tomcat after all wars are deployed
4) manually create a soft link within the myApp directory
   ex.   ls -s theActualAudioDirectory  theSoftLinkAudioDirectoryName
   The theSoftLinkAudioDirectoryName now point to the theActualAudioDirectory  
5) start up tomcat again.
But what if we can not do that in the future version of tomcat then the above
steps can not be done. Do you have any better idea?

Thank,


On Fri, 02 Apr 2004 15:38:22 -0300, Emerson Cargnin wrote:

 
 You can do this way, but a context just for containing the audio files 
 is a kind of weird. Other approach is to have a symbolic link from your 
 context to the audio directory...
 
 Kam Lung Leung wrote:
  Hi Emerson,
  
  Thank you for your help. But I don't understand why I do I have to write Java
  code to transmit the file. Shouldn't Tomcat already has this capability. For
  example, when we press a link that references to a image said
  http://hostName:portNumber/ImageFile/myImage.jpeg from a browser, then image
is
  render by the web container to the browser so that the user on the other end
 can
  see it. I thought all I have to do is to create a context for this purpose.
  Where the context path for this web component points to the directory at
/audio
  instead of a directory under the webapps. 
  
  Thanks,
  Kam 
  On Thu, 01 Apr 2004 19:15:55 -0300, Emerson Cargnin wrote:
  
  
 I think you have to do the inverted way as described in the thread Re: 
 redirecting uploaded files in tomcat5, by TomK, you have to accept the 
   http request, read from an InputStream  and write to an OutputStream...
 
 Just suggest to use Buffered streams, as it will help in the performance.
 
 BufferedInputStream bf=new BufferedInputStream(new 
 FileInputStream(/file_or_dir));
 
 The rest of the code remaisn the same...
 
 []s
 Emerson
 
 Kam Lung Leung wrote:
 
 Hi,
 
 I am working on a project that needs to retrieve audio files under the root
 directory of a server (/audio). My question is that Can Tomcat 4.x servers
 
 files
 
 that are not in the webapps directory. If it can, can someone point me to an
 example of such set up. Here is an example of how the audio file may be
 requested from a servlet using http.
http://hostName:portNumber/myApp/Hi.wav
 Tomcat should fetch the audio file Hi.wav from the /audio directory and not
 
 from
 
 the myApp that is under the webapps directory.
 
 Thank you in advance,
 Kam
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 Emerson Cargnin
 Analista de Sistemas
 Setor de Desenvolvimento de Sistemas - TRE-SC
 tel : (048) - 251-3700 - Ramal 3181
 
 -
 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]
  
  
 
 
 -- 
 Emerson Cargnin
 Analista de Sistemas
 Setor de Desenvolvimento de Sistemas - TRE-SC
 tel : (048) - 251-3700 - Ramal 3181
 
 -
 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: Sticky sessions on Apache/JK2

2004-04-02 Thread Eulogio Robles
The stickySession line is not recognized on Linux either.  Where can I 
find the correct method to implement sticky sessions?

Best regards,

E. Robles

Eulogio Robles wrote:

I'm trying to set up sticky sessions on Apache/Tru64, using JK2 latest 
version. I'm using both Apache 2.0.49, and the version distributed by 
HP on its Secure Web Server 6.1.1 (2.0.47).

According to JK2 documentation, I should use a sentence like this on 
my workers2.properties file :

[lb:lb]
stickySession=1
However, I get these messages :

[Thu Apr 01 17:01:04 2004] [notice] config.update(): done logger
[Thu Apr 01 17:01:04 2004] [notice] config.update(): done config:
[Thu Apr 01 17:01:04 2004] [notice] config.setAttribute() Error 
setting lb:lb stickySession 1
[Thu Apr 01 17:01:04 2004] [notice] config.update(): done lb:lb
[Thu Apr 01 17:01:04 2004] [notice] config.update(): done 
channel.socket:localhost:8009
[Thu Apr 01 17:01:04 2004] [notice] config.update(): done 
ajp13:localhost:8009
[Thu Apr 01 17:01:04 2004] [notice] config.update(): done uri:/*.jsp

I see that my requests are being load balanced for the same session. I 
am trying
2 Tomcats, and later, 2 JBoss servers, and in both cases I see that 
all requests from the same session are being attended in both servers 
(50-50).



Best regards,

Eulogio Robles

-
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: Tomcat5 - MySql5.0.0a - apache2.0 - XP - JNDI connection problems

2004-04-02 Thread The Gman
I apologize - but I haven't been receiving any of the tomcat-user lists emails to my 
previous email account. I have since switched to this one. Anyway...
 
Tom K. - asked:
Are you using jstl tags to connect to your database? Looking at your
error, I noted the path http://java.sun.com/jsp/jstl/sql You are using
the preview version of mySQL (Version 5), has connectorJ been tested
with it...I don't know, I'm just asking. 

My response: I'm a newbie on the configuration so I was just following
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

I would have no idea if it has been tested - how could I find out?
 
 
My previous email:
 
I am following:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

I am running windows XP - have apache 2.0.48 and Tomcat 5.0.19 up and
running with j2sdk1.4.2_04. I am also running MySql5.0.0a

Under $CATALINA_HOME/comon/lib
  mysql-connector-java-3.0.11-stable-bin
  commons-collections.3.0.jar
  commons-dbcp-1.1.jar
  commons-pool-1.1.jar

When I run the test code - test.jsp I get the following error:

Exception report:
org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or
the
jar files deployed with this application

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:94)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java
:404)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java
:154)

org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLib
raryInfoImpl.java:359)

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.
java:190)

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)

org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)

org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
org.apache.jasper.compiler.Parser.parse(Parser.java:171)

org.apache.jasper.compiler.ParserController.doParse(ParserController.jav
a:258)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:
139)

org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:553)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:291)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

What is wrong with my configuration?

Step 2. server.xml configuration says /Context tag of the examples
context and the /Host
My server.xml doesn't have Context tags should there be one?

Step 3. web.xml configuration - Do I make/add these changes to the
web.xml
under $CATALINA\ROOT\WEB-INF or under a subdirectory called /DBTest/??

Step 4. test code says deploy your web app into $CATALINA_HOME/webapps
either as a warfile called DBTest.war orinto a subdirectory called
DBTest.
So, I created a directory called DBTest and just put the test.jsp file
into
that directory - doesn't that qualify as deploying??

Thanks for any help to fix my configuration.

Tim



-
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today

RE: problem with url - extra / appended before action

2004-04-02 Thread Tom K
Hi Chris,

Frames are very inconsistent on different browser, so most
developers try to avoid them. With that said, some times you have to
tune you path to work with the classpath.

First of all see where your path is pointing to by use a few commands
e.g.

String path = request.getContextPath();
System.out.println(The path in SearchResultsPage is  + path);
String basePath =
request.getScheme()+://+request.getServerName()+:+request.getServerP
ort()+path+/;

If you are using a jsp, simply enclose the above code in % %

Now that you know your path info, the next thing to do is determine if
you can make it all work together by tuning your path info.

For example, when viewing your source code html out put, look at the
path, sometime, you need to ad a ../myPath to go back a directory!

Now other times (I dont know exactly what your working with, so excuse
my ignorance) you may have to have a base path set up so all you
relative path information can be base on that. For example you may
need to ad code such as this:

BASE
HREF=%=request.getScheme()+://+request.getServerName()+:+request.ge
tServerPort()+path+/ %

which gives you a base path to work off of.


Any ways...good luck,


Tom Kochanowicz





-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action

Hello,

 

I have an application that uses frames.  The problem that I am
experiencing
is that when I go to a page that loads a new frameset all of my links
and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are
all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra /
is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat
standalone no
apache involved) onto a linux box.  The problem does not occur when I
test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 


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



Unable to connect Apache 2.0.48 to tomcat using JK2 Connector an d JNI.

2004-04-02 Thread Chippada , Sreeni
Hi,
I am trying to connect tomcat 5.0 and Apache 2.0.48 through JK2
connector using JNI on Windows 2000. The channel.jni:jni init is failing.


I greatly appreciate any help with this.


Thanks,
Sreeni

Following are the errors from the log file mod_jk2.log

-
[Fri Apr 02 11:25:21 2004] (error ) [jk_workerEnv.c (211)]
workerEnv.initChannel() init failed for channel.jni:jni
[Fri Apr 02 11:25:21 2004] ( info ) [jk_worker_jni.c (204)]
workerJni.Init() Skipping initialization for the 2224 2224
[Fri Apr 02 11:25:21 2004] (error ) [jk_workerEnv.c (178)]
workerEnv.initWorkers() init failed for worker.jni:onStartup
[Fri Apr 02 11:25:21 2004] ( info ) [jk_worker_jni.c (204)]
workerJni.Init() Skipping initialization for the 2224 2224
[Fri Apr 02 11:25:21 2004] (error ) [jk_workerEnv.c (178)]
workerEnv.initWorkers() init failed for worker.jni:onShutdown
--



Followed the steps below:


STEP 1: Installing mod_jk2
--
1. Copy the mod_jk2.dll into APACHE_HOME/modules directory.
2. Add the following line to httpd.conf
LoadModule jk2_module modules/mod_jk2.dll

#I also tried installing and configuring jkjni.dll in APACHE_HOME/modules.
That did not help either.



STEP 2: Configure TOMCAT_HOME/conf/server.xml
---
Disable the default connector on port 8080

Enable the AJP connector on port 8009.


STEP 3: TOMCAT_HOME/conf/jk2.properties
-
handler.list=apr,request,channelJni
shm.file=c:/software/Apache Group/Apache2/logs/jk2.shm
channelJni.disabled=0
apr.jniModeSo=inprocess

STEP 4: APACHE_HOME/conf/workers2.properties
--
# Set level to ERROR or EMERG for production - check path
[logger.file:0]
level=DEBUG
file=${serverRoot}/logs/mod_jk2.log

[logger]
level=DEBUG

[config:]
file=${serverRoot}/conf/workers2.properties
debug=100
debugEnv=100

[uriMap:]
info=Maps the requests. Options: debug
debug=100

[shm:]
info=Scoreboard. Required for reconfiguration and status with multiprocess
servers
file=${serverRoot}/logs/jk2.shm
size=100
debug=100
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=100
logger=logger.file:0

[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
debug=0
tomcatId=localhost:8009

[channel.jni:jni]
info=The jni channel, used if tomcat is started inprocess
debug=100
disabled=0

# Define the parameters for the Java Virtual Machine
[vm:]
info=Parameters used to load a JVM in the server process
JVM=C:\j2sdk1.4.2_02\jre\bin\server\jvm.dll
OPT=-Djava.class.path=C:/Software/apache/jakarta-tomcat5.0.16/bin/bootstrap.
jar;
C:/Software/apache/jakarta-tomcat-5.0.16/server/lib/tomcat-jni.jar;C:/Softwa
re/apache/jakarta-tomcat-5.0.16/server/lib/tomcat-jk2.jar;C:/Software/apache
/jakarta-tomcat-5.0.16/common/lib/jmx.jar;C:/Software/apache/jakarta-tomcat-
5.0.16/server/lib/commons-modeler.jar
OPT=-Dcatalina.home=C:/Software/apache/jakarta-tomcat-5.0.16
OPT=-Dtomcat.home=C:/Software/apache/jakarta-tomcat-5.0.16
OPT=-Xmx512M
disabled=0
debug=100

# JNI worker startup handler
[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
disabled=0
stdout=C:/Software/Apache Group/Apache2/logs/stdout.log
stderr=C:/Software/Apache Group/Apache2/logs/stderr.log
debug=100

# JNI worker shutdown handler
[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop
tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
disabled=0
debug=100


# define the worker
[status:]
info the status worker

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:/jsp-examples]
info=Example webapp in the default context. 
context=/jsp-examples
debug=100



STEP 5: Start up


Start tomcat first
Wait until the instance is started.
Start apache.



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



Re: Tomcat5 - MySql5.0.0a - apache2.0 - XP - JNDI connection problems - Doug - Parsons Technical Services

2004-04-02 Thread The Gman
I apologize - but I haven't been receiving any of the tomcat-user lists emails to my 
previous email account.  I could only see responses in the mailing list archive. I 
have since switched to this email address and the mailing list is working fine. 
Anyway...
 
Doug - Parsons Technical Services responses were:

 I am running windows XP - have apache 2.0.48 and Tomcat 5.0.19 up and
 running with j2sdk1.4.2_04. I am also running MySql5.0.0a

I recommend for the purpose of testing to access Tomcat directly if
possible. MySQL version may cause issues as noted by Tom. Once everything
else is fixed, we'll see.
I am a newbie at configuration and Tomcat - what do you mean by directly? And how do 
I check or change this?
...
 What is wrong with my configuration?
To answer this it is much easier if we can see them. Which files do you want and do I 
just attach them to the email or paste them into the email? Do you want the whole 
file or just parts? (They will look like a brand new install with the following 
changes as lined out on this page: 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html  )

 Step 2. server.xml configuration says /Context tag of the examples
 context and the /Host
 My server.xml doesn't have Context tags should there be one?
Yes and no.
To keep things simple and to start you down the path of Tomcat knowledge,
for now create the context section as shown in the example. Later you can
move it to context.xml. Look up the context section under server
configuration for more detail.
Sounds like I can leave it where it is and look into a context.xml file later on.

 Step 3. web.xml configuration - Do I make/add these changes to the web.xml
 under $CATALINA\ROOT\WEB-INF or under a subdirectory called /DBTest/??
Under /DBTest/WEB-INF/ in the web.xml for your app.
I'll make these changes tomorrow am and test. (I'm not near my machine...)
 
 Step 4. test code says deploy your web app into $CATALINA_HOME/webapps
 either as a warfile called DBTest.war orinto a subdirectory called DBTest.
 So, I created a directory called DBTest and just put the test.jsp file into
 that directory - doesn't that qualify as deploying??
No. IMHO  You need to create the file structure and the web.xml. Not sure what else 
as I use .war files.
Ok - newbie question - Can you point me to what my file structure should look like or 
else how to create a .war file? I am guessing that it will mimic one of the main 
directories. 
 
 
For completeness and reference - my previous email:
 
I am following:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

I am running windows XP - have apache 2.0.48 and Tomcat 5.0.19 up and
running with j2sdk1.4.2_04. I am also running MySql5.0.0a

Under $CATALINA_HOME/comon/lib
  mysql-connector-java-3.0.11-stable-bin
  commons-collections.3.0.jar
  commons-dbcp-1.1.jar
  commons-pool-1.1.jar

When I run the test code - test.jsp I get the following error:

Exception report:
org.apache.jasper.JasperException: The absolute uri:
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or
the
jar files deployed with this application

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHand
ler.java:94)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java
:404)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java
:154)

org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLib
raryInfoImpl.java:359)

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.
java:190)

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)

org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)

org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
org.apache.jasper.compiler.Parser.parse(Parser.java:171)

org.apache.jasper.compiler.ParserController.doParse(ParserController.jav
a:258)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:
139)

org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:553)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:291)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

What is wrong with my configuration?

Step 2. server.xml configuration says /Context tag of the examples
context and the /Host
My server.xml doesn't have Context tags should there be one?

Step 3. web.xml configuration - Do I make/add these changes to the
web.xml
under 

Re: apache 1.3 tomcat 5.0.19

2004-04-02 Thread mariano
On Wednesday 31 March 2004 15:14, Emerson Cargnin wrote:


Hi, I run apache 1.3 whit Tomcat 4.1 and i use mod_jk2. Its works fine. 


 Ive being researching about mod_jk and as far as I can see, the mod_jk
 was made to work with apache 2 (even that it says that it works with 1.3).

 Do I have to build mod_jk again if I use jk2

 I have read that jk1.3 would be better suited to apache 1.3...

 What's the best connector to use with apache 1.3 and tomcat 5??

 thanks

 Randy Harrison wrote:
  Galem,
 
  Mod_jk and mod_jk2 are connectors between tomcat and a standard
  webserver(apache, etc.). If you are going to use tomcat as a stanalone
  sever you don't need to connect to apache.
 
  Short answer = no.
 
  Randy Harrison
  Developer, eWatch Services
  PR Newswire
  612 243-0601 x1120
  [EMAIL PROTECTED]
 
 
 
Galam
[EMAIL PROTECTED]To:   Tomcat Users
  List [EMAIL PROTECTED]
 
cc:
 
 Subject:  RE: apache 1.3
  tomcat 5.0.19 03/17/2004 04:59
PM
Please respond to
Tomcat Users
List
 
 
 
 
 
 
  Shapira,
 
  I have a question!
 
  If I use Tomcat5 standalone in production, do I still need to configure
  the mod_jk ?  The mod_jk has been giving me too much troubles, and it
  would be really great if it is not needed in standalone enviroment.
  Thanks!
 
  Galam.
 
 
 
 
  Shapira, Yoav [EMAIL PROTECTED] wrote:
  Hi,
  Tomcat 5 can be used standalone to serve static content including
  images, yes. The same is true for tomcat 3 and 4 as well. People are
  using tomcat in production without a front-end server to handle static
  content, yes. Is there a drop in performance? Probably yes, but it
  depends on the static content, the traffic your site gets, the hardware
  and software configuration, and a host of other variables: frequently
  the drop in performance is better than the additional maintenance and
  setup costs of a separate front-end.
 
  Yoav Shapira
  Millennium Research Informatics
 
 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 17, 2004 2:16 PM
 To: Tomcat Users List
 Subject: Re: apache 1.3 tomcat 5.0.19
 
 I have a complementary question, taht I know that i have being asked
 before, but didn't find any answer, it's related to my previous
 
  question:
 - Tomcat 5 can be used directly (in production) without apache??? For
 serving static pages and images??? I mean, there are anybody using it
 direct in production, without any drop in performance?
 
 Emerson Cargnin wrote:
 Hi all
 
 I'm migrating a tomcat 3.2.3 isntallation to version 5.
 When using 3.2.3, I used to use automatic mod_jk.conf-auto generation
 for use by apache. Does version 5 has the same feature? Or do I have
 
  to
 
 configure it by hand?? any how-to?? It's not mentioned in tomcat 5
 
  docs..
 
 I used mod_jk, is jk2 prefered There's no linux release for it
 
  and
 
 when trying to build as the readme says, the buildI doesn't work at
 
 all...
 
 I'm using suse 9 / apache 1.3 and tomcat 5.
 
 --
 Emerson Cargnin
 Analista de Sistemas
 Setor de Desenvolvimento de Sistemas - TRE-SC
 tel : (048) - 251-3700 - Ramal 3181
 
 
 -
 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]
 
 
   Do you Yahoo!?
  Yahoo! Mail - More reliable, more storage, less spam
 
 
 
 
 
  -
  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: [OT] The Way Java Handles Date

2004-04-02 Thread Yansheng Lin
As I said, this is a faq.  There is already tutorials on Sun's Website.  But the
way it works now is kind of counter-intuitive.  That's the problem to new user.
Wouldn't it be nicer if Sun came up with an Wrapper interface that allows the
user create a Date object with different arguments?   


import java.util.Date;
import java.text.ParseException;

public class MyClass {
  private final static DateFormat fmt = new SimpleDateFormat(dd/MM/);

  public Date convert(String str) {
try {
  Date date = fmt.parse(str);
  return date;
}
catch (ParseException pe) {
  System.out.println(The string does not contain a date in the expected
format);
  return null;
}
  }
}


-yan

-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 11:26 AM
To: Tomcat Users List
Subject: Re: [OT] The Way Java Handles Date


I agree. I found date manipulation a real pain when I first started using
them.

On the other hand, I know how to work with them now and I'm not prepared to
write anything better than the existing Java date/calendar classes so I can
live with it now.

I think a short tutorial is probably the best answer for explaining this to
people who are new to date manipulation in Java but I'm too busy with other
things to write one myself, at least for the next few weeks.

Maybe you could write a tutorial as you learn what you need to know?

Rhino

- Original Message - 
From: Yansheng Lin [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, April 02, 2004 11:47 AM
Subject: [OT] The Way Java Handles Date



Hi, Just wondering if anyone found this aspect of Java annoying.  I know
this is
usually a faq, and a lot of people have put a lot of efforts making it
better.
But I just find that the learning curve is a bit too steep for new comers.
And
it hasn't been improve in j2sdk-1.5 either, at least from the interface
point of
view.  For example, a developer still has to go through the whole Calendar
and
DateFormat process to get a Date from a String

I feel like complaining today:).

-yan


-
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: any standart way to keep passwords encripted???

2004-04-02 Thread Emerson Cargnin
How can I mantain databases passwords without :

- Being put in the code (arg)
- Being in plain text in server.xml (as configured for tomcat)
I use another approache than the pool from tomcat, that consist in a 
separate servlet and a PoolManager, which is accessed in a static way. 
(so other apps can reference the same instance...). In the servlet I 
read the init properties from web-xml that follows a pattern 
(poolname1,dbuser1,dbpass1, and so on for all pools). In the application 
I just as for the pool by the name of it. It works and I can change the 
pool implementation without impacting in any code of the application. We 
are thinking in not let the password in plain text in the web.xml. I 
though of 2 approaches:

- Read the web.xml by a standalone app and encript the password, in my 
connection servlet I read it and decritp it.

- Have a separate file for each pool, this file,encripted, would contain 
info about each pool.

BTW, is there any way to use the same pool for more than one app, using 
tomcat pool configuration ???

thanks in advance
Emerson
Emerson Cargnin wrote:
Is there any standart way to keep the passwords of databases encripted 
when creating a pool through tomcat?



--
Emerson Cargnin
Analista de Sistemas
Setor de Desenvolvimento de Sistemas - TRE-SC
tel : (048) - 251-3700 - Ramal 3181
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: mod_jk2 build error

2004-04-02 Thread Thomas D. Zeimet
The directory already exists.  The error seems to relate the fact that
mod_jk2.so doesn't exist in the source directory.  But why?  I don't see any
error that points to where the compile is failing.  


--- Walter Truitt [EMAIL PROTECTED] wrote:
 I would try making the directory for it possibly.
 
 I don't know why it does this, but it puts a usr/local/apache2/modules
 directory under the build directory.
 
 /bin/cp ../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so
 ./../../build/jk2/apache2/mod_jk2.so
 /bin/cp: cannot stat
 `../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so': No such
 file or directory
 
 Since it is the copy that is failing, I would look at that.  
 
  -walter
 
  Hi,
  
  I am trying to build the latest release of the JK2 connector:
  jakarta-tomcat-connectors-jk2-2.0.4-src. I'm running Red Hat Linux 9.0,
 Apache
  httpd-2.0.49 and Tomcat jakarta-tomcat-5.0.19.
  
  I follow the directions in
  jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/BUILD.txt
  
  cd jakarta-tomcat-connectors/jk/native2
  ./configure --with-apxs2=/your/path/to/apxs
  make
  cd ../build/jk2/apache2
  apxs -n jk2 -i mod_jk2.so
  
  but the make fails with the following:
  
  libtool: install: warning: remember to run `libtool --finish
  /usr/local/apache2/modules'
  /bin/cp ../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so
  ./../../build/jk2/apache2/mod_jk2.so
  /bin/cp: cannot stat
  `../../../build/jk2/apache2//usr/local/apache2/modules/mod_jk2.so': No such
  file or directory
  make[1]: *** [../../../build/jk2/apache2/mod_jk2.so] Error 1
  make[1]: Leaving directory
 

`/usr2/download/jk/jakarta-tomcat-connectors-jk2-2.0.4-src/jk/native2/server/apache2'
  make: *** [jk2-build] Error 1
  
  The ./configure step ends with the following:
  checking for rm... /bin/rm
  checking for grep... /bin/grep
  checking for echo... /bin/echo
  checking for sed... /bin/sed
  checking for cp... /bin/cp
  checking for mkdir... /bin/mkdir
  no apxs given
  need to check for Perl first, apxs depends on it...
  checking for perl... /usr/bin/perl
  building connector for apache-2.0
  checking checking for apache13.. not provided
  checking checking for apache20.. not provided
  checking checking for iis.. not provided
  checking checking for iPlanet.. not provided
  checking for tomcat33 location... not provided
  checking for tomcat40 location... not provided
  checking for tomcat41 location... not provided
  configure: creating ./config.status
  config.status: creating Makefile
  config.status: creating server/apache13/Makefile
  config.status: creating server/apache13/Makefile.apxs
  config.status: creating server/apache2/Makefile
  config.status: creating server/apache2/Makefile.apxs
  config.status: creating ../build.properties
  config.status: creating scripts/build/unix/dummy
  config.status: executing depfiles commands
  
  I didn't have any problems with the previous JK2 version.  Can anyone give
 me a
  hint on how to resolve this?
  
  Thanks much,
  -Tom
  
  
  __
  Do you Yahoo!?
  Yahoo! Small Business $15K Web Design Giveaway 
  http://promotions.yahoo.com/design_giveaway/
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



RE: problem with url - extra / appended before action

2004-04-02 Thread Yansheng Lin
I am not sure about Context path=/ docBase=myApp/.

I think if you try Context path=/myApp docBase=myApp/, the container will
append a / to the path, i.e., /myApp/***.do.  But if you use Context path=
docBase=myApp/, then that's the default webapp path, which is not something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host
/Engine

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



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


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


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



Session Listeners in separate context?

2004-04-02 Thread Ben Souther
Do sessionListeners reside in a different context from other servlets?

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



RE: Unix utils for Windows?

2004-04-02 Thread Sullivan, Patrick
I highly recommend:

 UnxUtils - GNU utilities for Win32 
This are some ports of common GNU utilities to native Win32. In this
context, native means the executables do only depend on the Microsoft
C-runtime (msvcrt.dll) and not an emulation layer like that provided by
Cygwin tools.

SF seems to be having problems but you can find a copy here:
http://www.cs.nmsu.edu/~jeffery/win32/unxutils.zip



Thank you,

Patrick Sullivan
Centura Health

-Original Message-
From: Shaw, Laurence [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:28 AM
To: Tomcat Users List
Subject: RE: Unix utils for Windows?


Thanks to all, The winner seems to be cygwin.

 -Original Message-
From:   Paul Mansfield [mailto:[EMAIL PROTECTED] 
Sent:   Friday, April 02, 2004 10:16 AM
To: Tomcat Users List
Subject:Re: Unix utils for Windows?

On Fri, 2004-04-02 at 17:03, Shaw, Laurence wrote:
 Does anyone know where I can find a workable version awk for Windows,(

 and for that matter most common [U}[Lin]ix utilities) that will run on

 a windows 2000 box? I was attempting to run the makefile for Apache 
 Server using MS C++  but at the end of the build it  tries to execute 
 an awk script to build the config file for the server and errors 
 because awk can not be found in my environment. I'd prefer not to have

 to run in a unix shell on a windows box, but...

cygwin




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



*
This communication is for the use of the intended recipient only.  It may 
contain information that is privileged and confidential.  If you are not the 
intended recipient of this communication, any disclosure, copying, further 
distribution or use thereof is prohibited.  If you have received this 
communication in error, please advise me by return e-mail or by telephone and 
delete/destroy it.
*

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



TC 5.0.19/W2KPro - Cross Context will not work

2004-04-02 Thread Norris Shelton
I have two contexts.  I have marked both of them as
crossContext=true.  I am able to forward via a
requestDispatcher from the first webapp to the second webapp. 
However, I am getting a NPE in the destination servlet in the
following code:

if (request != null) {
 HttpSession session = request.getSession(true);  -- NPE


Can anyone help?  Does anyone have cross context working?


=

Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton


__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

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



Re: [OT] The Way Java Handles Date

2004-04-02 Thread Denis Haskin
Why does Sun need to do it?  Anyone could do it.  Seems like it could be 
a candidate for Jakarta Commons... or is it too trivial?

http://jakarta.apache.org/commons/

dwh

Yansheng Lin wrote:

As I said, this is a faq.  There is already tutorials on Sun's Website.  But the
way it works now is kind of counter-intuitive.  That's the problem to new user.
Wouldn't it be nicer if Sun came up with an Wrapper interface that allows the
user create a Date object with different arguments?   
 



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


RE: problem with url - extra / appended before action

2004-04-02 Thread Chris
Thanks Tom,

That all looks interesting.  What I have done for the
html:link=/action... page tags is removed the / from the front so when
it adds a / it becomes correct instead of adding a second slash ie //action.
The only problem is that the buttons do not work since they are within a
form tag and in the html:form struts tag the action attribute doesn't
require a / before the action mapping.  I may just have to eliminate all
buttons and use links.  But I hope not.

About the base path, that's the other interesting thing, the extra slash is
added there as well, for example for the product.jsp page the base path is
http://www.companyname.com//pages/product.jsp instead of
http://www.companyname.com/pages/product.jsp

c.



-Original Message-
From: Tom K [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 12:11 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

Hi Chris,

Frames are very inconsistent on different browser, so most
developers try to avoid them. With that said, some times you have to
tune you path to work with the classpath.

First of all see where your path is pointing to by use a few commands
e.g.

String path = request.getContextPath();
System.out.println(The path in SearchResultsPage is  + path);
String basePath =
request.getScheme()+://+request.getServerName()+:+request.getServerP
ort()+path+/;

If you are using a jsp, simply enclose the above code in % %

Now that you know your path info, the next thing to do is determine if
you can make it all work together by tuning your path info.

For example, when viewing your source code html out put, look at the
path, sometime, you need to ad a ../myPath to go back a directory!

Now other times (I don't know exactly what your working with, so excuse
my ignorance) you may have to have a base path set up so all you
relative path information can be base on that. For example you may
need to ad code such as this:

BASE
HREF=%=request.getScheme()+://+request.getServerName()+:+request.ge
tServerPort()+path+/ %

which gives you a base path to work off of.


Any ways...good luck,


Tom Kochanowicz





-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action

Hello,

 

I have an application that uses frames.  The problem that I am
experiencing
is that when I go to a page that loads a new frameset all of my links
and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are
all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra /
is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat
standalone no
apache involved) onto a linux box.  The problem does not occur when I
test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 


-
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: problem with url - extra / appended before action

2004-04-02 Thread Chris
Actually Yan, that might be something that I want since I am only serving
out one web application and I want it to be mapped to the domain
www.myapp.com 

Is that what specifying Context path= docBase=myApp/

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 12:51 PM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

I am not sure about Context path=/ docBase=myApp/.

I think if you try Context path=/myApp docBase=myApp/, the container
will
append a / to the path, i.e., /myApp/***.do.  But if you use Context
path=
docBase=myApp/, then that's the default webapp path, which is not
something
you want.  But the other thread is a good starting point, take a look at the
request header too.  

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:58 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action


Yan,

Thanks for the reply.  

The context for my application is as follows (well the engine element and
onwards):
Engine name=Catalina defaultHost=localhost debug=0

  Host name=localhost debug=0 appBase=webapps unpackWARs=true
autoDeploy=true xmlValidation=false xmlNameSpaceAware=false

 Context path=/ docBase=myApp/

  /Host
/Engine

This is not the way it is set up on my windows development box.  But
everything does work in windows using eclipse and sysdeo tomcat so I don't
believe it would have anything to do with my action mappings.  I believe it
must be a tomcat configuration thing.

c.

-Original Message-
From: Yansheng Lin [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 10:41 AM
To: 'Tomcat Users List'
Subject: RE: problem with url - extra / appended before action

it's hard to say what's causing the problem exactly without knowing your
context
and your action-mappings.  maybe in your action mapping, you have one extra
/ in
front.  and tomcat would add that to the requestURL?

-Yan

-Original Message-
From: Chris [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 02, 2004 9:56 AM
To: [EMAIL PROTECTED]
Subject: problem with url - extra / appended before action


Hello,

 

I have an application that uses frames.  The problem that I am experiencing
is that when I go to a page that loads a new frameset all of my links and
buttons work correctly - that is they produce the correct url:
www.companyname.com/action.do?parameter1=blah .  Now when I click one of
these links it populates a new page in the frameset, but the links are all
messed up.  They all include an extra /  before the action name:
www.companyname.com//action.do?parameter=blah
http://www.companyname.com/action.do?parameter=blah  .  This extra / is
also found in the base href=./ element for these pages.

 

This problem only occurs when I deploy the application (tomcat standalone no
apache involved) onto a linux box.  The problem does not occur when I test
things on my windows box using eclipse and the tomcat sysdeo plugin.

 

Any idea what is going on here?   

 

Thanks,

 

c.



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



Session Listeners in separate context?

2004-04-02 Thread Ben Souther
Do sessionListeners reside in a different context from other servlets?
I'm trying to create a session listener that stores the sessions in a context scoped 
Object.  
For some reason, other servlets can't seem to access the the object.



/**
 * Adds a reference to the new session to the activeUsersList
 */
public void sessionCreated(HttpSessionEvent event){
HttpSession session  = event.getSession();   
ServletContext context   = session.getServletContext();
Hashtable activeUserList = (Hashtable)context.getAttribute(activeUserList);
if(activeUserList == null){   
activeUserList = new Hashtable();
}
activeUserList.put(session.getId(), session);
context.setAttribute(activeUserList, activeUserList);
}




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



RE: TC 5.0.19/W2KPro - Cross Context will not work

2004-04-02 Thread Shapira, Yoav

Hi,

if (request != null) {
 HttpSession session = request.getSession(true);  -- NPE

The stack trace points to this line as the NPE line?  Are you sure?  Can
you post the stack trace?

Yoav Shapira



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]



RE: Session Listeners in separate context?

2004-04-02 Thread Shapira, Yoav

Hi,
No.  I don't know why the code you posted wouldn't work, it looks fine.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 2:59 PM
To: Tomcat Users List
Subject: Session Listeners in separate context?

Do sessionListeners reside in a different context from other servlets?

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



Re: Session Listeners in separate context?

2004-04-02 Thread Ben Souther
Thanks


On Friday 02 April 2004 03:07 pm, Shapira, Yoav wrote:
 Hi,
 No.  I don't know why the code you posted wouldn't work, it looks fine.

 Yoav Shapira
 Millennium Research Informatics

 -Original Message-

 From: Ben Souther [mailto:[EMAIL PROTECTED]

 Sent: Friday, April 02, 2004 2:59 PM
 To: Tomcat Users List
 Subject: Session Listeners in separate context?
 
 Do sessionListeners reside in a different context from other servlets?
 
 -
 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]

-- 
Ben Souther
F.W. Davison  Company, Inc.


This e-mail message, and any accompanying documents, is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.  Any unauthorized review, use, disclosure, distribution or
copying is prohibited.  If you are not the intended recipient, please
contact our office by email or by telephone at (508) 747-7261 and
immediately destroy all copies of the original message.

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



  1   2   >