Re: Subdomain Virtual Hosting.

2007-12-27 Thread david delbecq

Ishtiaq Ahmed a écrit :

Hi,
Now we want it But when we tried it for *.mydomain2.com (Notice that * )
if I go like under, it doesn't work. Kindly shed some light into it.

Host name=*.mydomain2.com

 appBase=/usr/local/tomcat6/webapps/APPx
 unpackWARs=true
 autoDeploy=true
 xmlValidation=false
 xmlNamespaceAware=false
  Context path= docBase=/usr/local/tomcat6/webapps/APPx
 debug=0 reloadable=false/

/Host

I hope you understand my problem its about * (Subdomains) to be routed 
to different context path.


Simply put, you can't. If you want to redirect users of unconfigured 
domains to a specific webapp, use the defaultHost attribute of the 
Engine context. The name attribute of the Host context is Network name 
of this virtual host, as registered in your Domain Name Service 
server., as mentionned in docs. If you want more complex rules, you 
might need to configure an appache httpd front-end that does the 
dispatching.

Regards,

Ishtiaq Ahmed

-
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: Subdomain Virtual Hosting.

2007-12-27 Thread Ishtiaq Ahmed

Good Day David,

Its nice to see your reply. I tried the ROOT folder for all unconfigured 
domain names but developers are not satisfied with the settings. I need 
to redirect *.mydomain2.com's traffic to that specific context of 
$CATALINA_HOME/webapps/APPx. As the same server would be serving for 
*.mydomain3.com's requests in future too.


Looking Forward for resolution from you...

Regards,

Ishtiaq Ahmed



david delbecq wrote:

Ishtiaq Ahmed a écrit :

Hi,
Now we want it But when we tried it for *.mydomain2.com (Notice that * )
if I go like under, it doesn't work. Kindly shed some light into it.

Host name=*.mydomain2.com

 appBase=/usr/local/tomcat6/webapps/APPx
 unpackWARs=true
 autoDeploy=true
 xmlValidation=false
 xmlNamespaceAware=false
  Context path= docBase=/usr/local/tomcat6/webapps/APPx
 debug=0 reloadable=false/

/Host

I hope you understand my problem its about * (Subdomains) to be 
routed to different context path.


Simply put, you can't. If you want to redirect users of unconfigured 
domains to a specific webapp, use the defaultHost attribute of the 
Engine context. The name attribute of the Host context is Network 
name of this virtual host, as registered in your Domain Name Service 
server., as mentionned in docs. If you want more complex rules, you 
might need to configure an appache httpd front-end that does the 
dispatching.

Regards,

Ishtiaq Ahmed

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





-
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: AccessControlException in Coyote Http11Processor (Tomcat 6.0.14). Bug in Coyote ?

2007-12-27 Thread Delian Krustev
On Thu, 13 Dec 2007 21:54:22 + Mark Thomas wrote:
 Snapshot build of trunk available from:
 http://people.apache.org/~markt/dev/

 This is the current 6.0.x trunk with the security manager optimisation
 reverted for the org.apache.coyote.* packages.

 *HEALTH WARNING*
 This is a snapshot for testing of this issue only. It is not a formal
 release.

Thanks for the build Mark, and sorry for the delay of this reply.

Could you please provide the patch also?

I could not afford to move this instance to 6.0-trunk.
I'll do the build myself and probably touch only the modified classes.

Thank you
--
Delian

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



Configure Tomcat on IP

2007-12-27 Thread Laxmilal Menaria
Hello everyone,

I have installed Tomcat 6.0.13 on My Server 2003 Machine, and tried with
https://localhost/tomcat.gif, its working fine, (SSLconfigured). Now I have
created another web using asp.net and configured in root of IIS with https,
so now I need to update the apache from localhost to another ip i.e
192.168.0.2, so what can I do..

Please suggest me..

-- 
Thanks,
Laxmilal menaria

http://www.chambal.com/
http://www.minalyzer.com/
http://www.bucketexplorer.com/


Re: AccessControlException in Coyote Http11Processor (Tomcat 6.0.14). Bug in Coyote ?

2007-12-27 Thread Mark Thomas
Delian Krustev wrote:
 Thanks for the build Mark, and sorry for the delay of this reply.
No problem.

 Could you please provide the patch also?
I have uploaded it here.
http://people.apache.org/~markt/dev/remove-sm-opt.patch

 I could not afford to move this instance to 6.0-trunk.
 I'll do the build myself and probably touch only the modified classes.
OK. Let us know the results.

Mark


-
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: Remote deployment in tomcat

2007-12-27 Thread Marcio Camurati
Hi,

Maybe CruiseControl can help you to make it, it's a project that for create 
continuous build process scheduled:

http://cruisecontrol.sourceforge.net/

See ya.
Marcio Camurati

 Thu, 27 Dec 2007 00:57:42 -0500, Louis [EMAIL PROTECTED] escreveu:

 Shreekanta Prasad wrote:
   
  Hi All,
 
  I want to deploy my web application(in the form of a war file)
  remotely through ant script.
  I have written ant script for that and it is doing deployment
  properly to the remote host.
  But still I am getting old application itself new changes are not
  getting updated.
  Once we restart the apache it will work.The reason for this work
  floder of tomcat.
  After restarting the new changes are getting updated to the work
  folder.

  Is there any way to trigger the tomcat to delete work folder
  automatically and create by itself 
  without restart if the .war file modified ?
 
  Or Is there any trigger event associated with tomcat so that we can
  configure so as restarting of tomcat
  occurs if we modify the war file ?
 
  Hot deployment feature is there in tomacat.
 
I am using Tomacat 5.5 not command line startup using as a windows
  service(system try icon)
Operating system is windows 2003 server.
Ant version is 1.7.0 .
 
 
 
  Thanks and Regards -
  Shreekanta Prasad
  Bangalore,Karnataka
  India.

 I work this way with JBoss all the time. In the ant script you can 
 simply code in the call to delete the appropriate work directory.  See 
 the ant delete task.
 http://ant.apache.org/manual/CoreTasks/delete.html
 
 My guess as to the actual problem:
 Since you're copying a file across the network it can take a little 
 while for the transfer to complete. I don't know about Tomcat but in 
 JBoss the container can see the new file and try to unzip it before it's 
 fully copied over. The copy still works but the unzip attempt fails 
 (since the copy isn't done yet) and the hot deploy gets cancelled. The 
 work-around to this is to copy the file to a temp folder other than the 
 deploy directory (where tomcat/jboss expects to find the war). This 
 allows the copy to complete without Tomcat attempting to unzip a partial 
 file. After the copy task you then use a move to move the file from 
 the temp folder to the deploy folder _on the same server/drive_. Since 
 the move simply updates the file pointer tomcat will only see the file 
 once the operation is complete. This guarantees that tomcat can acutally 
 unzip the file.
 
 It's quite possible that this is the problem you're having and the empty 
 work directoy isn't a part of it.
 
 I hope that helps. Best Regards,
 
 Louis
 
 -
 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: AccessControlException in Coyote Http11Processor (Tomcat 6.0.14). Bug in Coyote ?

2007-12-27 Thread Delian Krustev
On Thu, 27 Dec 2007 11:12:28 + Mark Thomas wrote:
 I have uploaded it here.
 http://people.apache.org/~markt/dev/remove-sm-opt.patch

Thanks

 OK. Let us know the results.

I did a build with your patch and replaced just lib/tomcat-coyote.jar .

The exception did not show this time.

I'll monitor the container for the next several restarts.


Regards
--
Delian


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



Tomcat JSF custom error page

2007-12-27 Thread David Segall

I have, after hours of trial and error, managed to persuade Tomcat to
use my custom error page in a Java Server Faces application. Now that I 
have solved the problem I would like to know where I could have looked 
to find the answer.


In case someone finds this page via a web search I should provide the
answer here. I had to add the following lines to 
%CATALINA_HOME%\webapps\MyApp\WEB-INF\web.xml


error-page
error-code404/error-code
location/faces/pagenotfound.jsp/location
/error-page

The initial / was required in the location despite the fact that the 
NetBeans Visual Web Pack generated welcome-file tag did not have a 
leading /. Would I have solved this problem more quickly if I was not 
using NetBeans as a rapid application development tool?

--
David

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



default 500 error page by tomcat

2007-12-27 Thread GF
Hello,
when some of my Java application raises an uncatched exception, I got
a error 500 page generated by Tomcat that show me exception
stacktrace and things like that.
I know that i can customize it setting error-page parameter in the web.xml.

But I want to know where to find the source code of that error 500
page that tomcat automatically generates. I think that's too a .jsp
page.
Where can I find its source?

Thanks.

-
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: default 500 error page by tomcat

2007-12-27 Thread Mark Thomas
GF wrote:
 But I want to know where to find the source code of that error 500
 page that tomcat automatically generates. I think that's too a .jsp
 page.

It isn't a JSP. It is generated by an internal Tomcat component (a Valve).

 Where can I find its source?
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?revision=543307view=markup

HTH,

Mark

-
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: NoClassDefFoundError: TagExtraInfo missing?

2007-12-27 Thread David Smith
Cool... I see your tomcat lib directory is back to the default 
distribution.  What's in your webapp's WEB-INF/lib directory, and can 
you confirm which java tomcat is running on?  I would like to be sure 
it's not J2EE.  It should be the Java 1.6.0_03 you listed in your 
original post.  Lastly, post the full stack including root causes in 
error messages.  The two stacks you posted below look like they had 
additional information in a root cause.


As far as the last stack you posted (and this is just a guess), is 
app04a.form.OrderForm a true JavaBean with a no argument constructor?


--David

AbelMacAdam wrote:
Hi David, 


I tried what you suggested (quote: Just out of curiousity, are you trying
to run your webapp from within
Eclipse?  If so, try it without Eclipse -- deploy it to your installed
tomcat and see if the error continues.  If the error goes away, it may be
something funky with your Eclipse -- missing .jar file or something.): try
the app in Tomcat without Eclipse (yes, you where right in your assumption
that I used Eclipse as startingpoint of Tomcat).

At first I got the following error:
error
description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page
/jsp/displayAddOrderForm.jsp at line 8

5: /head
6: body
7: html:errors/
8: html:form action=/saveOrder
9: table
10: tr
11:   tdProduct:/td
/error

I looked in my TOMCAT_HOME/lib directory, and found the following jars with
the date stamp of last Monday:
j2ee.jar
j2ee-svc.jar
javaee.jar
I removed these files and got the following error (not the same as the root
cause of this thread):
error
type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException:
javax.servlet.jsp.JspException: Exception creating bean of class
app04a.form.OrderForm: {1}

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994)

org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:553)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:211)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
/error

Clearly, my Tomcat (and Eclipse) have issues in how I configure my system.

Abel

FWIW:
Jar files in TOMCAT_HOME\lib:
annotations-api.jar catalina-ant.jarcatalina-ha.jar 
catalina-tribes.jar
catalina.jar		el-api.jar		jasper-el.jar		jasper-jdt.jar
jasper.jar		jsp-api.jar		servlet-api.jar		tomcat-coyote.jar
tomcat-dbcp.jar		tomcat-i18n-es.jar	tomcat-i18n-fr.jar	tomcat-i18n-ja.jar




David Smith-2 wrote:
  
Sorry Martin, but bad advice.  In recent versions of tomcat, jsp-api is 
provided in the /lib directory of tomcat.  If you have your own in your 
webapp (or in the jave environment for that manner), please remove it as 
it will cause many a wonderous error.


Also tomcat does not work with j2ee as j2ee comes with it's own copy of 
a servlet container and the two will clash with each other.   Replace 
your Java EE environment with the java sdk or java jre environments to 
use tomcat.


The bottom line is jars in tomcat can only exist once along any 
classloader branch.  If it's in the JVM, it can be in tomcat's /lib or 
the webapp's /WEB-INF/lib directories.  If it's in tomcat's /lib, it 
can't exist in the webapp.


Come back with a complete stack trace including any root causes of your 
problem once those are fixed.


--David

Martin Gainty wrote:


Abel
put jsp-api.jar in /WEB-INF/lib
M-
- Original Message -
From: AbelMacAdam [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Monday, December 24, 2007 6:58 AM
Subject: NoClassDefFoundError: TagExtraInfo missing?


  
  

Hi,

I'm trying to bootstrap my knowledge on Struts. As I tried an example I



got
  
  

the following error:
java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagExtraInfo

Searching on this error I got the impression I needed j2ee.jar. I



downloaded
  
  

and installed the Java EE 5 SDK from Sun. In Eclipse (Europa) I
I added a 'J2EE' 

Re: default 500 error page by tomcat

2007-12-27 Thread GF
Thanks.
It's what I was looking for.

 It isn't a JSP. It is generated by an internal Tomcat component (a Valve).

  Where can I find its source?
 http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?revision=543307view=markup

 HTH,


-
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: Subdomain Virtual Hosting.

2007-12-27 Thread david delbecq
Use an apache http proxy that does *.mydomain2.com to 
http://internaltomcat/appX proxying and *.mydomain3.com to 
http://internaltomcat/appY then. Tomcat in itself has no such rules 
support i know of.


Note that you are not forced to use the ROOT for defualtHost :)

Ishtiaq Ahmed a écrit :

Good Day David,

Its nice to see your reply. I tried the ROOT folder for all 
unconfigured domain names but developers are not satisfied with the 
settings. I need to redirect *.mydomain2.com's traffic to that 
specific context of $CATALINA_HOME/webapps/APPx. As the same server 
would be serving for *.mydomain3.com's requests in future too.


Looking Forward for resolution from you...

Regards,

Ishtiaq Ahmed



david delbecq wrote:

Ishtiaq Ahmed a écrit :

Hi,
Now we want it But when we tried it for *.mydomain2.com (Notice that 
* )

if I go like under, it doesn't work. Kindly shed some light into it.

Host name=*.mydomain2.com

 appBase=/usr/local/tomcat6/webapps/APPx
 unpackWARs=true
 autoDeploy=true
 xmlValidation=false
 xmlNamespaceAware=false
  Context path= docBase=/usr/local/tomcat6/webapps/APPx
 debug=0 reloadable=false/

/Host

I hope you understand my problem its about * (Subdomains) to be 
routed to different context path.


Simply put, you can't. If you want to redirect users of unconfigured 
domains to a specific webapp, use the defaultHost attribute of the 
Engine context. The name attribute of the Host context is Network 
name of this virtual host, as registered in your Domain Name Service 
server., as mentionned in docs. If you want more complex rules, you 
might need to configure an appache httpd front-end that does the 
dispatching.

Regards,

Ishtiaq Ahmed

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





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



Get tomcat version from webapp code?

2007-12-27 Thread David kerber
I know I can get the java version from system.properties, but is there a 
way of getting the tomcat version from inside my app?  If so, how?  I'd 
like to be able to display that on an administrator's information page.


TIA!
D



-
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: TrustedPrincipalAuthorizor (extends AuthenticatorBase) Discussion / Comments

2007-12-27 Thread Louis

Christopher Schultz wrote:

Louis wrote:
  

When trying to decide which Authentication I should use I reviewed the
source for the existing ones and realized that none of them would work.
The existing authenticators all check to see if a principal is already
in the request. If it is then the user has already been authenticated
and the authenticator never goes to the Realm to see what permissions /
roles the user has.



That's not how it's supposed to work; authentication and authorization
are separate. Without looking at the source (don't have it handy right
now), the flow ought to be:

- - Determine authentication and authorization requirements
  based upon request URL
- - Check request for principal
  |- if not found, check request for credentials
  |   - if found, load principal into request
  |   - if not found, display login challenge and exit
- - Use found principal for authorization (check roles)

Tomcat's built-in Principal and Request objects conspire to correctly
wire HttpServletRequest.isUserInRole to something within the Principal.
If you choose to gather your Principal information from somewhere else
(NTLM), then you need to take care to play along with Tomcat's notion of
where roles are stored.

If Tomcat does not use the HttpServletRequest.isUserInRole method to
perform its authorization, then you will need to pay attention to the
way it /does/ check for the roles.

  

Since the IIS connector plugs-in a Principal for the
user, this effectively short-circuited the ability of the container to
bind roles to the user.



You should be able to wrap that Principal in some other object if necessary.

  

My solution was to code my own TrustedPrincipalAuthorizor (extends
AuthenticatorBase). I called it an authorizor since it wasn't doing any
actual Authentication.



Is it doing any authorization, or is it just attaching roles to a
Principal and allowing Tomcat to perform the authorization?

  

This class checks for the existence of a
principal in the request. It then uses that principal as the key to tell
the security realm to lookup the users permissions and bind them into
the container for this request.



That seems a little time-consuming to do for every request. Since you're
working with Tomcat's internals, why not permanently attach the role
information to the Principal object one time?

  

Ergo the name. The last step of the
puzzle is to make 'authenticating' (ie: checking the password) optional
in your realm. I coded my LoginModule to have a flag checkPassword=false.

I know that's not the whole picture but it's the gist of it to get a
discussion going. What do people here think, am I following a logical
path or have I completely jumped the shark?



Why not work with the code that the redirector uses to set the Principal
in the first place? I think it would be a cleaner implementation to set
the roles at the time the Principal object is created.

- -chris

Thanks Chris for the detailed response.

I'll have to go back and review how the IIS isapi_redirector.dll is 
hooked into Tomcat to see if changing the redirector would better suit 
my needs.


The reason why I went with this style implementation: it was the first 
way I've figured out of implementing my requirements and it worked. (ie: 
not a good reason architecturally, it just worked). One argument in 
favour of this style of implementation is that it can work with other 
external redirector implementations that embed a Principal in the Request.


I'm not sure about your question re: Is it doing any authorization? My 
understanding of JAAS is that the binding of Roles to the Principal was 
the Authorization. Doing this does allows the security declarations in 
the web.xml to work as expected. ie: The container (tomcat/jboss/etc.) 
is doing the work of checking if the user is in the role.


Yes it is time consuming to do bind the roles on every request. I'm not 
sure yet how the redirector binds the Principal to the Request (per 
session or per request) and/or how Roles are normally bound to the 
Principal.
I'll have to go back to the Tomcat source and trace what's happening in 
the Realm source.


I don't have the experience or tools to be able to create an updated 
redirector. I'm trying to make an implementation that isn't specific to 
the IIS redirector and could be used with other types of redirectors. 
Also, I'm trying to keep my implementation 'java' and I don't know what 
the redirector .dll is written in.


I see where you're going with your suggestions. If the Principal from 
the redirector is created once and the same one is used across requests 
(in a session) then it should be trivial to mutate it (by binding the 
roles in) instead of substituting it with a new one with the roles bound in.


Thanks for taking the time to write a detailed response. I'll get back 
to the list with my changes when I've got them done.


Best Regards,

Louis


JSF and SSI

2007-12-27 Thread Shannon Scott

Hello,
We have been trying to use JSF as a Server Side Include (SSI - .shtml ).
The problem is that the jsf adds an extra set of HTML tags to the page ( 
breaking the page ). 
We have successfully used jsp pages for SSI in the past.
Is there a way to stop tomcat from generating these extra tags when 
rendering the jsf?
I have been looking through the source code.  Can anyone point me to 
where in the source this HTML tag gets inserted?

Thank you for any advice or pointers.
Take care.
Shannon


-
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: ISAPI redirector error in Tomcat 4.1

2007-12-27 Thread Chacko Kuruvilla
Can somebody help me with this error?

Thanks a lot.

-Original Message-
From: Chacko Kuruvilla [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 26, 2007 1:23 PM
To: 'Tomcat Users List'
Subject: RE: ISAPI redirector error in Tomcat 4.1

Here it is...

Created MBeanServer with ID: c4fe76:11716dc479f:-8000:DCHS-HIPAA-VM:1
Dec 26, 2007 8:30:11 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.36
Dec 26, 2007 8:30:21 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 26, 2007 8:30:22 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 26, 2007 8:30:22 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47  config=null
Stopping service Tomcat-Standalone
Dec 26, 2007 8:33:23 AM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Created MBeanServer with ID: c4fe76:11716e053b4:-8000:DCHS-HIPAA-VM:1
Dec 26, 2007 8:34:36 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.36
Dec 26, 2007 8:34:44 AM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Dec 26, 2007 8:34:44 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 26, 2007 8:34:44 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62  config=null
Dec 26, 2007 8:37:31 AM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Software caused connection abort: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537)
at
org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127)
at org.apache.jk.core.MsgContext.action(MsgContext.java:302)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.finish(Response.java:305)
at
org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:285)
at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:
438)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:158)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java
:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:685)
at java.lang.Thread.run(Thread.java:536)
Dec 26, 2007 8:37:31 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Dec 26, 2007 8:37:31 AM org.apache.jk.core.MsgContext action
WARNING: Error sending end packet
java.net.SocketException: Software caused connection abort: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537)
at
org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127)
at org.apache.jk.core.MsgContext.action(MsgContext.java:302)
at org.apache.coyote.Response.action(Response.java:183)
at org.apache.coyote.Response.finish(Response.java:305)
at
org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:285)
at
org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:
438)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:158)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java
:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:685)
at java.lang.Thread.run(Thread.java:536)
Dec 26, 2007 8:37:31 AM org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
Dec 26, 2007 8:39:49 AM org.apache.jk.core.MsgContext action
WARNING: 

NTLM, mod_JK and Internet Explorer

2007-12-27 Thread Lucas Blancher
Hello,
I have a setup that is using Apache 2.2.x, mod_jk 1.2.26, jboss 4.2
(tomcat 5.5) and alfresco.  This setup works file when browsing with
Firefox, but when someone tries to log in using Internet Explorer they get a
message saying This page can not be displayed after entering their
username and password.  When I use the native http handler in tomcat,
Internet Explorer works correctly and the pages are displayed after the NTLM
username and password prompt.  The difference I see when checking the logs
is that when IE and mod_jk are used a 401 http code gets retuned.  A 401
http return code does not show in the logs when Firefox is used.  Has anyone
has this problem before? Any Idea's?  If you need more information please
let me know.

Thanks,
Lucas Blancher  


-
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: ISAPI redirector error in Tomcat 4.1

2007-12-27 Thread Chacko Kuruvilla
Thanks for your response.

I removed the older version of isapi redirector and started from scratch
using isapi_redirect-1.2.26.dll. When I try now, I get an Incorrect
function message on the browser.

Any ideas?

Thanks.

-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 27, 2007 1:43 PM
To: Tomcat Users List
Subject: Re: ISAPI redirector error in Tomcat 4.1

Hi Chacko,

if you can reproduce the problem easily, please do the following:

- make sure you are using the latest version of the isapi redirector (at
the moment 1.2.26)
- Make sure your redirector is correctly configured, especially, that it
writes a log file
- increase isapi redirector log level to debug
- do a fresh start of iis (clean log file before) and reproduce the problem
- Give us a way to look at the file
- let us know, how the http request that produces the problem exactly
looks like

Regards,

Rainer

Chacko Kuruvilla schrieb:
 Can somebody help me with this error?
 
 Thanks a lot.
 
 -Original Message-
 From: Chacko Kuruvilla [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, December 26, 2007 1:23 PM
 To: 'Tomcat Users List'
 Subject: RE: ISAPI redirector error in Tomcat 4.1
 
 Here it is...
 
 Created MBeanServer with ID: c4fe76:11716dc479f:-8000:DCHS-HIPAA-VM:1
 Dec 26, 2007 8:30:11 AM org.apache.coyote.http11.Http11BaseProtocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8080
 Starting service Tomcat-Standalone
 Apache Tomcat/4.1.36
 Dec 26, 2007 8:30:21 AM org.apache.coyote.http11.Http11BaseProtocol start
 INFO: Starting Coyote HTTP/1.1 on http-8080
 Dec 26, 2007 8:30:22 AM org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 Dec 26, 2007 8:30:22 AM org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/47  config=null
 Stopping service Tomcat-Standalone
 Dec 26, 2007 8:33:23 AM org.apache.coyote.http11.Http11BaseProtocol
destroy
 INFO: Stopping Coyote HTTP/1.1 on http-8080
 Created MBeanServer with ID: c4fe76:11716e053b4:-8000:DCHS-HIPAA-VM:1
 Dec 26, 2007 8:34:36 AM org.apache.coyote.http11.Http11BaseProtocol init
 INFO: Initializing Coyote HTTP/1.1 on http-8080
 Starting service Tomcat-Standalone
 Apache Tomcat/4.1.36
 Dec 26, 2007 8:34:44 AM org.apache.coyote.http11.Http11BaseProtocol start
 INFO: Starting Coyote HTTP/1.1 on http-8080
 Dec 26, 2007 8:34:44 AM org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 Dec 26, 2007 8:34:44 AM org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/62  config=null
 Dec 26, 2007 8:37:31 AM org.apache.jk.core.MsgContext action
 WARNING: Error sending end packet
 java.net.SocketException: Software caused connection abort: socket write
 error
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at
 java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
   at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
   at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537)
   at
 org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127)
   at org.apache.jk.core.MsgContext.action(MsgContext.java:302)
   at org.apache.coyote.Response.action(Response.java:183)
   at org.apache.coyote.Response.finish(Response.java:305)
   at
 org.apache.coyote.tomcat4.OutputBuffer.close(OutputBuffer.java:285)
   at

org.apache.coyote.tomcat4.CoyoteResponse.finishResponse(CoyoteResponse.java:
 438)
   at
 org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:158)
   at
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
   at
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
   at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
   at

org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
   at

org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java
 :895)
   at

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
 a:685)
   at java.lang.Thread.run(Thread.java:536)
 Dec 26, 2007 8:37:31 AM org.apache.jk.common.ChannelSocket
processConnection
 WARNING: processCallbacks status 2
 Dec 26, 2007 8:37:31 AM org.apache.jk.core.MsgContext action
 WARNING: Error sending end packet
 java.net.SocketException: Software caused connection abort: socket write
 error
   at java.net.SocketOutputStream.socketWrite0(Native Method)
   at
 java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
   at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
   at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:537)
   at
 org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:127)
   at org.apache.jk.core.MsgContext.action(MsgContext.java:302)
   at org.apache.coyote.Response.action(Response.java:183)
   at org.apache.coyote.Response.finish(Response.java:305)
   

Re: Re^2: Comet servlet synchronization and flush problems

2007-12-27 Thread Leonardo Fraga

Hello,

Your posts helped a lot. Thanks everybody!
Now I have a production level asynchronous servlet (a Santa Claus' 
gift?), and I want to share some technical learned lessons:
- You must ensure the response be commited before asynchronous writes, 
say on the BEGIN event, as said Filip and Frank.
- You must ensure there will not be asynchronous writes on the response 
after respective ERROR and END events were processed.
- You must treat every IOException on asynchronous writes as 
unrecoverable (so, stop writing on that response). Each of these IOE 
will always be followed by an ERROR event.
- You must ensure only one thread will access the response, say for 
write, flush, at each time.
- You must ensure your response collection stays ok along time 
(collection = BEGIN - ERROR - END). Synchronized and finally are good 
friends for that.
- You must avoid a big global lock strategy (like that pointed on the 
ChatCometServletExample). Such a lock drastically reduces your throughput.
- It's easier to wrap the responses and build the response collection as 
thread-safe capsules. Then you can solve all these constraints by design.


Thanks again

Hugs,

Leonardo Fraga
Web Developer
Cedro Finances


Filip Hanik - Dev Lists wrote:


ffd wrote:

I found the origin of the problem in my case. The problem was neither 
the

synchronization nor the  connection gone. It was that the asynchronous
writing started too early, before the connection was completely 
established,
speaking losely...   


just call response.flushBuffer() on the BEGIN event, should get 
everything squared away


Filip

When I made sure that the writing starts *after* all the headers were 
set,

the NPE was gone. I didn't see the same mistake in Leonardo's code, but
maybe it's a hint.

BTW, I very much like the Tomcat approach to Comet. In its striking yet
powerful simplicity it's much simpler and clearer to handle than 
Grizzly (we
tried Grizzly before choosing to go with Tomcat) or Jetty. I hope 
that any

standardization efforts will go along Tomcat's lines.

Frank Felix
1000MIKES.COM



Filip Hanik - Dev Lists wrote:
 

a NPE probably has nothing to do with synchronization, more like you 
are trying to write back on an invalid connection (that probably 
timed out)


Filip

Leonardo Fraga wrote:
   


Hello,

I'm developing a java web application for finances quotes' 
real-time stream, for hundreds of concurrent users. The solution 
involves a long http request serving javascript snippets that will 
be executed by broser when received, changing the data shown to the 
user.


To do this, I have a Comet servlet, ServletStream, that receives 
the request, and registers a new instance of 
JavascriptNotificationListener, a wrapper to the response.writer, 
to a running worker thread, MarketNotifier, that, when a market 
event occurs, fires the JavascriptNotificationListener that writes 
the corresponding event javascript snippet to the response.writer. 
There is the Flusher, a running thread that awakes every half 
second and do a flush on every registered response.writer through 
the same JavascriptNotificationListener. And there is a servlet, 
StreamAction, that submits commands to the MarketNotifier, to 
change the market event subscriptions. Some of these commands can 
also fire market events on the JavascriptNotificationListener, and 
are run while the ServletStream is sending data.


Every IO on the writer (print, println, flush, checkError) is 
synchronized on a mutex Object holded by each instance of 
JavascriptNotificationListener, that is, I have a mutex for each 
response.writer.


When running this solution, I often use to get the following error:
java.lang.NullPointerException
   at 
org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:607) 

   at 
org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:600) 

   at 
org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1025) 


   at org.apache.coyote.Response.action(Response.java:183)
   at org.apache.coyote.Response.sendHeaders(Response.java:379)
   at 
org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:305) 

   at 
org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288) 

   at 
org.apache.catalina.connector.CoyoteWriter.flush(CoyoteWriter.java:95)
   at 
br.com.cedro.stream.JavascriptNotificationListener.syn(JavascriptNotificationListener.java:106) 


   at br.com.cedro.stream.Flusher.run(Flusher.java:42)

This error occurs even on low usage scenarios (five concurrent 
users) almost every hour. After the first occurrence happens, every 
other IO on all response.writers catches the same exception.


I'm using apache-tomcat-6.0.14, with default Nio Http Connector 
configuration parameters on server.xml.


I think this problem has to do with synchronization for IO 
operations. Am I right? Or must I simply check some status before 
doing IO?


The Chat Comet tomcat 

Re: Get tomcat version from webapp code?

2007-12-27 Thread Martin Gainty
Hi Dave-

did you look at MBeanServer?

http://tomcat.apache.org/tomcat-5.5-doc/catalina/funcspecs/mbean-names.html

M-
- Original Message - 
From: David kerber [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, December 27, 2007 11:53 AM
Subject: Get tomcat version from webapp code?


 I know I can get the java version from system.properties, but is there a 
 way of getting the tomcat version from inside my app?  If so, how?  I'd 
 like to be able to display that on an administrator's information page.
 
 TIA!
 D
 
 
 
 -
 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: NTLM, mod_JK and Internet Explorer

2007-12-27 Thread Lucas Blancher
Hello, 
Thank you for your response, but I don't think this is applicable, I
am not using IIS for the front end, I am using Apache so I don't think I
have the sub codes that you are referring to.  Even in IE I get an initial
prompt for a username and password(witch I enter and press ok), but then I
get the 401 Error.  I know it's a 401 error from reviewing the mod_jk and
access_log logs.

Lucas  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: December 27, 2007 16:25
To: [EMAIL PROTECTED]
Subject: Re: NTLM, mod_JK and Internet Explorer

401 is unauthorised but the real reason is the subcode explained here
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/c
9511f97-d898-4aed-b0a8-979ce30d85b5.mspx?mfr=true
In any case the webserver should  present a login credential screen it is
this screen that contains the credentials to pass thru to NTLM authenticator
It seems that you do not see that screen so I would inform the web-admin

M--

- Original Message -
Wrom: VWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPT
To: users@tomcat.apache.org
Sent: Thursday, December 27, 2007 3:06 PM
Subject: NTLM, mod_JK and Internet Explorer


 Hello,
 I have a setup that is using Apache 2.2.x, mod_jk 1.2.26, jboss 4.2 
 (tomcat 5.5) and alfresco.  This setup works file when browsing with 
 Firefox, but when someone tries to log in using Internet Explorer they 
 get
a
 message saying This page can not be displayed after entering their 
 username and password.  When I use the native http handler in tomcat, 
 Internet Explorer works correctly and the pages are displayed after 
 the
NTLM
 username and password prompt.  The difference I see when checking the 
 logs is that when IE and mod_jk are used a 401 http code gets retuned.  
 A 401 http return code does not show in the logs when Firefox is used.  
 Has
anyone
 has this problem before? Any Idea's?  If you need more information 
 please let me know.

 Thanks,
 Lucas Blancher


 -
 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: JSF and SSI

2007-12-27 Thread david delbecq

Shannon Scott a écrit :

Hello,
We have been trying to use JSF as a Server Side Include (SSI - .shtml ).

What you mean by SSI (in the context of tomcat)?
The problem is that the jsf adds an extra set of HTML tags to the page 
( breaking the page ). We have successfully used jsp pages for SSI in 
the past.
What extra set do you mean? JSF does render what it is asked to render 
(a form, various input and maybe some javascript, depending on 
implementation)
Is there a way to stop tomcat from generating these extra tags when 
rendering the jsf?

Tomcat does not generate extra tag, except if asked to do with jsf rules.
I have been looking through the source code.  Can anyone point me to 
where in the source this HTML tag gets inserted?

Thank you for any advice or pointers.
Take care.
Shannon


-
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: NTLM, mod_JK and Internet Explorer

2007-12-27 Thread Martin Gainty
let me be more direct
what is the subcode?

M-
- Original Message -
From: Lucas Blancher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: users@tomcat.apache.org
Sent: Thursday, December 27, 2007 4:44 PM
Subject: RE: NTLM, mod_JK and Internet Explorer


 Hello,
 Thank you for your response, but I don't think this is applicable, I
 am not using IIS for the front end, I am using Apache so I don't think I
 have the sub codes that you are referring to.  Even in IE I get an initial
 prompt for a username and password(witch I enter and press ok), but then I
 get the 401 Error.  I know it's a 401 error from reviewing the mod_jk and
 access_log logs.

 Lucas

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: December 27, 2007 16:25
 To: [EMAIL PROTECTED]
 Subject: Re: NTLM, mod_JK and Internet Explorer

 401 is unauthorised but the real reason is the subcode explained here

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/c
 9511f97-d898-4aed-b0a8-979ce30d85b5.mspx?mfr=true
 In any case the webserver should  present a login credential screen it is
 this screen that contains the credentials to pass thru to NTLM
authenticator
 It seems that you do not see that screen so I would inform the web-admin

 M--

 - Original Message -
 Wrom: VWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPT
 To: users@tomcat.apache.org
 Sent: Thursday, December 27, 2007 3:06 PM
 Subject: NTLM, mod_JK and Internet Explorer


  Hello,
  I have a setup that is using Apache 2.2.x, mod_jk 1.2.26, jboss 4.2
  (tomcat 5.5) and alfresco.  This setup works file when browsing with
  Firefox, but when someone tries to log in using Internet Explorer they
  get
 a
  message saying This page can not be displayed after entering their
  username and password.  When I use the native http handler in tomcat,
  Internet Explorer works correctly and the pages are displayed after
  the
 NTLM
  username and password prompt.  The difference I see when checking the
  logs is that when IE and mod_jk are used a 401 http code gets retuned.
  A 401 http return code does not show in the logs when Firefox is used.
  Has
 anyone
  has this problem before? Any Idea's?  If you need more information
  please let me know.
 
  Thanks,
  Lucas Blancher
 
 
  -
  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 JSF custom error page

2007-12-27 Thread Louis

David Segall wrote:

I have, after hours of trial and error, managed to persuade Tomcat to
use my custom error page in a Java Server Faces application. Now that 
I have solved the problem I would like to know where I could have 
looked to find the answer.


In case someone finds this page via a web search I should provide the
answer here. I had to add the following lines to 
%CATALINA_HOME%\webapps\MyApp\WEB-INF\web.xml


error-page
error-code404/error-code
location/faces/pagenotfound.jsp/location
/error-page

The initial / was required in the location despite the fact that the 
NetBeans Visual Web Pack generated welcome-file tag did not have a 
leading /. Would I have solved this problem more quickly if I was 
not using NetBeans as a rapid application development tool?


The j2ee specification or web.xml dtd or xsd would have told you that 
information. This doesn't really have anything to do with JSF specifically.


 The initial /
Yeah they could have been a little more consistent.

Would you have solved the problem more quickly? Not likely. Netbeans 
isn't a RAD tool. It's an IDE (integrated development environment). RAD 
is more a way of working rather than the tools you're using. At least 
initially you're better off using one IDE consistently rather than 
jumping ships everytime you have a problem. Once you get comfortable 
developing in one, then I would recommend you try two or more other 
IDE's to see how they do things differently. And flat out learn how to 
do what you're doing with a plain text editor. You'll understand what's 
actually going on in the IDE better.


Further Reading:
http://java.sun.com/dtd/web-app_2_3.dtd
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

This documents well (in english) what each of the elements in the 
web.xml are for.

http://e-docs.bea.com/wls/docs61/webapp/web_xml.html


-
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: Get tomcat version from webapp code?

2007-12-27 Thread Louis

David kerber wrote:
I know I can get the java version from system.properties, but is there 
a way of getting the tomcat version from inside my app?  If so, how?  
I'd like to be able to display that on an administrator's information 
page.


TIA!
D


If you crack open the tomcat ROOT application from a default install and 
look at the index.jsp file, right at the top you'll some something like 
this:


head
   title%= application.getServerInfo() %/title
...

Which displays this (in tomcat 5.5.23):
Apache Tomcat/5.5.23

Other reading:
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletContext.html



-
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: NTLM, mod_JK and Internet Explorer

2007-12-27 Thread Mark Thomas
Lucas Blancher wrote:
 How do I find the sub code in Apache httpd?  I am using the common logging
 format and it already has %s in the logging string, but my logs only have
 401 in them, without any subcodes. An example is 

Personally, I'd ignore the sub code question and look what is going back
and forth between the client and httpd. I'd use ieHttpHeaders in IE and
Live Http Headers in Firefox and do a compare and contrast between the
working configuration and the broken one.

I'd expect to see a number of differences some of which will be irrelevant
but at least one will be key. The trick is to figure out which is
significant. Post the results here if you need help.

Mark


-
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: NTLM, mod_JK and Internet Explorer

2007-12-27 Thread Lucas Blancher
How do I find the sub code in Apache httpd?  I am using the common logging
format and it already has %s in the logging string, but my logs only have
401 in them, without any subcodes. An example is 

10.11.12.13 - - [27/Dec/2007:14:18:07 -0500] GET
/alfresco/faces/jsp/dashboards/container.jsp HTTP/1.1 401 - -
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET
CLR 1.1.4322) 

Thanks,
Lucas

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: December 27, 2007 16:46
To: Lucas Blancher
Cc: users@tomcat.apache.org
Subject: Re: NTLM, mod_JK and Internet Explorer

let me be more direct
what is the subcode?

M-
- Original Message -
From: Lucas Blancher [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: users@tomcat.apache.org
Sent: Thursday, December 27, 2007 4:44 PM
Subject: RE: NTLM, mod_JK and Internet Explorer


 Hello,
 Thank you for your response, but I don't think this is applicable, I 
 am not using IIS for the front end, I am using Apache so I don't think 
 I have the sub codes that you are referring to.  Even in IE I get an 
 initial prompt for a username and password(witch I enter and press 
 ok), but then I get the 401 Error.  I know it's a 401 error from 
 reviewing the mod_jk and access_log logs.

 Lucas

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: December 27, 2007 16:25
 To: [EMAIL PROTECTED]
 Subject: Re: NTLM, mod_JK and Internet Explorer

 401 is unauthorised but the real reason is the subcode explained here

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/c
 9511f97-d898-4aed-b0a8-979ce30d85b5.mspx?mfr=true
 In any case the webserver should  present a login credential screen it 
 is this screen that contains the credentials to pass thru to NTLM
authenticator
 It seems that you do not see that screen so I would inform the 
 web-admin

 M--

 - Original Message -
 Wrom: VWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPT
 To: users@tomcat.apache.org
 Sent: Thursday, December 27, 2007 3:06 PM
 Subject: NTLM, mod_JK and Internet Explorer


  Hello,
  I have a setup that is using Apache 2.2.x, mod_jk 1.2.26, jboss 4.2 
  (tomcat 5.5) and alfresco.  This setup works file when browsing with 
  Firefox, but when someone tries to log in using Internet Explorer 
  they get
 a
  message saying This page can not be displayed after entering their 
  username and password.  When I use the native http handler in 
  tomcat, Internet Explorer works correctly and the pages are 
  displayed after the
 NTLM
  username and password prompt.  The difference I see when checking 
  the logs is that when IE and mod_jk are used a 401 http code gets
retuned.
  A 401 http return code does not show in the logs when Firefox is used.
  Has
 anyone
  has this problem before? Any Idea's?  If you need more information 
  please let me know.
 
  Thanks,
  Lucas Blancher
 
 
  
  - 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]


-
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: NTLM, mod_JK and Internet Explorer

2007-12-27 Thread Martin Gainty

at last count there are (at least) 7 possible reasons for a 401 since the 
authentication is tied to NTLM would suggest its a problem with the acls
in addition to the suggested tools:get firebug in firefox to see the gets/posts 
as well as stepping thru any 
JShttp://www.joehewitt.com/blog/firebug_for_iph.phpI would also look at getting 
fiddler for traffic analysis (there are many others out there)
http://www.fiddlertool.com/fiddler/
 
of course posting the code would tell you in less than 1 minute what 
authentication the servlet is implementing..and why the user your client is 
using is failing under all versions of IE and not under firefox...
 
Martin __Disclaimer and 
confidentiality noteEverything in this e-mail and any attachments relates to 
the official business of Sender. This transmission is of a confidential nature 
and Sender does not endorse distribution to any party other than intended 
recipient. Sender does not necessarily endorse content contained within this 
transmission. Date: Thu, 27 Dec 2007 23:14:12 + Wrom: 
FAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCXLYRWTQTIPWIGYOKSTTZRCLBDXRQBGJSNBOHMKHJYFMYXOEAIJJPHSCRTNHGSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHYUCDD
 significant. Post the results here if you need help.  Mark   
- To start 
a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL 
PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 
_
Get the power of Windows + Web with the new Windows Live.
http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007

Re: Regarding setting log size

2007-12-27 Thread abdul razack
Thaank you David.
  As you suggest, I am applying log4j
   
  Regards
  -Abdul Razack

david delbecq [EMAIL PROTECTED] wrote:
  catalina.out it the output of stdio and stderr, for this file, it's not 
easy to logrotate it, unless you stop tomcat at night. For the others 
ones, using log4j, i suggest you take a look at log4j documentation, it 
explains how to do rotating log for the log4j appenders.
abdul razack a écrit :
 Hi,
 
 We are using tomcat apache-tomcat-5.5.23 for development purpose.
 We want the same tomcat to push for Production in Window 2000 server.
 
 Our web application log level is low.
 
 All logs would be created in directory D:\apache-tomcat-5.5.23\logs.
 The log file names are as,
 1.localhost.2007-12-24.log
 2.catalina.2007-12-24.log
 3.manager.2007-12-24.log
 4.host-manager.2007-12-24.log
 5.admin.2007-12-24.log
 
 But log size would increase in production day by day. 
 
 We want that tomcat automatically archives the log files and
 create a new one once a certains size is reached.
 
 we are not using log4j properties.
 
 Please help us what needs to set in logging.properties file.
 
 Thanks  Regards
 -Abdul Razack
 

 
 -
 Never miss a thing. Make Yahoo your homepage.
 


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



   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: NoClassDefFoundError: TagExtraInfo missing?

2007-12-27 Thread AbelMacAdam

Hi David,

To answer your questions:

What's in your webapp's WEB-INF/lib directory, 
My TOMCAT_HOME\webapps\myApp\WEB-INF\lib contains:
antlr.jar commons-beanutils.jar 
commons-collections.jar   
commons-digester.jar  commons-fileupload.jarcommons-lang.jar  
commons-logging.jar   commons-validator.jar jakarta-oro.jar   
jstl.jar  log4j-1.2.7.jar   standard.jar
struts.jar


and can you confirm which java tomcat is running on?
C:\Program Files\Java\jre1.6.0_03\bin\client\jvm.dll


post the full stack including root causes in error messages.
Sorry, can't help you here. I was overzealous yesterday, in cleaning out my
Tomcat\webapps directory :-[. To recreate the error environment I copied a
few directories of the book [1] I'm studying from back to webapps, but now
it works as it should do. (???)

However, I did saw some other strange behavior yesterday. After copying
directories of the books sources to Tomcat's webapps directory (and
restarting the app-server) I got the display as it should be, but after a
refresh of the page I got an error message. And whatever I do, that error
persists. At the moment I get an Nullpointer exception (and I know that is a
beginners error, an uninstantiated object). So I have to find the cause of
that error. Yesterday, on the other hand, I had a primary page. So I'm
afraid I must have magical, bad weather, or any other bad influences,
playing havoc with my examples. Do you know any exorcist I can use?

And finally:

s far as the last stack you posted (and this is just a guess), is
app04a.form.OrderForm a true JavaBean with a no argument constructor? 
OrderForm is a no argument constructor

Abel

[1] Struts Design and Programming, A tutorial by Budi Kurniawan


David Smith-2 wrote:
 
 Cool... I see your tomcat lib directory is back to the default 
 distribution.  What's in your webapp's WEB-INF/lib directory, and can 
 you confirm which java tomcat is running on?  I would like to be sure 
 it's not J2EE.  It should be the Java 1.6.0_03 you listed in your 
 original post.  Lastly, post the full stack including root causes in 
 error messages.  The two stacks you posted below look like they had 
 additional information in a root cause.
 
 As far as the last stack you posted (and this is just a guess), is 
 app04a.form.OrderForm a true JavaBean with a no argument constructor?
 
 --David
 
 AbelMacAdam wrote:
 Hi David, 

 I tried what you suggested (quote: Just out of curiousity, are you
 trying
 to run your webapp from within
 Eclipse?  If so, try it without Eclipse -- deploy it to your installed
 tomcat and see if the error continues.  If the error goes away, it may be
 something funky with your Eclipse -- missing .jar file or something.):
 try
 the app in Tomcat without Eclipse (yes, you where right in your
 assumption
 that I used Eclipse as startingpoint of Tomcat).

 At first I got the following error:
 error
 description The server encountered an internal error () that prevented it
 from fulfilling this request.

 exception

 org.apache.jasper.JasperException: An exception occurred processing JSP
 page
 /jsp/displayAddOrderForm.jsp at line 8

 5: /head
 6: body
 7: html:errors/
 8: html:form action=/saveOrder
 9: table
 10: tr
 11:   tdProduct:/td
 /error

 I looked in my TOMCAT_HOME/lib directory, and found the following jars
 with
 the date stamp of last Monday:
 j2ee.jar
 j2ee-svc.jar
 javaee.jar
 I removed these files and got the following error (not the same as the
 root
 cause of this thread):
 error
 type Exception report

 message

 description The server encountered an internal error () that prevented it
 from fulfilling this request.

 exception

 org.apache.jasper.JasperException: javax.servlet.ServletException:
 javax.servlet.jsp.JspException: Exception creating bean of class
 app04a.form.OrderForm: {1}

 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)

 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

 org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)

 org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:994)

 org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:553)

 org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:211)
  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 /error

 Clearly, my Tomcat (and Eclipse) have