Re: Tomcat Configuration with Apache Virtual Hosts

2004-04-05 Thread Adrian Lanning
Hi Mike,

jk_module and JkMount will only work if you are using JK.  You are using JK2
so you should go back to your original configuration.

Looking back at your log output, I noticed an error about a JNI lib not
being found.  I am fairly certain that using Unix Sockets requires JNI so
that may be the root cause of your problem.  Make sure you compiled jk2 with
jni and that the jni lib (jkjni.so) is in the right location.

Maybe you should just try using regular channel sockets rather than unix
sockets ( it seems to be defaulting to that anyways but I don't know for
sure).

hth,
Adrian Lanning

 snip from your log output 
INFO: APR not loaded, disabling jni components: java.io.IOException:
java.lang.UnsatisfiedLinkError: /usr/local/apache2/modules/jkjni.so:
/usr/local/apache2/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno
Mar 25, 2004 11:50:11 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
 end snip 

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



Re: Question on debuggin JNDI/prepared statement in a bean

2004-03-26 Thread Adrian Lanning
This topic doesn't really have anything to do with Tomcat so you might have
better luck receiving help on some other mailing list.  Anybody know which
list he should be posting to?

What is the actual problem you are having?

Do you execute your prepared statement somewhere?

Adrian


- Original Message - 
From: Harry Mantheakis [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, March 26, 2004 3:28 AM
Subject: Re: Question on debuggin JNDI/prepared statement in a bean


Hello

 pstmt.setString(1,ClassifiedAd);
 pstmt.setString(2,UniqueDateId);

Are those two parameters - 'ClassifiedAd' and 'UniqueDateId' - variables?
They should be, and if so, where do you declare and initialise them? They do
not appear in the method you posted.

Harry


 I am frustrated trying to debug a prepared statement within a bean; what
 am I doing wrong?; ANY clues appreciatedS
 It is not throwing any exceptions yet I methodically went over the code;
 granted this is the first time I used beans versus servlets.

 Can anyone point me to a good example (JNDI, JSP, JavaBean, Resultset)

 Code within bean:

 private void prepareStatement(){
   try{

   Context env = (Context) new
 InitialContext().lookup(java:comp/env);
   pool = (DataSource) env.lookup(jdbc/myDB);

   if (pool == null)
   throw new NamingException(`jdbc/ myDB ' is an
 unknown DataSource);



 //dbConnection = null;
 dbConnection = pool.getConnection();


 String SQLCmd =
 select * from AdInfoView where Classification = ?
 
  + and UniqueDateId  ? order by UniqueDateId
 desc;

 pstmt = dbConnection.prepareStatement(SQLCmd);
 // TEST Exception thrown here.
 //pstmt.setString(1,searchWord);
 pstmt.setString(1,ClassifiedAd);
 pstmt.setString(2,UniqueDateId);

   }catch(Exception e){
 System.err.println(Problem preparing statement  +
 e.getMessage() + e.getCause());
   }
 }

 ---
 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: Question on debuggin JNDI/prepared statement in a bean

2004-03-26 Thread Adrian Lanning
Hey Tom,

When I said your thread was off-topic I didn't mean to imply you couldn't
post your question!  Sorry if that's how it came across.  Just thought you
should mark it [OT] as Yoav pointed out. It appears I was wrong anyways; I
missed the part about it working in Resin and not in Tomcat.

As for your question, what is it exactly that goes wrong with your app now
that its running under Tomcat and not Resin?  Trouble getting the data to
your jsp?  Is it not starting up?  The code you posted doesn't actually DO
anything so I'm guessing that's just an example you put together to
illustrate what you're trying to do?

Could you post the parts of your Context regarding the jndi resource you are
configuring?

Adrian

- Original Message - 
From: Tom K [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, March 26, 2004 9:41 AM
Subject: RE: Question on debuggin JNDI/prepared statement in a bean


Harry,

Yes the ClassifiedAd and UniqueDateId are two parameters taken
from an html form, the values of ClassifiedAd and UniqueDateId are used
in a prepared statement for substitution of ? and ? the results are then
forwarded to a results jsp, which used the getXXX() to retrieve the
values from the bean.
I have this code working in another form as a Servlet using JNDI
and prepared statements. In the servlet the JNDI connection is made in
the init(blah, blah) and calls the super.init(config) which I
super.init(config) is implicit from reading the Tomcat docs.
The bottom line on this, is how do you set up a JNDI connection
in a bean, use a prepared statement (in a bean), retrieve a resultset
and forward the result for the results jsp to retrieve the value from
the bean.

Finally, I apologize to those who feel this is off topic. I have similar
code working in Resin but for the life of me, I can't get it working
with Tomcat 5  :-(   I searched all the archives and can't find a good
example for doing this.

TIA Tom K.






-Original Message-
From: Harry Mantheakis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 26, 2004 2:29 AM
To: Tomcat Users List
Subject: Re: Question on debuggin JNDI/prepared statement in a bean

Hello

 pstmt.setString(1,ClassifiedAd);
 pstmt.setString(2,UniqueDateId);

Are those two parameters - 'ClassifiedAd' and 'UniqueDateId' -
variables?
They should be, and if so, where do you declare and initialise them?
They do
not appear in the method you posted.

Harry


 I am frustrated trying to debug a prepared statement within a bean;
what
 am I doing wrong?; ANY clues appreciated
 It is not throwing any exceptions yet I methodically went over the
code;
 granted this is the first time I used beans versus servlets.

 Can anyone point me to a good example (JNDI, JSP, JavaBean, Resultset)

 Code within bean:

 private void prepareStatement(){
   try{

   Context env = (Context) new
 InitialContext().lookup(java:comp/env);
   pool = (DataSource) env.lookup(jdbc/myDB);

   if (pool == null)
   throw new NamingException(`jdbc/ myDB ' is an
 unknown DataSource);



 //dbConnection = null;
 dbConnection = pool.getConnection();


 String SQLCmd =
 select * from AdInfoView where Classification = ?
 
  + and UniqueDateId  ? order by UniqueDateId
 desc;

 pstmt = dbConnection.prepareStatement(SQLCmd);
 // TEST Exception thrown here.
 //pstmt.setString(1,searchWord);
 pstmt.setString(1,ClassifiedAd);
 pstmt.setString(2,UniqueDateId);

   }catch(Exception e){
 System.err.println(Problem preparing statement  +
 e.getMessage() + e.getCause());
   }
 }

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

---
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: [OT] Needed : New home(s) for Tomcat on Linux StepByStep

2004-03-25 Thread Adrian Lanning
Chong,

I think the wiki idea is a great one but have you thought about asking any
of the online Java magz or sites about hosting it for you?  It seems to me
that the more traffic they get, the happier they are.  You would have to put
up with ads on your tut, of course.  I have seen several tutorials /
walkthroughs on such sites.

Besides the ads, the only problem might be change control since I'm not sure
how often they let authors edit articles.

Adrian


- Original Message - 
From: Chong Yu Meng [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 12:20 PM
Subject: Re: [OT] Needed : New home(s) for Tomcat on Linux StepByStep


 Hi Tim !

 Tim Funk wrote:

  The drawback (which is a good drawback!) is the tomcat4 and tomcat5
  links below contain many files and can easily grow to many more as it
  becomes more comprehensive.
 
 Thanks, Tim !

  The docs are not FAQ worthy but definitely worth linking to from the
FAQ.

 Well, the documents weren't written to be a FAQ, and I think the
 structure does not lend itself well to a FAQ. The reason why I wrote it
 that way was because a lot of answers in FAQs assume or require a level
 of understanding that newbie Tomcat administrators may not possess.
 Instead of trying to cover the background and theory behind every
 question, I thought a walk-through tutorial would be  a more effective
 way of building up understanding of the product.

 
  Here is my preference ...
  Copy the content of http://cymulacrum.net/writings/tomcat5/book1.html
  and http://cymulacrum.net/writings/tomcat4/book1.html to the Wiki.
 
  The book (after being copied to wiki) could be linked from the above
  links OR we could create a new link in the FAQ.
 
  This way - anyone may maintain/add/edit the content without needing
  any additional privledges.
 
 Actually, I like the Wiki idea, but maybe more along the lines of the
 MySQL documentation (http://www.mysql.com/doc/en/index.html), where
 users can add sections and comments. This would maintain the narrative
 integrity while allowing for digressions.

  I like it when many different people can(and do) write docs. Even if
  10 people write about the same thing - they may say it in different
  ways, have a different nuance with their writing style, or emphasis a
  particular problem they had which can be helpful to such a diverse
  audience.

 I think we need more people writing docs for Tomcat. Though installation
 and basic configuration is covered quite well, and there is a LOT of
 stuff out there on Apache connectors, some advanced stuff, like writing
 your own realms or JNDI realms, or even the recent discussions about
 JNDI datasources are not covered -- or if they are, not adequately.

 
  Some people may be thinking this is kludgey. Yes it is. But I think
  its an OK tradeoff so we can keep the barrier of documentation
  creation low.
 
 Here, here. But I need to say a little something about my documents. The
 original document is actually in Docbook format, and I generate the HTML
 from that document using docbook utilities. If you want to put it into
 the Wiki, you'll need only the HTML (without the masthead), am I right ?
 I've never used Wiki before, so I may need help here.

 

 -- 
 Men never do evil so completely and cheerfully as when they do it from
 religious conviction.
 -- Blaise Pascal
 ++
 | Pascal Chong   |
 | email: [EMAIL PROTECTED]  |
 ||
 | Please visit my site at : http://cymulacrum.net|
 | If you're using my documentation, please read the Terms and|
 | and Conditions at http://cymulacrum.net/terms.html |
 ++



 -
 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] Needed : New home(s) for Tomcat on Linux StepByStep

2004-03-25 Thread Adrian Lanning
Hey Chong,

How much daily bandwidth does hosting your tut currently use?

If it takes less than 50MB per day you can use SDF to host it.

SDF is a non-profit organization promoting Internet education.  Basically
they have a big cluster of 64-bit servers running NetBSD that they give out
shell access to.  You can find out more about them here:
http://www.freeshell.org
http://www.freeshell.org/index.cgi?faq?BASICS?01

Here is the information on bandwidth usage limits:
http://sdf.lonestar.org/over

Since its a non-profit once you go over quota, users get redirected to the
over page rather than the site staying up and you getting billed.


I have found it to be a really great deal.  An ARPA membership (50MB
transfer limit / day) costs $36 (US) and is a one-time fee (can you believe
it?).  There is no monthly or yearly cost.  I have been a member for over a
year and have a friend who's been a member for over 10 years...

Disclaimer for the paranoid:
  I am not affiliated with SDF in any way other than having paid my $36.
No, I'm not being paid to promote it.  No, there are no banner ads or such.
Yes, I am still waiting for them to close up shop and steal my $36!  :-)

On the flip-side, I have found their service to be reliable and have my
personal website hosted there (that's why I paid the $36).


Hope that helps!
Adrian

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



Re: Configuration Help

2004-03-24 Thread Adrian Lanning
server.xml looks fine as far as I can tell.  Here's what you should do:

1. Verify Tomcat host is working correctly.
To verify that you've got tomcat working correctly with your domain name
change your dev.dynamichostings.com host's appBase to be the same as
localhost's and then try:
http://dev.dynamichostings.com:8080

If you get the tomcat welcome screen (which you will) you know you've set up
the host correctly.
http://localhost:8080http://dev.dynamichostings.com:8080  are now
equivalent as far as Tomcat is concerned.

2. Get your webapp working with Standalone (port 8080)
Verify that your webapp is working correctly by trying:
http://localhost:8080/dynamichostings  OR
http://dev.dynamichostings.com:8080/dynamichostings

(Incidentally, I get a 503 when i try
http://66.80.144.156:8080/dynamichostings so your webapp isn't working now).


3. Get Tomcat connected to Webserver
This is when you get http://dev.dynamichostings.com/dynamichostings to work.
Set up your IIS + JK2 or whatever you are going to use to direct the
requests to Tomcat as appropriate.

4. Point http://dev.dynamichostings.com directly to your webapp.
Change the appBase to point directly to your webapps folder.
Make a new folder under TOMCAT_HOME/conf/Catalina/ called
dev.dynamichostings.com
Make a new file in that folder called webapp.xml (ie. dynamichostings.xml).
In webapp.xml, place a blank context like this:
Context path= docBase= debug=0 privileged=true/Context


And that should do it. If you follow these steps then when you have errors
you will know exactly which component is causing the errors.  As opposed to
now when it could be any one of many things.

Hope that helps,
Adrian





- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 9:33 AM
Subject: RE: Configuration Help


Ok, I've changed the server.xml file so that engine and at least one
host reference localhost. The ultimate goal is to have Tomcat support
multiple individual web applications and not have multiple context
configurations for one host.

Before, when the server.xml file was configured to use the server's ip
address I was able to get the following URL to work:
http://66.80.144.156/dynamichostings

Now that no longer works since I've changed it to use localhost. I can
only get this URL to work: http://66.80.144.156:8080/dynamichostings

Ultimately I'm trying to get the following to work:
http://dev.dynamichostings.com and several other web applications.


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



Re: Configuration Help

2004-03-24 Thread Adrian Lanning
Works for me!  Glad you got it working.

Cheers on deciding to compile a doc.  As for where to put it...there's a
tomcat wiki at http://wiki.apache.org/jakarta-tomcat/Tomcat
that would be a likely place.  If you have some advice for IIS users on
connecting to Tomcat using JK2 you should let the jk guys know about it and
maybe it'll end up on the connector page.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/
A how-to down at the bottom of the left menu, for example.

Adrian


- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 1:58 PM
Subject: RE: Configuration Help


Oh My Gosh!

Adrian,

Apparently what was missing was the subfolder named
dev.dynamichostings.com with the blank context. Everything else apparently
was configured correctly. Once I created those items it worked immediately.

If you would be so kind as to please verify this for me to ensure I'm not
hallucinating I would very much appreciate it.
http://dev.dynamichostings.com

If you test confirms this configuration I would like to put together a
document that outlines the steps that have been taken to get this working so
others can benefit. Where should something like this be located?

Thank you ever so much!

-Dave

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 12:36 PM
To: Tomcat Users List
Subject: Re: Configuration Help


server.xml looks fine as far as I can tell.  Here's what you should do:

1. Verify Tomcat host is working correctly.
To verify that you've got tomcat working correctly with your domain name
change your dev.dynamichostings.com host's appBase to be the same as
localhost's and then try:
http://dev.dynamichostings.com:8080

If you get the tomcat welcome screen (which you will) you know you've set up
the host correctly.
http://localhost:8080http://dev.dynamichostings.com:8080  are now
equivalent as far as Tomcat is concerned.

2. Get your webapp working with Standalone (port 8080)
Verify that your webapp is working correctly by trying:
http://localhost:8080/dynamichostings  OR
http://dev.dynamichostings.com:8080/dynamichostings

(Incidentally, I get a 503 when i try
http://66.80.144.156:8080/dynamichostings so your webapp isn't working now).


3. Get Tomcat connected to Webserver
This is when you get http://dev.dynamichostings.com/dynamichostings to work.
Set up your IIS + JK2 or whatever you are going to use to direct the
requests to Tomcat as appropriate.

4. Point http://dev.dynamichostings.com directly to your webapp.
Change the appBase to point directly to your webapps folder.
Make a new folder under TOMCAT_HOME/conf/Catalina/ called
dev.dynamichostings.com
Make a new file in that folder called webapp.xml (ie. dynamichostings.xml).
In webapp.xml, place a blank context like this:
Context path= docBase= debug=0 privileged=true/Context


And that should do it. If you follow these steps then when you have errors
you will know exactly which component is causing the errors.  As opposed to
now when it could be any one of many things.

Hope that helps,
Adrian





- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 9:33 AM
Subject: RE: Configuration Help


Ok, I've changed the server.xml file so that engine and at least one
host reference localhost. The ultimate goal is to have Tomcat support
multiple individual web applications and not have multiple context
configurations for one host.

Before, when the server.xml file was configured to use the server's ip
address I was able to get the following URL to work:
http://66.80.144.156/dynamichostings

Now that no longer works since I've changed it to use localhost. I can
only get this URL to work: http://66.80.144.156:8080/dynamichostings

Ultimately I'm trying to get the following to work:
http://dev.dynamichostings.com and several other web applications.


-
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: Configuration Help

2004-03-23 Thread Adrian Lanning
Hi Dave,
Did you ever solve this problem?

Actually, 400 error is malformed syntax. Basically doesn't tell us much in
this situation besides configuration screwed up.

I don't use IIS so don't know how to from first-hand experience.  Searching
turns up stuff on connecting using jk rather than jk2.  Have you tried
getting jk to work?

Have you looked at:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

Also try:
http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html

hth,
Adrian



- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 10:15 AM
Subject: RE: Configuration Help


Adrian,

The 400 error is indicating that the page has been moved, server might not
be available... blah, blah

This URL will display the web app I'm working with...
http://66.80.144.156/dynamichostings/
But if I try this URL I get the error
http://dev.dynamichostings.com

I think I'm close I just don't know what configuration change I need to make
at this point. I've been told that by mapping the isapi_redirector2.dll in
IIS it should work

There has to be someone else who is successfully using IIS and Tomcat 5 out
there

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:15 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hey Dave,

I'm a little fuzzy on my errors.  Is 400 from iis or tomcat?  Does tomcat
work with the urls in standalone mode?

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:17 AM
Subject: Configuration Help


For over a week I have been unable to get Tomcat 5 configured with IIS 5.

I know the Tomcat server is working because I can get to the management
console from the IP address:8080 and the two example web apps are working,
both from the IP address:8080/servlet-examle  and without the port...

I have created a web app instance which I can access from the IP
address:8080/webapp and IP address/webapp, but when I attempt to access it
from the URL I get a 400 error.

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.

Can anyone help explain what I need to do in order to access the web app by
the URL?

In IIS I have configured the isapi_redirector2.dll at the root server level
and in the web app I'm trying to get working I created a virtual directory
named jakarta. I have made all the necessary registry entries required to
support the .dll.

Thanks,
Dave

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


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


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


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



Re: Login by parameters (no prompts)

2004-03-23 Thread Adrian Lanning
Hi Jonathan,
Did you solve your problem?

Earlier you asked if you could send two requests, one to log in and another
to download the stuff.  You absolutely can as this is how browsers work.
You just need to keep the session id that tomcat sends back in the header
once you log in and resend it in the header with your new request to
download.  Tomcat can't tell and doesn't care what kind of client you are
using.  I have done this before to make a mass upload desktop tool for a
webapp that only let users upload photos one-at-a-time.

I've never used wget so the next question is can you use wget with custom
headers?  Googling real quick I found you can tell wget to save the cookies
like this:
  wget --keep-session-cookies --save-cookies login.txt PAGE-URL
Since it lets you save the cookies, I'm sure there's a way to use the
cookies again...

If you don't want to do that and you are still having problems you could do
your own authentication rather than container-based.  I mean let all
requests come through as far as Tomcat is concerned but then validate
against a session var in your webapp.  Then you can set up your app to check
for GET vars as well as POST vars (ie. check with
request.getParameter(...) too).  Try JPetStore 3 by Clinton Begin
(www.ibatis.com) as a reference if you've never done this before.  I haven't
tried version 4 yet so don't know if it uses container-based authentication
or not.

hth,
Adrian Lanning



- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 7:21 PM
Subject: Re: Login by parameters (no prompts)


  I don't think so.  The server doesn't care what is requesting the file
  (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as
  it's a valid request.  Your options are still open there.

 This is true.  Although the means of getting the username and password
 into the request is the crux of the problem.  That is where I need a
 solution.  If you are saying that every client will have its own method of
 achieving this, then I agree.  Except that we still haven't established
 that Tomcat will handle it properly using FORM authentication.

  What you might actually be looking at is designing an app to take a
 couple of
  authentication methods (basic  form) depending on the client and just
  send back the file.

 Are you suggesting a second web container that will only handle
 programmatic downloads?  I don't think that the company will go for that
 solution.  If this is not your suggestion, then I assume we are talking
 about configuring Tomcat to handle both types (FORM and BASIC) at the same
 time.  I haven't figured out how to do that.

 Thanks for all the time you're putting into this.  I appreciate it.
 Jonathan.





 David Smith [EMAIL PROTECTED]
 03/22/2004 04:19 PM
 Please respond to Tomcat Users List

 To: Tomcat Users List [EMAIL PROTECTED]
 cc:
 Subject:Re: Login by parameters (no prompts)


 I don't think so.  The server doesn't care what is requesting the file
 (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as
 it's a valid request.  Your options are still open there.  What you
 might actually be looking at is designing an app to take a couple of
 authentication methods (basic  form) depending on the client and just
 send back the file.

 As far as wget is concerned, take a look at the man pages for it or even
 curl.  Corporate policy shouldn't prohibit it given it does the same
 thing your Netscape or IE is doing, but then again all my work
 experience is at a university.  I have no idea what a corporate
 environment would be like.  I'm not a student - those lucky dogs are on
 Spring Break now :-(.

 --David

 [EMAIL PROTECTED] wrote:

 Yeah, that might work (we'd have to test it).  However, this implies that


 we tie ourselves to WGET as a client app, which we cannot do.  The
 customer controls his own infrastructure and may not have WGET (he might
 be on one of the many Windows platforms out there) or may have a
 corporate
 policy that prohibits the use of WGET.  The same is true of any possible
 client app.  They may even have written their own solution for polling
 the
 downloadable data (as I've seen done in the past).
 
 *sigh*  The best solution would be to authenticate and download in a
 single request.  But how?
 
 Thanks.
 Jonathan.
 
 
 
 
 
 David Smith [EMAIL PROTECTED]
 03/22/2004 03:04 PM
 Please respond to Tomcat Users List
 
 To: Tomcat Users List [EMAIL PROTECTED]
 cc:
 Subject:Re: Login by parameters (no prompts)
 
 
 I was just looking through the man page for wget.  It looks like you
 have the option of using --http-user=... and --http-passwd=... on the
 command line.  Wget will use BASIC or Digest depending on what the
 server wants.  Is that anything you might be able to use?
 
 --David
 
 [EMAIL PROTECTED] wrote:
 
 
 
 Generally, David, I would agree with you about

Re: Struts 1.1 +Tomcat 4.0.4 -- RequestProcessor - Exception

2004-03-23 Thread Adrian Lanning
Hi,
You might have more luck with this in the struts-user mailing list.

Are you using a custom request processor?  If so did you extend
org.apache.struts.action.RequestProcessor or
org.apache.struts.tiles.TilesRequestProcessor?

Adrian


- Original Message - 
From: Namasivayam, Sudhakar (Cognizant) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 12:27 AM
Subject: Struts 1.1 +Tomcat 4.0.4 -- RequestProcessor - Exception




Hi all,

This error happens only in Tomcat 4.0  and not Tomcat 5.0.19 in Linux 7.0.
Am i missing any library files? I have put the latest library files. I did
find similar mail in the struts archives but no response to that...  Or is
this the problem with my manager webapp?

  I do not get Class cast exception message when i stop and start the
webapp. Only when a action is invoked this exception occurs!!
Both the times( stop-start   and   action.do ) it is trying to get the same
RequestProcessor object but the second time it throws an error.

If i insert a try catch block in the ActionServlet class,it works fine...
Can any one explain me why this exception occurs?
I did  verify that  getServletContext().getAttribute(key);  in
ActionServlet.java:855 returns a RequestProcessor object.
Pls find the log and my server.xml at the end of the mail.

Thanks in advance,
Sudhakar


 2004-03-22 15:18:09 Manager: start: Starting web application at '/sfpsr2'
 2004-03-22 15:18:09 StandardHost[localhost]: standardHost.start /sfpsr2
 2004-03-22 15:18:09 StandardContext[/sfpsr2]: Configuring ProxyDirContext
[EMAIL PROTECTED]
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploying class repositories to
work directory /usr/local/tomcat4.0.4/work/Agent8050/localhost/sfpsr2
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/activation.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/activation.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/classes12.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/classes12.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-beanutils.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-beanutils.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-collections.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-collections.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-dbcp-1.1.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-dbcp-1.1.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-digester.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-digester.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-fileupload.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-fileupload.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-lang.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-lang.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-logging.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-logging.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-logging1.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-logging1.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-validator.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-validator.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/jakarta-oro.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/jakarta-oro.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/log4j-1.2.8.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/log4j-1.2.8.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR /WEB-INF/lib/mail.jar
to /usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/mail.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/servlet.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/servlet.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/struts.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/struts.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/struts2.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/struts2.jar
 2004-03-22 15:18:09 StandardManager[/sfpsr2]: Seeding random number
generator class java.security.SecureRandom
 2004-03-22 15:18:09 StandardManager[/sfpsr2]: Seeding of random number
generator has been completed
 2004-03-22 15:18:10 ContextConfig[/sfpsr2]: Added certificates - request
attribute Valve
 2004-03-22 15:18:10 Initializing application variables
 2004-03-22 15:18:11 StandardWrapper[/sfpsr2:default]: Loading container
servlet default
 2004-03-22 15:18:11 default: init
 2004-03-22 15:18:11 jsp: init
 2004-03-22 15:18:12 StandardWrapper[/sfpsr2:ssi]: Loading container servlet
ssi
 2004-03-22 15:18:12 ssi: 

Re: Configuration Help

2004-03-23 Thread Adrian Lanning
Hmm,

Do you have Tomcat set up to listen on port 80? (you shouldn't)

Can you get to your webapp correctly using localhost?  Try setting up a test
host in your server.xml file with name=www.example.com and then edit your
hosts file to point 127.0.0.1 to www.example.com.  Then try connecting to
http://www.example.com:8080/yourWebApp and report your findings.

Earlier you said:

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.


Do you mean that you've set defaultHost to your IP address?  Try setting
your engine's defaultHost and your host's name to the domain name:
dev.dynamichostings.com


Please post your server.xml file.

Adrian


- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:10 AM
Subject: RE: Configuration Help


Thanks for the links below. I've been looking at anything I can find and as
far as I can tell, I have IIS configured to support Tomcat.

The following link serves the web app I'm trying to configure, but it only
serves it from the ip address and not the URL

http://66.80.144.156/dynamichostings

I'm trying to get it to work from this url: http://dev.dynamichostings.com

I'm almost 100% positive it has something to do with the server.xml file
because if my IIS wasn't configured correctly, the first url example
wouldn't work.

I've even tried to contact the support people at JBoss but they wouldn't
talk with me unless I purchased either a $5K or $10K support package

This shouldn't be this difficult to get working

-Dave

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 7:30 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hi Dave,
Did you ever solve this problem?

Actually, 400 error is malformed syntax. Basically doesn't tell us much in
this situation besides configuration screwed up.

I don't use IIS so don't know how to from first-hand experience.  Searching
turns up stuff on connecting using jk rather than jk2.  Have you tried
getting jk to work?

Have you looked at:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

Also try:
http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html

hth,
Adrian



- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 10:15 AM
Subject: RE: Configuration Help


Adrian,

The 400 error is indicating that the page has been moved, server might not
be available... blah, blah

This URL will display the web app I'm working with...
http://66.80.144.156/dynamichostings/
But if I try this URL I get the error
http://dev.dynamichostings.com

I think I'm close I just don't know what configuration change I need to make
at this point. I've been told that by mapping the isapi_redirector2.dll in
IIS it should work

There has to be someone else who is successfully using IIS and Tomcat 5 out
there

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:15 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hey Dave,

I'm a little fuzzy on my errors.  Is 400 from iis or tomcat?  Does tomcat
work with the urls in standalone mode?

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:17 AM
Subject: Configuration Help


For over a week I have been unable to get Tomcat 5 configured with IIS 5.

I know the Tomcat server is working because I can get to the management
console from the IP address:8080 and the two example web apps are working,
both from the IP address:8080/servlet-examle  and without the port...

I have created a web app instance which I can access from the IP
address:8080/webapp and IP address/webapp, but when I attempt to access it
from the URL I get a 400 error.

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.

Can anyone help explain what I need to do in order to access the web app by
the URL?

In IIS I have configured the isapi_redirector2.dll at the root server level
and in the web app I'm trying to get working I created a virtual directory
named jakarta. I have made all the necessary registry entries required to
support the .dll.

Thanks,
Dave

-
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: workers.properties and virtual hosts

2004-03-23 Thread Adrian Lanning
JK tut:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html

As staf pointed out you can use the same worker.  Use localhost.

Adrian

- Original Message - 
From: staf wagemakers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:28 AM
Subject: Re: workers.properties and virtual hosts


 On Tue, Mar 23, 2004 at 02:01:34PM +0100, Michael Kastner wrote:
 
  I am trying to install tomcat5 with apache 1.3 using the mod_jk
connector.
 
  On my test system I've got several virtual hosts. Do I have to create a
  separate worker for each virtual host?
 
  E.g.:
 
  worker.list= worker1, worker2, worker3
 
  worker.worker1.type=ajp13
  worker.worker1.host=host1.linuxstation2
  worker.worker1.port=8009
 
  worker.worker2.type=ajp13
  worker.worker2.host=host2.linuxstation2
  worker.worker2.port=8009
 
  worker.worker3.type=ajp13
  worker.worker3.host=host3.linuxstation2
  worker.worker3.port=8009
 
 
  Any help is very much appreciated.
 

 Depends on what you mean by virtualhosts, if you have one tomcat
 server with several virtualnamehosts it's possible to do it with one ajp
 connector.

 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html

 describes howto setup virtualhosts with jk2. The setup for jk1 is very
 similar.

 -- 
 Staf Wagemakers

 email: staf at patat.org
 homepage: http://staf.patat.org

 -
 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: Configuration Help

2004-03-23 Thread Adrian Lanning
As I understand it, you should not be using the IP address in server.xml
except to limit the connector to a specific IP address if you don't want
Tomcat to answer requests for other IPs.

In production you can use localhost for a host and use your domain as an
alias.  Or you can get rid of localhost altogether and just set up your
domain as a host.

We need to set up a control so follow the steps I recommended in my last
email and post your results to the list.  Also, please post your server.xml
file.

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:42 AM
Subject: RE: Configuration Help


The server.xml file is using the default port settings (8080 and 8009) and
instead of localhost or 127.0.0.1, I'm using the server's ip address.

Even though this is a web server, should I have the server.xml file
configured to use localhost instead of the server's ip address?

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 8:43 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hmm,

Do you have Tomcat set up to listen on port 80? (you shouldn't)

Can you get to your webapp correctly using localhost?  Try setting up a test
host in your server.xml file with name=www.example.com and then edit your
hosts file to point 127.0.0.1 to www.example.com.  Then try connecting to
http://www.example.com:8080/yourWebApp and report your findings.

Earlier you said:

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.


Do you mean that you've set defaultHost to your IP address?  Try setting
your engine's defaultHost and your host's name to the domain name:
dev.dynamichostings.com


Please post your server.xml file.

Adrian


- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:10 AM
Subject: RE: Configuration Help


Thanks for the links below. I've been looking at anything I can find and as
far as I can tell, I have IIS configured to support Tomcat.

The following link serves the web app I'm trying to configure, but it only
serves it from the ip address and not the URL

http://66.80.144.156/dynamichostings

I'm trying to get it to work from this url: http://dev.dynamichostings.com

I'm almost 100% positive it has something to do with the server.xml file
because if my IIS wasn't configured correctly, the first url example
wouldn't work.

I've even tried to contact the support people at JBoss but they wouldn't
talk with me unless I purchased either a $5K or $10K support package

This shouldn't be this difficult to get working

-Dave

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 7:30 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hi Dave,
Did you ever solve this problem?

Actually, 400 error is malformed syntax. Basically doesn't tell us much in
this situation besides configuration screwed up.

I don't use IIS so don't know how to from first-hand experience.  Searching
turns up stuff on connecting using jk rather than jk2.  Have you tried
getting jk to work?

Have you looked at:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

Also try:
http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html

hth,
Adrian



- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 10:15 AM
Subject: RE: Configuration Help


Adrian,

The 400 error is indicating that the page has been moved, server might not
be available... blah, blah

This URL will display the web app I'm working with...
http://66.80.144.156/dynamichostings/
But if I try this URL I get the error
http://dev.dynamichostings.com

I think I'm close I just don't know what configuration change I need to make
at this point. I've been told that by mapping the isapi_redirector2.dll in
IIS it should work

There has to be someone else who is successfully using IIS and Tomcat 5 out
there

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:15 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hey Dave,

I'm a little fuzzy on my errors.  Is 400 from iis or tomcat?  Does tomcat
work with the urls in standalone mode?

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:17 AM
Subject: Configuration Help


For over a week I have been unable to get Tomcat 5 configured with IIS 5.

I know the Tomcat server is working because I can get to the management
console from the IP address:8080 and the two example web apps

Re: Which Engine is Which

2004-03-23 Thread Adrian Lanning
Hi,
Let's define some terminology so we don't confuse ourselves.
Engine - when talking about Tomcat engine means engine as per tomcat's
configuration file.
Servlet - programs that process / handle requests.

The program (servlet) that processes jsps is a servlet just like any custom
servlet you write.

The only difference is that the servlet that handles jsps is defined for you
TOMCAT_HOME/conf/web.xml as:

servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namefork/param-name
param-valuefalse/param-value
/init-param
init-param
param-namexpoweredBy/param-name
param-valuefalse/param-value
/init-param
load-on-startup3/load-on-startup
/servlet

!-- The mapping for the JSP servlet --
servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.jsp/url-pattern
/servlet-mapping

servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.jspx/url-pattern
/servlet-mapping



For your own servlets you define your own web.xml file with your own
mappings and place it in the WEB-INF directory of your app.

Hope that clears it up.
Adrian


- Original Message - 
From: Schalk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 10:03 AM
Subject: RE: Which Engine is Which


Hi there



This is probably something I should know but, for clarification, is the
engine that processes jsp's different to the one that processes servlets?
Also what is the name of the engine that processes JSP's and, if different,
the name of the engine that processes servlets.



Thanks!



Kind Regards

Schalk Neethling

Web Developer.Designer.Programmer.President

Volume4.Development.Multimedia.Branding

emotionalize.conceptualize.visualize.realize

Tel: +27125468436

Fax: +27125468436

email:[EMAIL PROTECTED]

web: www.volume4.com



This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.




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



Re: Configuration Help

2004-03-22 Thread Adrian Lanning
Hey Dave,

I'm a little fuzzy on my errors.  Is 400 from iis or tomcat?  Does tomcat
work with the urls in standalone mode?

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:17 AM
Subject: Configuration Help


For over a week I have been unable to get Tomcat 5 configured with IIS 5.

I know the Tomcat server is working because I can get to the management
console from the IP address:8080 and the two example web apps are working,
both from the IP address:8080/servlet-examle  and without the port...

I have created a web app instance which I can access from the IP
address:8080/webapp and IP address/webapp, but when I attempt to access it
from the URL I get a 400 error.

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.

Can anyone help explain what I need to do in order to access the web app by
the URL?

In IIS I have configured the isapi_redirector2.dll at the root server level
and in the web app I'm trying to get working I created a virtual directory
named jakarta. I have made all the necessary registry entries required to
support the .dll.

Thanks,
Dave

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


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



Re: Java Mail Real Email

2004-03-19 Thread Adrian Lanning
http://java.sun.com/products/javamail/
javamail-1_3_1.zip - Filesize = 2,270,566 bytes.

You'll need activation.jar too. There's a link to it on the above page.

Adrian Lanning

- Original Message - 
From: Steve Gums [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 11:53 AM
Subject: RE: Java Mail Real Email


 Is there a good place to get these jars without pulling the whole dang
SDK.

 -Original Message-
 From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 9:27 AM
 To: Tomcat Users List
 Subject: RE: Java Mail Real Email

 I got a similar error when I migrated a working web app from one server to
 another. The problem resulted from an older version of the mail.jar on the
 server I moved the web app too.

 You might want to compare the mail.jar files between the two servers.

 -Dave

 -Original Message-
 From: QM [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 9:56 AM
 To: Tomcat Users List
 Subject: Re: Java Mail Real Email


 : Unable to complete :javax.mail.NoSuchProviderException: No provider for
 : Address type: rfc822

 The phrase completely functioning on another server is the tipoff --
 what's in the working server's {tomcat inst}/common/lib?  Anything
 JavaMail related?

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


 -
 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: Java Mail Real Email

2004-03-19 Thread Adrian Lanning
my pleasure although Dave Liles did the actual helping. :-)

Adrian

- Original Message - 
From: Steve Gums [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 12:34 PM
Subject: RE: Java Mail Real Email


 That did it.  Just needed a newer mail.jar and activation.jar

 Thanks for the help Adrian!

 -Original Message-
 From: Steve Gums [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 10:16 AM
 To: 'Tomcat Users List'
 Subject: RE: Java Mail Real Email

 Thanks much

 -Original Message-
 From: Adrian Lanning [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 10:14 AM
 To: Tomcat Users List
 Subject: Re: Java Mail Real Email

 http://java.sun.com/products/javamail/
 javamail-1_3_1.zip - Filesize = 2,270,566 bytes.

 You'll need activation.jar too. There's a link to it on the above page.

 Adrian Lanning

 - Original Message - 
 From: Steve Gums [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 11:53 AM
 Subject: RE: Java Mail Real Email


  Is there a good place to get these jars without pulling the whole dang
 SDK.
 
  -Original Message-
  From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 19, 2004 9:27 AM
  To: Tomcat Users List
  Subject: RE: Java Mail Real Email
 
  I got a similar error when I migrated a working web app from one server
to
  another. The problem resulted from an older version of the mail.jar on
the
  server I moved the web app too.
 
  You might want to compare the mail.jar files between the two
servers.
 
  -Dave
 
  -Original Message-
  From: QM [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 19, 2004 9:56 AM
  To: Tomcat Users List
  Subject: Re: Java Mail Real Email
 
 
  : Unable to complete :javax.mail.NoSuchProviderException: No provider
for
  : Address type: rfc822
 
  The phrase completely functioning on another server is the tipoff --
  what's in the working server's {tomcat inst}/common/lib?  Anything
  JavaMail related?
 
  -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]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



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



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



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



Re: mod_jk or mod_jk2 for production

2004-03-19 Thread Adrian Lanning
Mike,
I haven't heard of anyone having stability issues with JK2 once they got it
configured correctly.  List, correct me if I'm wrong.

The only problem with JK2 2.0.2 that I know of (and one I found the hard
way) is that JkUriSet works globally within the httpd.conf file rather than
relative to the virtual host its in.  So you can't have one url mapping for
one virtual host point to one worker and the same url mapping for another
virtual host point to another worker.

To illustrate what I mean, in the following example, all *.htm requests will
go to tomcat:
VirtualHost 1 
Location /*.htm
JkUriSet worker ajp13:localhost:8009
/Location
/VirtualHost
VirtualHost 2 
Regular static apache stuff...  (*.htm requests should NOT be passed to
tomcat)
/VirtualHost


In this example, all *.jsp requests will go to the same port (im not sure if
it uses the first one it finds or the last one):
VirtualHost 1 
Location /*.jsp
JkUriSet worker ajp13:localhost:8009
/Location
/VirtualHost
VirtualHost 2 
Location /*.jsp
JkUriSet worker ajp13:localhost:8055
/Location
/VirtualHost

This doesn't affect the stability and isn't a problem for most people since
most people aren't using mass virtual hosting (ip virtual hosting).  At
least it hasn't come up on the list much.

The JkMount directive works correctly in this case (ie. relative to the
VirtualHost).

Question for the list, for those of you who've switched from JK to JK2, did
you see any performance benefits?

hth,
Adrian Lanning


- Original Message - 
From: Mike Millson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 3:09 PM
Subject: mod_jk or mod_jk2 for production


 Is the statement in the link below on the Tomcat FAQ page regarding the
 stability of mod_jk vs mod_jk2 still valid? Is mod_jk2 still not stable
 enough for production environments, or is this info out of date?

 http://jakarta.apache.org/tomcat/faq/connectors.html#vs

 Mike


 -
 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: Mod_jk.so on Compaq Tru64

2004-03-18 Thread Adrian Lanning
Never seen that before.

Did a quick grep (grep -R 'map_alloc' *) through the mod_jk source files for
map_alloc and it is found in
jk/native/common/jk_map.h and
jk/native/common/jk_map.c

The error is saying that it can't find the lib to execute the function.
Maybe you didn't build the common lib...?

hth,
Adrian Lanning


- Original Message - 
From: Sullivan, Patrick [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 2:05 PM
Subject: Mod_jk.so on Compaq Tru64


Does any one recognize these?

Built:
 Cannot load /usr/local/stow/apache/lib/mod_jk.so into server: dlopen:
 /usr/local/stow/apache/lib/mod_jk.so: symbol map_alloc unresolved

Binary:
Cannot load /usr/local/stow/apache/lib/mod_jk.so into server: dlopen:
 /usr/local/stow/apache/lib/mod_jk.so: symbol __builtin_va_start


Thank you,

Patrick Sullivan
Centura Health

-Original Message-
From: Brian Beckman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 4:39 PM
To: Sullivan, Patrick
Subject: RE: [Lawson_SysAdmin] Mod_jk.so on Compaq Tru64


Patrick,

1 ) Yes, I have alphajava jawt.h   jni.hjvmdi.h  jvmpi.h 
in
$JAVA_HOME/include

2) I do have the classic dir in the LD_LIBRARY_PATH but the file is
actually libjvm.so, not libjvm.a

3) Java -verison gives:
java version 1.3.1
Java(TM) 2 Runtime Environment, Standard Edition
Fast VM (build 1.3.1-2, native threads, mixed mode, 01/16/2002-13:22)

4) When I echo LD_LIBRARY_PATH, I get:

/lib:/usr/lib:/prod/ccs/lib:/prod/gen/lib/shared:/sfwr01/cobol/lib:/usr/
opt/
java
131/jre/lib/alpha/classic:/usr/opt/java131/jre/lib/alpha

I tried the find command and it did not find anything.

Any other ideas?

Thanks!
Brian

-Original Message-
From: Patrick J. Sullivan [mailto:[EMAIL PROTECTED]
Sent: Monday, March 15, 2004 4:11 PM
To: [EMAIL PROTECTED]
Subject: RE: [Lawson_SysAdmin] Mod_jk.so on Compaq Tru64

Can you send your envvars file?

Goto $JAVA_HOME/include do you have jni.h and jvmXX.h (XX being place
holder for different flavors.) or just find $JAVA_HOME -name *.h

find the archive:  find $JAVA_HOME -name *vm*.a
on AIX with JDK 1.3.1 it is: /usr/java131/jre/bin/classic/libjvm.a

Is this path in your LIBPATH?

What vendor and version of JDK?

as for map_alloc sounds like /usr/lib or what ever HP uses is not in
your LIBPATH either.

find /usr/lib -exec grep -l map_alloc {} \; I believe it is defined in
/usr/lib/boot/unix which maybe a symbolic link to vendor specific file.

let me know

Brian Beckman wrote:

 For now, I'm using Apache 1.3.27, Tomcat 4.0.6, and the connector that
 came with the 4.0.6.

 I was able to build a mod_jk using apxs, but when I try to start
 apache, I
 get:

 Cannot load /usr/local/stow/apache/lib/mod_jk.so into server: dlopen:
 /usr/local/stow/apache/lib/mod_jk.so: symbol map_alloc unresolved
 /usr/local/bin/apachectl start: httpd could not be started

 I found a pre-built mod_jk.so for Tru64 5.1 and when I use that, I get
 the following error:

 Syntax error on line 65 of /usr/local/stow/apache/etc/httpd.conf:
 Cannot load /usr/local/stow/apache/lib/mod_jk.so into server: dlopen:
 /usr/local/stow/apache/lib/mod_jk.so: symbol __builtin_va_start
 unresolved
 /usr/local/bin/apachectl start: httpd could not be started

 Thanks for your help.

 Brian

 -Original Message-
 From: Patrick J. Sullivan [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 15, 2004 2:31 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [Lawson_SysAdmin] Mod_jk.so on Compaq Tru64

 What error messages are you getting?

 Which version Apache?
 Which version Tomcat?
 Which version Connector?


 With mod_jk I had to play with my share libraries, path and cc
 options. Let me know

 Brian Beckman wrote:
 
 
  Im trying to get Apache/Tomcat to work on Tru64 without much luck.
  Has anyone out there successfully built and loaded the mod_jk.so
  module on
  Tru64
  5.1?  If so, what c compiler, build command, and system libraries
  did you use?
 
  Thanks,
  Brian
 
  [Non-text portions of this message have been removed]
 


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


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



Re: JDBC problems with MySQL

2004-03-17 Thread Adrian Lanning
Abhay,

Back on 3/17/04 9:50AM, Steve says he got it to work...


I got this to work by either placing the context directly into the
server.xml file or placing the xml file into it's correct location in
/usr/local/tomcat/conf/Catalina/localhost/DBTest.xml

Not exactly sure the reason, but it is working now.

Steve


Check the archives...

Adrian Lanning

- Original Message - 
From: Kumar Abhay-CAK203C [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 1:01 PM
Subject: RE: JDBC problems with MySQL


 Dear Steve,

 I posted this problem around 3 months back and I am daily reading the
forum, hoping that one day somebody will give a solution.
 I will deeply appreciate you if u share the solution with me if u r able
to find.

 Good Luck

 Best Regards
 Abhay Kumar


 -Original Message-
 From: Steve Gums [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 16, 2004 11:57 AM
 To: [EMAIL PROTECTED]
 Subject: JDBC problems with MySQL


 Users

 I know there has been a bazillion messages about this.  I
searched the archives and couldn't find anything to solve my extremely
annoying issue.  It has to be something really simple but I just can't find
it.



 My System:

 Solaris 9

 Tomcat 5.0.19

 MySQL 4.0.18

 Connector J 3.0.11



 I have the connector J jar in the /usr/local/tomcat/common/lib dir.

 I have basically copied the HOW-TO located at.


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



 and my result is this.


 Results


 Foo Not Connected
 Bar -1



 I have tried everything I can think of.  I verified the database and the
user/password combo.  Works good.  I even created a simple Java app that
connects and performs queries, which worked.  That would indicate everything
is cool with the Connector J.  I have verified that the jdbc/TestDB is in
the context and it is.  As best I can tell ds (DataSource) is coming back
not null, but the call to getConnection is failing.  I created a little more
verbose web app and get the following message.

 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause: No suitable driver



 This has to be something simple, because this works fine on my old
machine. I know I am forgetting some small step that I did the first time
and failed to do again.  Trust me I have checked the configs about a million
times, and
 can't find any differences.   Any help would be appreciated.



 Sorry to be so vague here, but this is really simple. I don't know what
else to include for info.



 Steve Gums

 [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: apache 1.3 tomcat 5.0.19

2004-03-17 Thread Adrian Lanning
Nope,
you only need jk or jk2 if you are using another webserver as a front-end to
Tomcat.
Adrian Lanning

- Original Message - 
From: Galam [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 5:59 PM
Subject: RE: apache 1.3 tomcat 5.0.19


 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]



Re: A plan to access files outside the context/Tomcat?

2004-03-17 Thread Adrian Lanning
Sounds like a workable solution.  Are you using apache or some other
front-end to Tomcat?  If so then you can use an alias to serve up the images
rather than serve them up manually with your servlet.  I've done it both
ways in content management systems I've made and letting apache do it saves
a class or two...

Actually you might be able to let Tomcat do it for you if you set up a
connector to listen on port 80.  I've never used Tomcat alone so don't have
any experience doing it that way.

Adrian Lanning

- Original Message - 
From: Parsons Technical Services [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 6:30 PM
Subject: A plan to access files outside the context/Tomcat?


 I have a need to place and get, image files, to and from a directory
outside
 of the context and outside of Tomcat.

 My plan is this:

 Have an upload page to allow user to select local file on client and
upload
 to server. This is the same tactic as the manager is using with war files.

 The folder will have rights set to allow read/write by Tomcat user.

 This part, I think, will be staight forward. OK so far??

 Next to retrieve the image and serve it back to the client is a little
more
 involved.

 The plan:

 Servlet to accept all request for the /context/pics/* .

 Servlet reads file from directory and writes it out to the Servlet output
 stream.

 Am I nuts or is this a feasible plan?

 Just need to know if I am going in the right direction and if anyone has
any
 code snippets of the servlet writes.

 As for the file I/O I have that covered I think.

 Any/all comments welcome.




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



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



Re: how to use multiple jk2 connectors?

2004-03-17 Thread Adrian Lanning
Hi Joseph,

I had the same problem a while ago and never solved it. The root cause is
that for whatever reason the Location-JkUriSet combination acts globally to
the httpd.conf file rather than relative to the virtual host.  I wasn't sure
if the problem was with JkUriSet or with apache's Location directive.  It
sounds like it used to work for you with JkMount so the problem must be with
JkUriSet...

 Side Note 
List Users,
Am I correct in assuming the problem lies with JkUriSet?  Has anybody gotten
this to work?
 

I had to work around this by explicitly defining mappings in
workers2.properties.  This, of course, blows the whole concept of mass
virtual hosting out of the water since you have to manually add domains to
the workers2 file...

Does jk work correctly in this sense, where mappings are relative to the
virtual host?  If so, i'm switching back...

Adrian Lanning


- Original Message - 
From: Joseph Shraibman [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 1:49 AM
Subject: how to use multiple jk2 connectors?


 I have multiple ip based virtual hosts, so in tomcat I configured three
 seperate engines with connectors on different ports, and in the apache
 VirtualHost I JkMount the worker that I configured in
 worker.properties to connect on a specific port.  This works fine for
 mod_jk, but when I try mod_jk2 it insistes on using the default host of
 the engine that has the connector listening on port 8009.

 This is how I configure jk2:
 Location /*.jsp
  JkUriSet worker ajp13:localhost:8019
 /Location

 -
 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 Hosting with Tomcat 4.1, Apache 2.0, and mod_jk2

2004-03-16 Thread Adrian Lanning
Hi James,

You actually can use JkUriSet in httpd.conf file.
For example, to map all .jsp files to tomcat,
   Location /*.jsp
   JkUriSet worker ajp13:localhost:8009
   /Location
This is a global mapping.

Check
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html
for a more in-depth example.
hth,
Adrian Lanning

From: Montz, James C. (James Tower) [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Virtual Hosting with Tomcat 4.1, Apache 2.0, and mod_jk2
Date: Tue, 16 Mar 2004 09:59:38 -0600
Is there any way to specify context mappings in the httpd.conf file?
Something similar to JkUriSet?
I have successfully mapped *.jsp to my mod_jk2 worker, but I'm having an
issues mapping virtual hosts with the correct Tomcat context?
Using uri in the workers2.properties will prove cumbersome as I have many
virtual hosts, with many more ServerAliases.
Recommendations on how to best handle a single Apache 2.0./Tomcat 4.1 
Server
instance doing a large amount of virtual hosting for several sites, and
hostnames?

__
James C. Montz   RHCE
Hosting Services Engineer
James Tower
http://www.jamestower.com http://www.jamestower.com
_
Frustrated with dial-up? Lightning-fast Internet access for as low as 
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

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


Re: Sporadic connection loss between Tomcat and Apache though mod_jk

2004-03-16 Thread Adrian Lanning
I'm no expert in this by any means so here's some questions that might help
debugging your problem:

First, is tomcat actually restarting?  catalina.out logs are clean?

If tomcat's not restarting then is jk using some lib that was changed
between rh8 and enterprise?  Could try recompiling jk on the new system.
(course you might have already done that...)

could some other program be trying to use the port jk uses?  try changing
the port and retesting...

anything unusual about the times when it flakes out?  heavy load, etc...

i'd check jk_connect.c and see if you can find out more info on what caused
the error (61).  if it just can't open the socket (as its reporting) then is
it timing out or just getting refused?

Could a firewall difference in the new system mess something up?

i've reached the extent of my limited knowledge in this area. :-)
hth,
Adrian Lanning

- Original Message - 
From: Clute, Andrew [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 4:39 PM
Subject: RE: Sporadic connection loss between Tomcat and Apache though
mod_jk


I should also mention we are on Apache 2.0.47

-Andrew



-Original Message-
From: Clute, Andrew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 4:24 PM
To: [EMAIL PROTECTED]
Subject: Sporadic connection loss between Tomcat and Apache though
mod_jk

Ever since upgrading the box that our Tomcat server (actually
Jboss/Tomcat) resides on from RedHat 8.0 to RedHat Enterprise ES 3.0, we
will get very sporadic 500 errors on our JSP pages. When we get one of
the errors, if we refresh it right away, the page come back fine.

Mod_jk is set up, to the best of knowledge, correctly, as it worked
flawlessly for 12 months in production before we changed our production
java box (the apache box stayed the same -- nothing about it changed,
not even configuration files).

Pertinent information:

Uname -a = Linux WWW_JBOSS 2.4.21-9.0.1.ELsmp #1 SMP Mon Feb 9 22:26:51
EST 2004 i686 i686 i386 GNU/Linux

Java version:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1) Classic
VM (build 1.4.1, J2RE 1.4.1 IBM build cxia321411-20030930 (JIT
enabled: jitc))

Jboss3.2.3 with Tomcat 4.1.29

Here is the output from the mod_jk.log file:

[Tue Mar 16 13:34:30 2004]  [jk_connect.c (203)]: jk_open_socket,
connect() failed errno = 61
[Tue Mar 16 13:34:30 2004]  [jk_ajp_common.c (676)]: Error connecting to
tomcat. Tomcat is probably not started or is listenning on the wrong
port. Failed errno = 61 [Tue Mar 16 13:34:30 2004]  [jk_ajp_common.c
(955)]: Error connecting to the Tomcat process.
[Tue Mar 16 13:34:30 2004]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=1 [Tue Mar 16 13:34:32 2004]
[jk_connect.c (203)]: jk_open_socket,
connect() failed errno = 61
[Tue Mar 16 13:34:32 2004]  [jk_ajp_common.c (676)]: Error connecting to
tomcat. Tomcat is probably not started or is listenning on the wrong
port. Failed errno = 61 [Tue Mar 16 13:34:32 2004]  [jk_ajp_common.c
(955)]: Error connecting to the Tomcat process.
[Tue Mar 16 13:34:32 2004]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=2 [Tue Mar 16 13:34:32 2004]
[jk_ajp_common.c (1318)]: Error connecting to tomcat. Tomcat is probably
not started or is listening on the wrong port. Failed errno = 61

Thanks for any help!

-Andrew





-
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: web.xml Welcome -file and for SSL

2004-03-16 Thread Adrian Lanning

- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 10:16 PM
Subject: Re: web.xml Welcome -file and for SSL






 Hi Forte,
 I am also having similar type of problem. When the user types
 http://www.mysite.com it should first go to the default .html page (that
is
 using 80 port) that I have set in the welcome-file-list in web.xml file.
 Its working fine. But once the user logs in from the home page, he should
 then be redirected to https://www.mysite.com/Welcome.jsp (using 443 port).
 See the port difference. I do not know where to set the redirection. or
 should I hard code this settings in my .jsp file itself?

 Thank you,
 Best Regards,
 Uma




  Forte, Graham
  [EMAIL PROTECTED]
  .com  To

  03/16/2004 06:50  'Tomcat Users List'
  PM[EMAIL PROTECTED]
 cc

  Please respond to
Tomcat Users
List
  [EMAIL PROTECTED]
   rta.apache.org  Subject
web.xml  Welcome -file and for SSL










 Hello,
  I am wondering if it is possible to specify a Welcome-file
for
 an
 https request. If I am using port 443 how can I configure Tomcat 4.1 so
 that
 when the user types in https://myIPAddress  or https://myDomainName they
 will be directed to https://myIPAddress/myFirstPage.jsp.
 Thanks, Graham

 PS I have the web.xml Welcome-file setup with:
 welcome-file-list
  welcome-filemyFirstPage.jsp/welcome-file
 /welcome-file-list

 Will this accomplish what I need to accomplish, or do I need to add
 something else.
 I cant test this out right now because I have all ports blocked except
 8443.
 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: web.xml Welcome -file and for SSL

2004-03-16 Thread Adrian Lanning
Uma,
Hard coding it is the simplest and fastest way to do what you want.  With
HTTP the actual form itself doesn't need to be https, just the action
target.  hotmail.com is a good example of this.

If you have content inside the webapp that you need to make sure is accessed
securely you can either check the protocol manually when you need it (say
from a base class which you extend) or you can make a filter that checks the
protocol.  Matt Raible has an example app that uses the filter method called
appfuse. You can find it here:
http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse

Graham,
It looks like your setup is correct, you just use the welcome file.  But you
have to have tomcat listen on port 443 rather than 8443.  It sounded in your
original post like Tomcat was just listening on 8443...

hth,
Adrian


- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 10:16 PM
Subject: Re: web.xml Welcome -file and for SSL






 Hi Forte,
 I am also having similar type of problem. When the user types
 http://www.mysite.com it should first go to the default .html page (that
is
 using 80 port) that I have set in the welcome-file-list in web.xml file.
 Its working fine. But once the user logs in from the home page, he should
 then be redirected to https://www.mysite.com/Welcome.jsp (using 443 port).
 See the port difference. I do not know where to set the redirection. or
 should I hard code this settings in my .jsp file itself?

 Thank you,
 Best Regards,
 Uma




  Forte, Graham
  [EMAIL PROTECTED]
  .com  To

  03/16/2004 06:50  'Tomcat Users List'
  PM[EMAIL PROTECTED]
 cc

  Please respond to
Tomcat Users
List
  [EMAIL PROTECTED]
   rta.apache.org  Subject
web.xml  Welcome -file and for SSL










 Hello,
  I am wondering if it is possible to specify a Welcome-file
for
 an
 https request. If I am using port 443 how can I configure Tomcat 4.1 so
 that
 when the user types in https://myIPAddress  or https://myDomainName they
 will be directed to https://myIPAddress/myFirstPage.jsp.
 Thanks, Graham

 PS I have the web.xml Welcome-file setup with:
 welcome-file-list
  welcome-filemyFirstPage.jsp/welcome-file
 /welcome-file-list

 Will this accomplish what I need to accomplish, or do I need to add
 something else.
 I cant test this out right now because I have all ports blocked except
 8443.
 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: several virtual hosts -- single application

2004-03-15 Thread Adrian Lanning
Hi James,

On Linux, I've accomplished this using the following configuration:

+ snip from server.xml on linux +
Host name=domain1 debug=0 appBase=webapps/app1
unpackWARs=true autoDeploy=true
/Host

Host name=domain2 debug=0 appBase=webapps/app2
unpackWARs=true autoDeploy=true
/Host
+ snip from server.xml on linux +

On Windows, try this:

+ snip from server.xml on windows +
  Host name=domain1 debug=0 appBase=webapps
 unpackWARs=true autoDeploy=true
Context path= docBase=/app1 debug=1/
  /Host
  Host name=domain2 debug=0 appBase=webapps
 unpackWARs=true autoDeploy=true
Context path= docBase=/app2 debug=1/
  /Host
+ snip from server.xml on windows +

I don't know why it acts differently on windows and linux...
Also, I've noticed that the windows setup seems to create two instances of
each app when viewed in the manager.  One as / and one as app1 or app2
(depending on which domain you log into).  So this should get you started
but I wouldn't use the windows setup for production.  Linux you should be
good to go.

HTH,
Adrian Lanning


- Original Message - 
From: James Agnew [EMAIL PROTECTED]
To: tomcat list [EMAIL PROTECTED]
Sent: Monday, March 15, 2004 5:24 AM
Subject: several virtual hosts -- single application


 Hello

 Is it possible to have several virtual hosts point to different folders
 within the same context under tomcat 5 standalone webserver?

 Host name=domain1.com debug=0 appBase=webapps
 Context path= docBase=domain1 debug=0 reloadable=true/
 /Host

 Host name=domain2.com debug=0 appBase=webapps
 Context path= docBase=domain2 debug=0 reloadable=true/
 /Host

 http://domain1.com -- myapps/domain1
 http://domain2.com -- myapps/domain2

 so that one application handles all the requests? I'm running Cold Fusion
as
 the application and I need it to handle request for virtual hosts within
its
 own context i.e. domain1 and domain2.

 I can achieve this easily with VirtualHost directive in Apache, but
can't
 get it to work under Tomcat standalone. Is it possible?

 Any help much appreciated.

 James


 -
 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: Need example configuration for Apache/Tomcat/JK2 and multiple virtual hosts

2004-03-15 Thread Adrian Lanning
Hi Jeremy,

Have you verified that the apps work as expected when not using load
balancing?  Then we know where the problem is...

I don't know of any examples of loadbalancing with jk2.  If you get this to
work you can write a tut!

Here's a link to an example using jk1.
http://raibledesigns.com/tomcat/

If that doesn't help here's all the other links I've found for using jk2...
http://cymulacrum.net/writings/tomcat5/book1.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html
http://www.linuxjava.net/howto/webapp/
http://johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html
http://www.thinlizard.com/lizard/modjk2.html
http://jakarta.apache.org/tomcat/faq/connectors.html

btw, how are you doing the forwarding in apache's httpd.conf file?  Using
the Location directive? Or are you setting them in worker2.properties?

hth,
Adrian Lanning


- Original Message - 
From: Jeremy Nix [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 15, 2004 9:10 AM
Subject: Need example configuration for Apache/Tomcat/JK2 and multiple
virtual hosts


I have a need to have Apache and Tomcat both handle requests for
multiple IPs (hosts).  I've initially set up a httpd.conf that defines 2
virtual hosts A and B.  Both use JSPs/Servlets, so they both have
references to JK2.  I've kept the JK2 configuration simple and used
localhost:8009 for both hosts.  On the tomcat side, I have 1 engine with
2 separate hosts listening on their respective IP's.  I've defined 3
connectors all running on the default address (localhost): NON-SSL, SSL
and AJP/JK2.  I also have this same configuration on 2 separate boxes
and they are both being load-balanced through a local-redirector.

This configuration seems to work as expected when I reference the
defaultHost in tomcat (virtual host A), but when I reference a page
hosted by virtual host B, I seem get unexpected errors (sometimes
recursive in nature).

So, has anybody experienced this?  Does anybody have a sample
configuration (load balancing with multiple virtual hosts) that I can
mimic?


_
Jeremy Nix
Southwest Financial Services, LTD.
[EMAIL PROTECTED]
(513) 621-6699 ext.1158


-
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: help needed building JK2 connector

2004-03-15 Thread Adrian Lanning
Hi Matt,
I have built JK2 successfully several times on Redhat 9 with Tomcat 5 and
Apache 2.0.48.  The problem I had with the default apache installed on rh
9.0 was that mine didn't have the apxs program or maybe it was some missing
libraries.. In any case I had to build apache 2.0.48 from src first before I
could get it to work.

I used the tutorial by Pascal Chong (thanks Pascal!):
http://cymulacrum.net/writings/tomcat5/book1.html

Here's another resource for building jk2:
http://www.thinlizard.com/lizard/modjk2.html

hth,
Adrian Lanning

- Original Message - 
From: Dale, Matt [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 15, 2004 3:40 PM
Subject: help needed building JK2 connector


Hi,

I have Redhat 9 with Tomcat 5 installed and is working fine.

Apache 2.0.40 is installed by default and i'd rather stick with that because
it is integrated with a nifty configuration tool.

I'd like to link apache and tomcat with the JK2 connector which I have no
problems with. As far as I can tell there is no binary download for linux so
I have to build it.

The questions I have are.

Is there any documentation on building the JK2? Particularly the command
line parameters

As it is the default RPM install of tomcat there doesnt seem a sensible
Apache2 home that needs to be set for the build, is there something I should
set this to?

If this cant work would I be able to compile using apache 2.0.48 and use the
library with apache 2.0.40?


Any other advice on building the connector?

Thanks
Matt







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



JK2 VirtualHost-relative Location URI mapping

2004-03-14 Thread Adrian Lanning
Hi.

Does anyone know how to get Locations in httpd.conf to be relative to the
VirtualHost rather than global?

I can get JK2 working properly by explicitly putting domains in my
workers2.properties file but I'd prefer using mass virtual hosting with jk2
and avoid having to add domains to apache (requiring a restart) whenever I
get a new dynamic-website client.

The problem is that when I use the Location directive to map uri's (say
"/*.htm") to tomcat, that Location maps ALL "/*.htm" requests even though I
put the Location inside a specific VirtualHost.  This wouldn't be a problem
if all I had on the server were dynamic sites but I have static sites on the
server as well.

All tomcat app sites are on one IP while static sites are on other IPs
(that's how I'm doing mass virtual hosting).

I've tried the following configuration

+---start snip from httpd.conf---+
# this vhost is default for IP1.  All dynamic content sites use IP1.
VirtualHost IP1:80
...
Location "/*.htm"
JkUriSet worker ajp13:localhost:8009
/Location
/VirtualHost

# this vhost is default for IP2. All static content sites use IP2.
VirtualHost IP2:80
... regular static site stuff
/VirtualHost
+---end snip from httpd.conf---+

What ends up happening is that ALL *.htm pages get sent to Tomcat regardless
of what IP the request comes in on.

Am I doing something wrong?  Has anyone done this using JK (1) in case JK2
doesn't support this?  Is this actually a limitation of Apache rather than
JK?

Server Stats:
  RedHat 9.0
  Tomcat 5.0.19 - binary distribution
  JK2 2.0.2 - compiled from source.
  Apache 2.0.48  - compiled apache from source with
 mod_ssl. Also use php and openssl in
 case that makes a difference...

Thanks,
Adrian Lanning


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