Re: HTTPD with Tomcat

2006-06-08 Thread Marc Bächinger
Hi Steven

I posted one some days ago to this list. Maybe this is helpful:

--- forwarded post ---
i'm everthing but an expert in this, but i got loadbalancing with ajp working 
with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is 
helpful for you.

The documentation on the net about configuration of the new built-in ajp 
support through the proxy module was rather thin. The best howto i found is 
in german (the config samples maybe helpful even if the rest is german):

http://www.linuxforen.de/forums/showthread.php?t=209010

marc

my config:

in server.xml:

      
        

in httpd.conf :
---


    
        SetHandler balancer-manager
    

    
        BalancerMember ajp://localhost:9002 route=node1
        BalancerMember ajp://localhost:9102 route=node2
    

    
        ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID
    





Am Donnerstag, 8. Juni 2006 04.36 schrieb [EMAIL PROTECTED]:
> Filip,
>
> Do you happen to have any examples of your mod_proxy setup?  I've been
> trying to get mod_proxy and mod_proxy_ajp working (apache 2.2.2, tomcat
> 5.5.17), and have been running into a wall.  No matter what I've tried,
> tomcat always returns a "requested resource not available" error.
>
> Cheers,
> -- Steven
>
> Filip Hanik - Dev Lists wrote:
> > mod_proxy
> > - easy to configure
> > - scales without limitation
> >
> > mod_jk
> > - hard to compile,configure
> > - in our tests, would not scale well at all
> >
> > Differences are:
> > mod_jk supports load balancing and also passing along SSL info to Tomcat.
> > mod_proxy is a regular http proxy, remember to set
> > "ProxyPassPreserveHost On", and then set the proxyPort directive on your
> >  in server.xml
> >
> > Filip
> >
> > Mann, Bradley wrote:
> >> What are the exact differences between mod_proxy and mod_jk? What are
> >> the benefits/drawbacks of each?
> >>
> >> Thanks,
> >>
> >> Brad Mann
> >> Software Engineer - Information Access Services
> >> HARRIS Corporation / GCSD
> >> (321) 984-6292
> >>
> >> -Original Message-
> >> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent:
> >> Wednesday, June 07, 2006 4:45 PM
> >> To: Tomcat Users List
> >> Subject: Re: HTTPD with Tomcat
> >>
> >> you can also make your own life very easy, by switching to mod_proxy,
> >> and voila, everything works :)
> >>
> >> Filip
> >>
> >> Mann, Bradley wrote:
> >>> Hello,
> >>>
> >>> I am attempting to setup a scenario in which Tomcat is hosting a web
> >>> application behind HTTPD using the Jakarta Connector. I have installed
> >>> the following on Solaris 10:
> >>>
> >>> Apache HTTPD 2.0.58
> >>> Apache Tomcat 4.1.31
> >>> Apache Jakarta Tomcat Connector 1.2.15
> >>>
> >>> I am able to access HTTPD's document root, and I am able to access my
> >>> web application through Tomcat. I am having trouble, however,
> >>> understanding how to get the two to interact using the connector. I
> >>> believe I have it setup properly, with mod_jk located in the /modules
> >>> directory of HTTPD, and with an Include statement at the end of
> >>> httpd.conf that points to the /conf/auto/mod_jk.conf of Tomcat. Under
> >>> the Server section of server.xml in the /conf directory of Tomcat, I
> >>> have added a listener as follows:
> >>>
> >>>  >>> modJk="/usr/apache/modules/mod_jk.so" />
> >>>
> >>> which points to the location of mod_jk.so.
> >>>
> >>> I have added the same line under the Host section, with the added
> >>> attributes:
> >>>
> >>> append="true" forwardAll="false"
> >>>
> >>> My main question is, how do I get my static content from HTTPD to link
> >>> to my web application under Tomcat. Do I simply add the Tomcat port
> >>> number (8080) to the links in my static content, or is there a more
> >>> eloquent way of doing things? I thought the point of the connector was
> >>> to prevent having to do this so the experience is seamless for the
> >>
> >> user.
> >>
> >>> Any help or ideas are greatly appreciated.
> >>>
> >>> Thanks,
> >>>
> >>> Brad Mann
> >>> Software Engineer - Information Access Services
> >>> HARRIS Corporation / GCSD
> >>> (321) 984-6292
> >>
> >> 
> >>
> >>> No virus found in this incoming message.
> >>> Checked by AVG Free Edition.
> >>> Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date:
> >>
> >> 6/6/2006
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat contexts for proxied content

2006-06-06 Thread Marc Bächinger
i'm everthing but an expert in this, but i got loadbalancing with ajp working 
with those versions you mention (2.2.2 and 5.5.17). Maybe my config below is 
helpful for you.

The documentation on the net about configuration of the new built-in ajp 
support through the proxy module was rather thin. The best howto i found is 
in german (the config samples maybe helpful even if the rest is german):

http://www.linuxforen.de/forums/showthread.php?t=209010

marc

my config:

in server.xml:

  


in httpd.conf :
---



SetHandler balancer-manager



BalancerMember ajp://localhost:9002 route=node1
BalancerMember ajp://localhost:9102 route=node2



ProxyPass balancer://cluster/axis2 stickysession=JSESSIONID



Am Dienstag, 6. Juni 2006 01.46 schrieb [EMAIL PROTECTED]:
> I've got tomcat 5.5.17 and apache 2.2.2 installed and I'm trying to set
> up an AJP1.3 connector to proxy content from apache to tomcat.  However,
> no matter what I've tried so far, tomcat always responds with a
> "requested resource not available" error.
>
> Following are the settings in server.xml:
>
>  proxyPort="80" protocol="AJP/1.3" maxThreads="50" minSpareThreads="2"
> maxSpareThreads="25" address="127.0.0.1" />
>
>  
> resourceName="UserDatabase" />
>
> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
>  
>  
>
>  
>
> And, in httpd.conf, I have:
>
> ProxyRequests Off
> ProxyPass / ajp://localhost:8009/
>
> Does anybody have any experience with this?
>
> Thanks,
> -- Steven
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: ajax response from tomcat by including JSP from a servlet - fails silently when HTML is badly formed.

2006-06-04 Thread Marc Bächinger
Am Sonntag, 4. Juni 2006 12.08 schrieb Mladen Adamovic:
> Andrew Braae wrote:
> > However if the JSP that produces the HTML content produces anything less
> > than perfectly-formed HTML, then the response fails - worse still, it
> > fails
> > silently, with no output to the tomcat log files.
>
> You can generate malformed HTML from JSP pages and it is OK, so I assume
> your problem is in rico or ajax related stuff. I think your problem is
> on the client side - client doesn't know to handle imperfectly formed
> HTML in ajax response.
> I had JSP which had errors and warnings  in HTML validator  :) But no
> problem in Tomcat with that :).

Thats my experience too. Tomcat sends the malformed response even if the 
contentType is text/xml. I'm very ok with this behaviour; TC should not parse 
the output by default.

This may confuse at the client side. Eg. Firefox does write a warning to the 
javascript console if the xmlResponse is malformed, but no error is thrown. 
The response will be available as text but not as parsed dom object. A 
JavaScript programmer not aware of this may think there is no response at 
all.

To be aware of malformed xml on the tomcat side a servletfilter could be 
configured which parses the response and reports error to the log (the filter 
could be removed after developing phases). Another approach with xml taglibs 
would help avoiding such validation issues too:

Don't know what recent JSTL does offer. Third party taglib from Google eg.: 
http://www.devsphere.com/xml/taglib/output/examples.html

marc

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 403 Error

2006-06-04 Thread Marc Bächinger
Am Samstag, 3. Juni 2006 01.18 schrieb Mark Thomas:
> Marc Bächinger wrote:
> > hi
> >
> > I had the same problem and i was near to a nervous breakdown as I noticed
> > that encription was requested and tomcat expected encripted passwords
>
> This is not the case by default.

so i have to correct myself:

"I had similar symptoms [...] as i noticed that my non-default install script 
configured the manager app to insist on encripted passwords..."

Sorry for any inconvenience caused by my misleading post... 

marc

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 403 Error

2006-05-31 Thread Marc Bächinger
hi

I had the same problem and i was near to a nervous breakdown as I noticed that 
encription was requested and tomcat expected encripted passwords

Here you can read about a command linetool to encrypt it:

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


regards
marc


> I have recently installed Tomcat, and am having difficulty accessing the
> Manager web application. I have added the role "manager" to the
> tomcat-users.xml file under the user "both" but when I put in these
> credentials at the password challenge, I am shown an http 403 error
> (access denied). Any ideas why I may be receiving this error?
>
> Thanks,
>
> Brad Mann
> Software Engineer - Information Access Services
> HARRIS Corporation / GCSD
> (321) 984-6292

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]