[jira] [Commented] (MTOMCAT-230) CLONE - Plugin uploads WAR file twice

2013-07-08 Thread Rainer Jung (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701837#comment-13701837
 ] 

Rainer Jung commented on MTOMCAT-230:
-

OK, your workers.properties are pretty minimal but shouldn't pose problems. A 
more production ready config can ba found in the mod_jk source download or in 
subversion under

http://svn.apache.org/viewvc/tomcat/jk/trunk/conf/workers.properties?view=co

and

http://svn.apache.org/viewvc/tomcat/jk/trunk/conf/httpd-jk.conf?view=co

At least "recovery_options" should be considered.

You are using the peruser MPM, not sure what implications that could have.

apache2/access_log

127.0.0.1 - - [08/Jul/2013:11:46:41 +0700] "PUT 
/manager/text/deploy?path=%2F&update=true HTTP/1.1" 401 2474
127.0.0.1 - - [08/Jul/2013:11:46:42 +0700] "PUT 
/manager/text/deploy?path=%2F&update=true HTTP/1.1" 200 90

The first request with status code 401 needed an authorization which was then 
passed in the second request. So from the apache point of view there was only 
one "real" request (the second one, the first one was rejected).

apache/mod_jk.log


[Mon Jul 08 11:45:12.052 2013] [10703:139858959705920] [error] 
extension_fix::jk_uri_worker_map.c (564): Could not find worker with name 
'ajp13' in uri map post processing.

This indicates, that somewhere else in your config (not presented to us), you 
configured a forwarding via a worker named "ajp13" (or unnamed), which is not 
present in your workers.properties. That shouldn't be related to the double 
upload though.

The next lines indicate, that there is more config you didn't show 
(JkRequestLogFormat):

[Mon Jul 08 11:46:42.023 2013] worker1 localhost 0.414589
[Mon Jul 08 11:46:58.403 2013] worker1 localhost 16.366236

Apart from these comments I don't see anything special here, no indication, 
that mod_jk does a double post. You could check the Tomcat access log file.

> CLONE - Plugin uploads WAR file twice
> -
>
> Key: MTOMCAT-230
> URL: https://issues.apache.org/jira/browse/MTOMCAT-230
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat6
>Affects Versions: 2.0
> Environment: Win7/64, Maven 3.0.4
>Reporter: Stanislav Grushevskiy
>Assignee: Olivier Lamy (*$^¨%`£)
>
> To reproduce this issue you need to install apache and mod_jk and deploy 
> application to apache, mod_jk, tomcat.
> If you deploy just to tomcat you will not reproduce it.
> This situation is reproduced in tomcat 6, 7.
> When I deploy my WAR using maven, the target war (exact the same one) is 
> being uploaded to the server twice. Can someone explain that?
> I am using this on my module:
> {code}clean install org.apache.tomcat.maven:tomcat6-maven-plugin:2.0:redeploy 
> {code}
> From the Log file
> {code =xml}
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mobile-server ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mobile-server] in 
> [C:\develope\mobile\mobile-server\target\mobile-server]
> [INFO] Processing war project
> [INFO] Copying webapp resources 
> [C:\develope\mobile\mobile-server\src\main\webapp]
> [INFO] Webapp assembled in [241 msecs]
> [INFO] Building war: C:\develope\mobile\mobile-server\target\mobile-server.war
> [INFO] 
> [INFO] <<< tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server <<<
> [INFO] 
> [INFO] --- tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server 
> ---
> [INFO] Deploying war to http://myserver.eu/pra-mobile-server  
> Uploading: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> Uploaded: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true 
> (12678 KB at 49.3 KB/sec)
> Uploading: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> Uploaded: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> {code}
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
> 4.0.0
> 
> eu.company.prj.pramobile
> mobile-parent
> ../mobile-parent/pom.xml
> 1.0-SNAPSHOT
> 
> mobile-server
> war
> mobile server
> 
> 1.1.2
> 
> 
> 
> com.springsource.repository.libs-milestone
> SpringSource Enterprise Bundle Repository - libs
> http://repo.springsource.org/libs-milestone/
> 
>  
> 
> 
> ${project.groupId}
> mobile-test
> ${project.version}
> test
> 
> 
> ${project.groupId}
> mobile-common
> ${project.version}
> 
> 
> 
> org.springframework
> spring-asm
> ${version.spring}
> 
> 
> org.springframework
> 

Re: Jasper improvements/XML handling

2013-07-08 Thread Mark Thomas
On 08/07/2013 06:38, Jeremy Boynes wrote:
> On Jun 25, 2013, at 10:44 PM, Jeremy Boynes 
> wrote:
> 
>> I have been thinking about improvements to Jasper as well around
>> better support for Servlet 3.0 concepts. One area would be
>> decoupling it from Tomcat, bootstrapping using an SCI as hinted in
>> ContextConfig.

It was the intention of the Servlet EG that this should be possible.
There are a number of areas where changes are required to make this
work. I think you have identified the main ones.

>> I'd also be interested in improving the Ant task as
>> well, such as support for pre-compiling a separate package that
>> would be treated as a web fragment (including web.xml-less
>> pre-compilation, generating a web-fragment.xml rather than a
>> web.xml snippet or potentially eliminating the XML entirely if the
>> generated code can be annotated with @WebServlet).

My preference would be for the web-fragment.xml approach as I prefer
having just a single file to look at when debugging.

> I started on this and ended up with two patches that are converging.
> For 55166 (which started out somewhere different), I have a patch to
> update local entity handling in Catalina's XML parsing; for 53737, I
> started to have Jasper's translator rely only on the ServletContext
> and not need to parse merged web.xml XML passed as a ServletContext
> attribute. These are converging in a few areas.

Small, incremental changes are the way to go rather than one big patch.
The larger the patch the less likely it is to get applied.

I'd suggest getting the 55166 issues fixed first, then start looking at
the larger problem of making Jasper rely solely on the Servlet API.

> Jasper's descriptor parser (used for web.xml and TLDs) can only
> validate DTD-based documents. I opened 55212 about adding it. Such a
> fix could benefit from using the same resolver and cached copies that
> Catalina does. This is less of an issue if Jasper uses the
> ServletContext as it could rely on the container to parse/validate
> web.xml. It would still be needed if we wanted JspC to validate files
> standalone but there is a separate ant task that can do that.

Jasper and Catalina need to share the same web.xml parsing and merging
code. Violetta started on this before she was a committer but the work
stalled primarily because of the size of patch which in turn was due to
the re-factoring required. The first step is to get the parsing and
merging into a package that can be shared by Jasper and Catalina. That
is far easier for a committer to do as they can use the refactoring
tools in an IDE rather than having to generate a huge patch and then
wait for a committer to find the time to review it.

> Another area of convergence is in parsing TLDs: currently both
> Catalina and Jasper do it, differently.

A lot of the code is identical with large comments to keep the two
implementations in sync.

> I believe Catalina only reads
> them to detect the Listeners they define and if that's the case we
> could perhaps add a SCI to Jasper that handled all TLD functionality
> including registering the listeners programmatically (at least that's
> what Servlet 8.3 implies).

Agreed.

> That would remove Catalina's dependency
> on web-jsptaglibrary*.xsd and on TLD-related classes. To support
> validation though we would need to add the XSD-based validation in
> Jasper.

This is beginning to get far enough away from where the code is right
now that I'd suggest just noting the issue and come back to it when the
other changes are complete.

> Finally, Jasper parses these documents first into DOM and the into
> its own version based on TreeNode (this is separate from the parse
> tree used for actual JSPs). Jasper already depends on tomcat-util for
> the JarScanner so could potentially use Digester for this in the same
> way Catalina does. It would simplify the fragment merge logic in JspC
> if it could reuse what was in Catalina's WebXml (something I'm
> hacking around in 53737 right now).  Alternatively, we could still
> eliminate the intermediary DOM and TreeNode forms and use SAX or StAX
> to parse directly into Jasper's objects - especially for TLDs where
> it is using the spec's classes (TagLibraryInfo and TagInfo) as the
> model.

Again, I think this is looking too far ahead.

> I'm planning on merging these two patches and pressing on with a
> converged solution, but probably won't be able to do much until next
> weekend.

I very much doubt that a single patch that did everything above would
ever get applied. Small incremental changes are the way to do this. I
think you've identified the key issues and the right order in which to
address them. Lets move forward but one small step at a time.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[jira] [Commented] (MTOMCAT-230) CLONE - Plugin uploads WAR file twice

2013-07-08 Thread Stanislav Grushevskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701853#comment-13701853
 ] 

Stanislav Grushevskiy commented on MTOMCAT-230:
---

tomcat/access_log

127.0.0.1 - - [08/Jul/2013:11:46:41 +0700] "PUT 
/manager/text/deploy?path=%2F&update=true HTTP/1.1" 401 2474
127.0.0.1 - tomcat [08/Jul/2013:11:46:58 +0700] "PUT 
/manager/text/deploy?path=%2F&update=true HTTP/1.1" 200 90



full jk_workers.properties

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Note that the distributed version of this file requires modification
# before it is usable.
#
# Reference documentation: 
http://tomcat.apache.org/connectors-doc/reference/workers.html
#
# As a general note, the characters $( and ) are used internally to define
# macros. Do not use them in your own configuration!!!
#
# Whenever you see a set of lines such as:
# x=value
# y=$(x)\something
#
# the final value for y will be value\something

# Define two status worker:
# - jk-status for read-only use
# - jk-manager for read/write use
worker.list=jk-status
worker.jk-status.type=status
worker.jk-status.read_only=true

worker.list=jk-manager
worker.jk-manager.type=status

# We define a load balancer worker
# with name "balancer"
worker.list=balancer
worker.balancer.type=lb
# error_escalation_time: seconds, default = recover_time/2 (=30)
# Determines, how fast a detected error should switch from
# local error state to global error state
# Since: 1.2.28
worker.balancer.error_escalation_time=0

# - max_reply_timeouts: number, default=0
#   If there are to many reply timeouts, a worker
#   is put into the error state, i.e. it will become
#   unavailable for all sessions residing on the respective
#   Tomcat. The number of tolerated reply timeouts is
#   configured with max_reply_timeouts. The number of
#   timeouts occuring is divided by 2 once a minute and the
#   resulting counter is compared against max_reply_timeouts.
#   If you set max_reply_timeouts to N and the errors are
#   occuring equally distributed over time, you will
#   tolerate N/2 errors per minute. If they occur in a burst
#   you will tolerate N errors.
#   Since: 1.2.24
worker.balancer.max_reply_timeouts=10



# Now we add members to the load balancer
# First member is "node1", most
# attributes are inherited from the
# template "worker.template".
worker.balancer.balance_workers=node1
worker.node1.reference=worker.template
worker.node1.host=localhost
worker.node1.port=8109
# Activation allows to configure
# whether this node should actually be used
# A: active (use node fully)
# D: disabled (only use, if sticky session needs this node)
# S: stopped (do not use)
#   Since: 1.2.19
worker.node1.activation=A

# Second member is "node2", most
# attributes are inherited from the
# template "worker.template".
worker.balancer.balance_workers=node2
worker.node2.reference=worker.template
worker.node2.host=localhost
worker.node2.port=8209
# Activation allows to configure
# whether this node should actually be used
# A: active (use node fully)
# D: disabled (only use, if sticky session needs this node)
# S: stopped (do not use)
#   Since: 1.2.19
worker.node2.activation=A

# Finally we put the parameters
# which should apply to all our ajp13
# workers into the referenced template
# - Type is ajp13
worker.template.type=ajp13

# - socket_connect_timeout: milliseconds, default=0
#   Since: 1.2.27
worker.template.socket_connect_timeout=5000

# - socket_keepalive: boolean, default=false
#   Should we send TCP keepalive packets
#   when connection is idle (socket option)?
worker.template.socket_keepalive=true

# - ping_mode: Character, default=none
#   When should we use cping/cpong connection probing?
#   C = directly after establishing a new connection
#   P = directly before sending each request
#   I = in regular intervals for idle connections
#   using the watchdog thread
#   A = all of the above
#   Since: 1.2.27
worker.template.ping_mode=A

# - ping_timeout: milliseconds, default=1
#   Wait timeout for cpong after cping
#   Can be overwritten for modes C and P
#   Using connect_timeout and prepost_timeout.
#   Since: 1.2.27
worker.template.ping_ti

[jira] [Commented] (MTOMCAT-230) CLONE - Plugin uploads WAR file twice

2013-07-08 Thread Stanislav Grushevskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701854#comment-13701854
 ] 

Stanislav Grushevskiy commented on MTOMCAT-230:
---

mod_jk.conf


LoadModule jk_modulemodules/mod_jk.so

###
### Where to find workers.properties
###
# JkWorkersFile specify the location where mod_jk will find
# the workers definitions.
JkWorkersFile   /etc/apache2/jk-workers.properties


###
### Where to put mod_jk logs
###
# specify the location where mod_jk is going to place its log file.
JkLogFile   /var/log/apache2/mod_jk.log


###
### Set the jk log level [debug/error/info]
###
# info log will contains standard mod_jk activity (default).
# error log will contains also error reports.
# debug log will contains all informations on mod_jk activity
JkLogLevel  info


###
### Select the log format
###
# JkLogStampFormat will configure the date/time format found
# on mod_jk logfile. Using the strftime() format string it's
# set by default to "[%a %b %d %H:%M:%S %Y]"
#JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "


###
### JkOptions indicate to send SSL KEY SIZE,
###
# The directive JkOptions allow you to set many forwarding
# options which will enable (+) or disable (-) following option.
#
#
# JkOptions ForwardKeySize , you ask mod_jk, when using ajp13, to
# forward also the SSL Key Size as required by Servlet API 2.3.
# This flag shouldn't be set when servlet engine is Tomcat 3.2.x
# (on by default).
#
#
# JkOptions ForwardURICompat , you told mod_jk to send the URI to
# Tomcat normally, which is less spec compliant but mod_rewrite
# compatible, use it for compatibility with Tomcat 3.2.x engines
# (on by default).
#
#
# JkOptions ForwardURICompatUnparsed , the forwarded URI is unparsed,
# it's spec compliant but broke mod_rewrite.
#
#
# JkOptions ForwardURIEscaped , the forwarded URI is escaped and
# Tomcat (since 3.3 rc2) will do the decoding part.
#
#
# JkOptions ForwardDirectories is used in conjunction with Directory-
# Index directive of Apache web server. As such mod_dir should be
# available to Apache, statically or dynamically (DSO)
#
# When DirectoryIndex is configured, Apache will create sub-requests
# for each of the local-url's specified in the directive, to determine
# if there is a local file that matches (this is done by stat-ing the file).
#
# If ForwardDirectories is set to false (default) and Apache doesn't
# find any files that match, Apache will serve the content of the
# directory (if directive Options specifies Indexes for that directory)
# or a 403 Forbidden response (if directive Options doesn't specify
# Indexes for that directory).
#
# If ForwardDirectories is set to true and Apache doesn't find any
# files that match, the request will be forwarded to Tomcat for
# resolution. This is used in cases when Apache cannot see the index
# files on the file system for various reasons: Tomcat is running on
# a different machine, the JSP file has been precompiled etc.
#
# Note that locally visible files will take precedence over the ones
# visible only to Tomcat (i.e. if Apache can see the file, that's
# the one that's going to get served). This is important if there is
# more then one type of file that Tomcat normally serves - for
# instance Velocity pages and JSP pages.
#
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories


###
### JkEnvVar forward environment vars
###
# The directive JkEnvVar allow you to forward an environment vars
# from Apache server to Tomcat engine.
#
#JkEnvVar SSL_CLIENT_V_START


###
### JkRequestLogFormat set the request format
###
# JkRequestLogFormat will configure the format of mod_jk individual
# request logging. Request logging is configured and enabled on a
# per virtual host basis. To enable request logging for a virtual
# host just add a JkRequestLogFormat config. The syntax of the
# format string is similiar to the Apache LogFormat command, here
# is a list of the available request log format options:
#
# Options   Description
# %bBytes sent, excluding HTTP headers (CLF format)
# %BBytes sent, excluding HTTP headers
# %HThe request protocol
# %mThe request method
# %pThe canonical Port of the server serving the request
# %qThe query string (prepended with a ? if a query string exists, 
otherwise an empty string)
# %rFirst line of request
# %sRequest HTTP status code
# %TRequest duration, elapsed time to handle request in seconds '.' 
micro seconds
# %UThe URL path requested, not including any query string.
# %vThe canonical ServerName of the server serving the request
# %VThe server name according to the UseCanonicalName setting
# %wTomcat worker name
#
JkRequestLogFormat "%w %V %T"


###
### JkMount assign specific URLs to Tomcat
###
# JkMount directive assi

[jira] [Commented] (MTOMCAT-230) CLONE - Plugin uploads WAR file twice

2013-07-08 Thread Rainer Jung (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701862#comment-13701862
 ] 

Rainer Jung commented on MTOMCAT-230:
-

Only copying together the two workers.properties contents won't buy you much. 
Try to read the comments and understand. At least you should add

worker.worker1.reference=worker.template

You should also at least remove the

JkOptions+ForwardURICompat

and the jkMount /*.jsp ajp13

Using jkAutoAlias  is also not recommended.

Why are you actually using Apache/mod_jk in front when doing the deploy?

Since Tomcat also only shows one deployment request in its access log (the 
other one failed because no authentication info was sent), how do you know the 
plugin deployed twice? Couldn't it be just the log messages from the first 
failed attempt?


> CLONE - Plugin uploads WAR file twice
> -
>
> Key: MTOMCAT-230
> URL: https://issues.apache.org/jira/browse/MTOMCAT-230
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat6
>Affects Versions: 2.0
> Environment: Win7/64, Maven 3.0.4
>Reporter: Stanislav Grushevskiy
>Assignee: Olivier Lamy (*$^¨%`£)
>
> To reproduce this issue you need to install apache and mod_jk and deploy 
> application to apache, mod_jk, tomcat.
> If you deploy just to tomcat you will not reproduce it.
> This situation is reproduced in tomcat 6, 7.
> When I deploy my WAR using maven, the target war (exact the same one) is 
> being uploaded to the server twice. Can someone explain that?
> I am using this on my module:
> {code}clean install org.apache.tomcat.maven:tomcat6-maven-plugin:2.0:redeploy 
> {code}
> From the Log file
> {code =xml}
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mobile-server ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mobile-server] in 
> [C:\develope\mobile\mobile-server\target\mobile-server]
> [INFO] Processing war project
> [INFO] Copying webapp resources 
> [C:\develope\mobile\mobile-server\src\main\webapp]
> [INFO] Webapp assembled in [241 msecs]
> [INFO] Building war: C:\develope\mobile\mobile-server\target\mobile-server.war
> [INFO] 
> [INFO] <<< tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server <<<
> [INFO] 
> [INFO] --- tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server 
> ---
> [INFO] Deploying war to http://myserver.eu/pra-mobile-server  
> Uploading: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> Uploaded: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true 
> (12678 KB at 49.3 KB/sec)
> Uploading: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> Uploaded: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> {code}
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
> 4.0.0
> 
> eu.company.prj.pramobile
> mobile-parent
> ../mobile-parent/pom.xml
> 1.0-SNAPSHOT
> 
> mobile-server
> war
> mobile server
> 
> 1.1.2
> 
> 
> 
> com.springsource.repository.libs-milestone
> SpringSource Enterprise Bundle Repository - libs
> http://repo.springsource.org/libs-milestone/
> 
>  
> 
> 
> ${project.groupId}
> mobile-test
> ${project.version}
> test
> 
> 
> ${project.groupId}
> mobile-common
> ${project.version}
> 
> 
> 
> org.springframework
> spring-asm
> ${version.spring}
> 
> 
> org.springframework
> spring-aop
> ${version.spring}
> 
> 
> org.springframework.security
> spring-security-config
> ${version.spring}
> 
> 
> org.springframework
> spring-web
> ${version.spring}
> 
> 
> org.springframework
> spring-oxm
> ${version.spring}
> 
> 
> org.springframework
> spring-webmvc
> ${version.spring}
> 
> 
> org.springframework.security
> spring-security-web
> ${version.spring}
> 
> 
> commons-codec
> commons-codec
> 1.7
> 
> 
> javax.servlet
> jsp-api
> 2.0
> provided
> 
> 
> commons-io
> commons-io
> 2.4
> 
> 
> commons-fileupload
> commons-fileupload
> 1.2.2
> 
> 
> javax.servlet
> servlet-api
> 2.5
> provided
> 
> 
> javax.servlet
> jstl
> 1.1.2
> provided
> 
> 
>

[jira] [Commented] (MTOMCAT-230) CLONE - Plugin uploads WAR file twice

2013-07-08 Thread Stanislav Grushevskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/MTOMCAT-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13701869#comment-13701869
 ] 

Stanislav Grushevskiy commented on MTOMCAT-230:
---

ok, thanks, I will try

Duration of both uploads is the same. If it is deployed through slow connection 
time is 2-3 minutes for each

Uploading: http://localhost/manager/text/deploy?path=%2F&update=true
Uploaded: http://localhost/manager/text/deploy?path=%2F&update=true (59935 KB 
at 96.0 KB/sec)

Uploading: http://localhost/manager/text/deploy?path=%2F&update=true
Uploaded: http://localhost/manager/text/deploy?path=%2F&update=true (59935 KB 
at 44232.2 KB/sec)


> CLONE - Plugin uploads WAR file twice
> -
>
> Key: MTOMCAT-230
> URL: https://issues.apache.org/jira/browse/MTOMCAT-230
> Project: Apache Tomcat Maven Plugin
>  Issue Type: Bug
>  Components: tomcat6
>Affects Versions: 2.0
> Environment: Win7/64, Maven 3.0.4
>Reporter: Stanislav Grushevskiy
>Assignee: Olivier Lamy (*$^¨%`£)
>
> To reproduce this issue you need to install apache and mod_jk and deploy 
> application to apache, mod_jk, tomcat.
> If you deploy just to tomcat you will not reproduce it.
> This situation is reproduced in tomcat 6, 7.
> When I deploy my WAR using maven, the target war (exact the same one) is 
> being uploaded to the server twice. Can someone explain that?
> I am using this on my module:
> {code}clean install org.apache.tomcat.maven:tomcat6-maven-plugin:2.0:redeploy 
> {code}
> From the Log file
> {code =xml}
> [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ mobile-server ---
> [INFO] Packaging webapp
> [INFO] Assembling webapp [mobile-server] in 
> [C:\develope\mobile\mobile-server\target\mobile-server]
> [INFO] Processing war project
> [INFO] Copying webapp resources 
> [C:\develope\mobile\mobile-server\src\main\webapp]
> [INFO] Webapp assembled in [241 msecs]
> [INFO] Building war: C:\develope\mobile\mobile-server\target\mobile-server.war
> [INFO] 
> [INFO] <<< tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server <<<
> [INFO] 
> [INFO] --- tomcat6-maven-plugin:2.0:redeploy (default-cli) @ mobile-server 
> ---
> [INFO] Deploying war to http://myserver.eu/pra-mobile-server  
> Uploading: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> Uploaded: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true 
> (12678 KB at 49.3 KB/sec)
> Uploading: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> Uploaded: 
> http://myserver.eu/manager-test/deploy?path=%2Fmobile-server&update=true
> {code}
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
> 4.0.0
> 
> eu.company.prj.pramobile
> mobile-parent
> ../mobile-parent/pom.xml
> 1.0-SNAPSHOT
> 
> mobile-server
> war
> mobile server
> 
> 1.1.2
> 
> 
> 
> com.springsource.repository.libs-milestone
> SpringSource Enterprise Bundle Repository - libs
> http://repo.springsource.org/libs-milestone/
> 
>  
> 
> 
> ${project.groupId}
> mobile-test
> ${project.version}
> test
> 
> 
> ${project.groupId}
> mobile-common
> ${project.version}
> 
> 
> 
> org.springframework
> spring-asm
> ${version.spring}
> 
> 
> org.springframework
> spring-aop
> ${version.spring}
> 
> 
> org.springframework.security
> spring-security-config
> ${version.spring}
> 
> 
> org.springframework
> spring-web
> ${version.spring}
> 
> 
> org.springframework
> spring-oxm
> ${version.spring}
> 
> 
> org.springframework
> spring-webmvc
> ${version.spring}
> 
> 
> org.springframework.security
> spring-security-web
> ${version.spring}
> 
> 
> commons-codec
> commons-codec
> 1.7
> 
> 
> javax.servlet
> jsp-api
> 2.0
> provided
> 
> 
> commons-io
> commons-io
> 2.4
> 
> 
> commons-fileupload
> commons-fileupload
> 1.2.2
> 
> 
> javax.servlet
> servlet-api
> 2.5
> provided
> 
> 
> javax.servlet
> jstl
> 1.1.2
> provided
> 
> 
> taglibs
> standard
> 1.1.2
> provided
> 
> 
> commons-httpclient
> commons-httpclient
> 3.1
> 
> 

[Bug 55166] schemaLocation references between servlet and jsp XSDs are invalid

2013-07-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55166

--- Comment #12 from Mark Thomas  ---
I've been looking at the first issues raised - namely where the Servlet and JSP
schemas are located.

Currently, the schemas are split between [1] and [2].

This split creates the a problem that can easily been seen when viewing the
schemas in Eclipse. A number of these schemas include entries along the lines
of:


I've had a look at the W3C specs and there is a requirement that these
locations are relative so that means the included files all need to be in the
same location. With the files split between [1] and [2] there are numerous
references that can't be resolved.

I see two approaches to solving this:

a) Move files from [2] to [1]
b) Duplicate files between [1] and [2]

Option a)
Pros: Only a single copy of the files will exist
Cons: The taglib files are not required by the Servlet API (the JSP
  ones are)

Option b)
Pros: servlet-api JAR won't contain unnecessary tablib files
Cons: Duplication of a most of the files between the JARs


On balance I think I prefer option a). I'd rather have 4 files in the
servlet-api JAR that are only required when processing JSPs than duplicate
nearly all of the files in the jsp-api JAR especially given that the
jsp-api.jar depends on the servlet-api.jar anyway.


In Tomcat 7 folks might be using these JARs from there current locations so I
intend to fix this using option a) for Tomcat 8 only.

The issue with the schema resolver belong in a new Bugzilla issue (or possibly
issues - I haven't looked too hard at whether there is a single issue there or
multiple issues).

[1] http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/resources/
[2] http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/jsp/resources/

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500626 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 09:26:29 2013
New Revision: 1500626

URL: http://svn.apache.org/r1500626
Log:
Whitespace police

Modified:
tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1500626&r1=1500625&r2=1500626&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Mon Jul  8 
09:26:29 2013
@@ -1716,7 +1716,7 @@ public class ContextConfig implements Li
 
 /**
  * Extract the name of the ServletContainerInitializer.
- * 
+ *
  * @param isThe resource where the name is defined
  * @return  The class name
  * @throws IOException



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500632 - in /tomcat/trunk: ./ java/javax/servlet/jsp/resources/ java/javax/servlet/resources/ java/org/apache/catalina/startup/ res/META-INF/ res/maven/ webapps/docs/

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 09:33:59 2013
New Revision: 1500632

URL: http://svn.apache.org/r1500632
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55166
Move the JSP descriptor and tag library descriptor schema defintion files from 
jsp-api.jar to servlet-api.jar so relative includes between the J2EE, Servlet 
and JSP schemas are correctly resolved.

Added:
tomcat/trunk/java/javax/servlet/resources/jsp_2_0.xsd
  - copied unchanged from r1500589, 
tomcat/trunk/java/javax/servlet/jsp/resources/jsp_2_0.xsd
tomcat/trunk/java/javax/servlet/resources/jsp_2_1.xsd
  - copied unchanged from r1500589, 
tomcat/trunk/java/javax/servlet/jsp/resources/jsp_2_1.xsd
tomcat/trunk/java/javax/servlet/resources/jsp_2_2.xsd
  - copied unchanged from r1500589, 
tomcat/trunk/java/javax/servlet/jsp/resources/jsp_2_2.xsd
tomcat/trunk/java/javax/servlet/resources/jsp_2_3.xsd
  - copied unchanged from r1500589, 
tomcat/trunk/java/javax/servlet/jsp/resources/jsp_2_3.xsd
tomcat/trunk/java/javax/servlet/resources/web-jsptaglibrary_1_1.dtd
  - copied unchanged from r1500589, 
tomcat/trunk/java/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
tomcat/trunk/java/javax/servlet/resources/web-jsptaglibrary_1_2.dtd
  - copied unchanged from r1500589, 
tomcat/trunk/java/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
tomcat/trunk/java/javax/servlet/resources/web-jsptaglibrary_2_0.xsd
  - copied unchanged from r1500589, 
tomcat/trunk/java/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
tomcat/trunk/java/javax/servlet/resources/web-jsptaglibrary_2_1.xsd
  - copied unchanged from r1500589, 
tomcat/trunk/java/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd
Removed:
tomcat/trunk/java/javax/servlet/jsp/resources/jsp_2_0.xsd
tomcat/trunk/java/javax/servlet/jsp/resources/jsp_2_1.xsd
tomcat/trunk/java/javax/servlet/jsp/resources/jsp_2_2.xsd
tomcat/trunk/java/javax/servlet/jsp/resources/jsp_2_3.xsd
tomcat/trunk/java/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
tomcat/trunk/java/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
tomcat/trunk/java/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
tomcat/trunk/java/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd
tomcat/trunk/res/META-INF/jsp-api.jar.license
tomcat/trunk/res/META-INF/jsp-api.jar.notice
Modified:
tomcat/trunk/build.xml
tomcat/trunk/java/org/apache/catalina/startup/Constants.java
tomcat/trunk/res/maven/tomcat-jsp-api.pom
tomcat/trunk/res/maven/tomcat-servlet-api.pom
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1500632&r1=1500631&r2=1500632&view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Mon Jul  8 09:33:59 2013
@@ -670,9 +670,7 @@
 
+  manifest="${tomcat.manifests}/jsp-api.jar.manifest" />
 
 
 http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Constants.java?rev=1500632&r1=1500631&r2=1500632&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/Constants.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Constants.java Mon Jul  8 
09:33:59 2013
@@ -89,22 +89,22 @@ public final class Constants {
 public static final String JspSchemaPublicId_20 =
 "jsp_2_0.xsd";
 public static final String JspSchemaResourcePath_20 =
-"/javax/servlet/jsp/resources/jsp_2_0.xsd";
+"/javax/servlet/resources/jsp_2_0.xsd";
 
 public static final String JspSchemaPublicId_21 =
 "jsp_2_1.xsd";
 public static final String JspSchemaResourcePath_21 =
-"/javax/servlet/jsp/resources/jsp_2_1.xsd";
+"/javax/servlet/resources/jsp_2_1.xsd";
 
 public static final String JspSchemaPublicId_22 =
 "jsp_2_2.xsd";
 public static final String JspSchemaResourcePath_22 =
-"/javax/servlet/jsp/resources/jsp_2_2.xsd";
+"/javax/servlet/resources/jsp_2_2.xsd";
 
 public static final String JspSchemaPublicId_23 =
 "jsp_2_3.xsd";
 public static final String JspSchemaResourcePath_23 =
-"/javax/servlet/jsp/resources/jsp_2_3.xsd";
+"/javax/servlet/resources/jsp_2_3.xsd";
 
 
 // TLD

Modified: tomcat/trunk/res/maven/tomcat-jsp-api.pom
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/res/maven/tomcat-jsp-api.pom?rev=1500632&r1=1500631&r2=1500632&view=diff
==
--- tomcat/trunk/res/maven/tomcat-jsp-api.pom (original)
+++ tomcat/trunk/res/maven/tomcat-jsp-api.pom Mon Jul  8 09:33:59 2013
@@ -24,19 +24,9 @@
   http://tomcat.apache.org/
   
 
-  
-Apache License, Version 2.0 and
-Common Development And Distribution 

[Bug 55166] schemaLocation references between servlet and jsp XSDs are invalid

2013-07-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55166

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Mark Thomas  ---
The originally reported issue has been fixed in trunk for 8.0.x. Please open a
new Bugzilla issue for any additional issues (one Bugzilla issues for each
additional issue) you identified while working on this issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[ANN] Apache Tomcat 7.0.42 released

2013-07-08 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 7.0.42.

Apache Tomcat is an open source software implementation of the Java
Servlet, JavaServer Pages and Java Expression Language technologies.

This release contains a number of bug fixes and improvements compared to
version 7.0.41. The notable changes include:
- Add support for time to first byte in the AccessLogValve. Patch
  provided by Jeremy Boynes.
- Correct a regression introduced in 7.0.39 (refactoring of base 64
  encoding and decoding) that broke the JNDI Realm when userPassword
  was set and passwords were hashed with MD5 or SHA1.
- Ensure that the build process produces Javadoc that is not vulnerable
  to CVE-2013-1571. Based on a patch by Uwe Schindler.

Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Note: This version has 4 zip binaries: a generic one and three
  bundled with Tomcat native binaries for Windows operating systems
  running on different CPU architectures.

Note: If you use the APR/native AJP or HTTP connector you *must* upgrade
  to version 1.1.24 or later of the AJP/native library and it is
  recommended that you upgrade to 1.1.27

Downloads:
http://tomcat.apache.org/download-70.cgi

Migration guides from Apache Tomcat 5.5.x and 6.0.x:
http://tomcat.apache.org/migration.html

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55209] Sometimes returns junk instead of headers even on static files

2013-07-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55209

--- Comment #3 from Mark Thomas  ---
(In reply to Pavel Veretennikov from comment #2)
> This is a static file in an empty "ROOT" webapp.

I am aware of that.

> Is there a chance that filters configured in other webapps influence "ROOT"?

Yes.

> Could they... somehow globally alter request processing threads? Where to
> dig?

A connector's thread pool is shared between all web applications that are part
of the same service as the connector.

Request and response objects are recycled and re-used across all web
applications.

I'l look for the app that writes large chunks of whitespace to the response and
then for a retained reference to the response or possibly the request.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500648 - in /tomcat/trunk/test/javax/el: TesterELResolverBase.java TesterELResolverOne.java TesterELResolverTwo.java

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 10:51:06 2013
New Revision: 1500648

URL: http://svn.apache.org/r1500648
Log:
Remove unnecessary class

Removed:
tomcat/trunk/test/javax/el/TesterELResolverBase.java
Modified:
tomcat/trunk/test/javax/el/TesterELResolverOne.java
tomcat/trunk/test/javax/el/TesterELResolverTwo.java

Modified: tomcat/trunk/test/javax/el/TesterELResolverOne.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TesterELResolverOne.java?rev=1500648&r1=1500647&r2=1500648&view=diff
==
--- tomcat/trunk/test/javax/el/TesterELResolverOne.java (original)
+++ tomcat/trunk/test/javax/el/TesterELResolverOne.java Mon Jul  8 10:51:06 2013
@@ -16,7 +16,7 @@
  */
 package javax.el;
 
-public class TesterELResolverOne extends TesterELResolverBase {
+public class TesterELResolverOne extends TypeConverter {
 
 @Override
 public Object convertToType(ELContext context, Object obj, Class type) {

Modified: tomcat/trunk/test/javax/el/TesterELResolverTwo.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TesterELResolverTwo.java?rev=1500648&r1=1500647&r2=1500648&view=diff
==
--- tomcat/trunk/test/javax/el/TesterELResolverTwo.java (original)
+++ tomcat/trunk/test/javax/el/TesterELResolverTwo.java Mon Jul  8 10:51:06 2013
@@ -16,7 +16,7 @@
  */
 package javax.el;
 
-public class TesterELResolverTwo extends TesterELResolverBase {
+public class TesterELResolverTwo extends TypeConverter {
 
 @Override
 public Object convertToType(ELContext context, Object obj, Class type) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500649 - /tomcat/trunk/test/javax/el/TesterClass.java

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 10:53:05 2013
New Revision: 1500649

URL: http://svn.apache.org/r1500649
Log:
Silence some Eclipse warnings

Modified:
tomcat/trunk/test/javax/el/TesterClass.java

Modified: tomcat/trunk/test/javax/el/TesterClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TesterClass.java?rev=1500649&r1=1500648&r2=1500649&view=diff
==
--- tomcat/trunk/test/javax/el/TesterClass.java (original)
+++ tomcat/trunk/test/javax/el/TesterClass.java Mon Jul  8 10:53:05 2013
@@ -20,12 +20,15 @@ public class TesterClass {
 
 public static String publicStaticString = "publicStaticString";
 public String publicString = "publicString";
+@SuppressWarnings("unused") // Used in TestStaticFieldELREsolver
 private static String privateStaticString = "privateStaticString";
+@SuppressWarnings("unused") // Used in TestStaticFieldELREsolver
 private String privateString = "privateString";
 
 public TesterClass() {
 }
 
+@SuppressWarnings("unused") // Used in TestStaticFieldELREsolver
 private TesterClass(String privateString) {
 this.privateString = privateString;
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in ASF Buildbot on tomcat-trunk

2013-07-08 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4614

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1500632
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1500660 - /tomcat/trunk/test/javax/el/TesterClass.java

2013-07-08 Thread kkolinko
Author: kkolinko
Date: Mon Jul  8 11:15:24 2013
New Revision: 1500660

URL: http://svn.apache.org/r1500660
Log:
Followup to r1500649
Correct typos

Modified:
tomcat/trunk/test/javax/el/TesterClass.java

Modified: tomcat/trunk/test/javax/el/TesterClass.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TesterClass.java?rev=1500660&r1=1500659&r2=1500660&view=diff
==
--- tomcat/trunk/test/javax/el/TesterClass.java (original)
+++ tomcat/trunk/test/javax/el/TesterClass.java Mon Jul  8 11:15:24 2013
@@ -20,15 +20,15 @@ public class TesterClass {
 
 public static String publicStaticString = "publicStaticString";
 public String publicString = "publicString";
-@SuppressWarnings("unused") // Used in TestStaticFieldELREsolver
+@SuppressWarnings("unused") // Used in TestStaticFieldELResolver
 private static String privateStaticString = "privateStaticString";
-@SuppressWarnings("unused") // Used in TestStaticFieldELREsolver
+@SuppressWarnings("unused") // Used in TestStaticFieldELResolver
 private String privateString = "privateString";
 
 public TesterClass() {
 }
 
-@SuppressWarnings("unused") // Used in TestStaticFieldELREsolver
+@SuppressWarnings("unused") // Used in TestStaticFieldELResolver
 private TesterClass(String privateString) {
 this.privateString = privateString;
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: buildbot failure in ASF Buildbot on tomcat-trunk

2013-07-08 Thread Konstantin Kolinko
013/7/8  :
> The Buildbot has detected a new failure on builder tomcat-trunk while 
> building ASF Buildbot.
> Full details are available at:
>  http://ci.apache.org/builders/tomcat-trunk/builds/4614
>
> Buildbot URL: http://ci.apache.org/
>

Test javax.el.TestCompositeELResolver FAILED
Test org.apache.jasper.compiler.TestValidator FAILED
Test org.apache.jasper.tagplugins.jstl.core.TestForEach FAILED
Test org.apache.jasper.tagplugins.jstl.core.TestOut FAILED
Test org.apache.jasper.tagplugins.jstl.core.TestSet FAILED

both for BIO & NIO.

Looking at
http://ci.apache.org/projects/tomcat/tomcat8/logs/1500632/TEST-javax.el.TestCompositeELResolver.BIO.txt

WARNING: Failed to scan JAR
[file:/home/buildslave3/slave3/tomcat-trunk/build/webapps/examples/WEB-INF/lib/standard.jar]
from /WEB-INF/lib
java.io.IOException: org.apache.jasper.JasperException: XML parsing
error on file 
file:/home/buildslave3/slave3/tomcat-trunk/build/webapps/examples/WEB-INF/lib/standard.jar
at 
org.apache.jasper.compiler.TldLocationsCache.tldScanStream(TldLocationsCache.java:480)
(...)

Caused by: org.xml.sax.SAXException: Internal Error: File
/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd not found
at 
org.apache.jasper.xmlparser.MyEntityResolver.resolveEntity(ParserUtils.java:216)
at (...)
at 
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300)
at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96)


Apparently there is a resolver in Jasper
(org.apache.jasper.xmlparser.MyEntityResolver) and it is now stuck as
the files have been moved.

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500663 - in /tomcat/trunk/test: org/apache/catalina/startup/ webapp-fragments/WEB-INF/lib/

2013-07-08 Thread violetagg
Author: violetagg
Date: Mon Jul  8 11:25:51 2013
New Revision: 1500663

URL: http://svn.apache.org/r1500663
Log:
Provide test case for 
META-INF/services/javax.servlet.ServletContainerInitializer that contains 
multiple SCIs and comments.

Added:

tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer1.java
   (with props)

tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer2.java
   (with props)
Modified:
tomcat/trunk/test/org/apache/catalina/startup/TestContextConfig.java
tomcat/trunk/test/webapp-fragments/WEB-INF/lib/resources.jar

Modified: tomcat/trunk/test/org/apache/catalina/startup/TestContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestContextConfig.java?rev=1500663&r1=1500662&r2=1500663&view=diff
==
--- tomcat/trunk/test/org/apache/catalina/startup/TestContextConfig.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TestContextConfig.java Mon 
Jul  8 11:25:51 2013
@@ -146,6 +146,19 @@ public class TestContextConfig extends T
 "envEntry1: 1 envEntry2: 2 envEntry3: 33 envEntry4: 4");
 }
 
+@Test
+public void testBug55210() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File("test/webapp-fragments");
+tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+tomcat.start();
+
+assertPageContains("/test/TesterServlet1", "OK");
+assertPageContains("/test/TesterServlet2", "OK");
+}
+
 private static class CustomDefaultServletSCI
 implements ServletContainerInitializer {
 

Added: 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer1.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer1.java?rev=1500663&view=auto
==
--- 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer1.java
 (added)
+++ 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer1.java
 Mon Jul  8 11:25:51 2013
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.startup;
+
+import java.util.Set;
+
+import javax.servlet.Servlet;
+import javax.servlet.ServletContainerInitializer;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
+
+public class TesterServletContainerInitializer1 implements
+ServletContainerInitializer {
+
+@Override
+public void onStartup(Set> c, ServletContext ctx)
+throws ServletException {
+Servlet s = new TesterServlet();
+ServletRegistration.Dynamic r = ctx.addServlet("TesterServlet1", s);
+r.addMapping("/TesterServlet1");
+}
+
+}

Propchange: 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer1.java
--
svn:eol-style = native

Added: 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer2.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer2.java?rev=1500663&view=auto
==
--- 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer2.java
 (added)
+++ 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer2.java
 Mon Jul  8 11:25:51 2013
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LIC

svn commit: r1500677 - in /tomcat/trunk/java/org/apache: catalina/startup/Constants.java jasper/Constants.java

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 11:54:57 2013
New Revision: 1500677

URL: http://svn.apache.org/r1500677
Log:
Update paths to the tag library schema files

Modified:
tomcat/trunk/java/org/apache/catalina/startup/Constants.java
tomcat/trunk/java/org/apache/jasper/Constants.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Constants.java?rev=1500677&r1=1500676&r2=1500677&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/Constants.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Constants.java Mon Jul  8 
11:54:57 2013
@@ -111,22 +111,22 @@ public final class Constants {
 public static final String TldDtdPublicId_11 =
 "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN";
 public static final String TldDtdResourcePath_11 =
-"/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd";
+"/javax/servlet/resources/web-jsptaglibrary_1_1.dtd";
 
 public static final String TldDtdPublicId_12 =
 "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";
 public static final String TldDtdResourcePath_12 =
-"/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd";
+"/javax/servlet/resources/web-jsptaglibrary_1_2.dtd";
 
 public static final String TldSchemaPublicId_20 =
 "web-jsptaglibrary_2_0.xsd";
 public static final String TldSchemaResourcePath_20 =
-"/javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd";
+"/javax/servlet/resources/web-jsptaglibrary_2_0.xsd";
 
 public static final String TldSchemaPublicId_21 =
 "web-jsptaglibrary_2_1.xsd";
 public static final String TldSchemaResourcePath_21 =
-"/javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd";
+"/javax/servlet/resources/web-jsptaglibrary_2_1.xsd";
 
 
 // web.xml

Modified: tomcat/trunk/java/org/apache/jasper/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/Constants.java?rev=1500677&r1=1500676&r2=1500677&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/Constants.java (original)
+++ tomcat/trunk/java/org/apache/jasper/Constants.java Mon Jul  8 11:54:57 2013
@@ -127,11 +127,11 @@ public class Constants {
 private static final String TAGLIB_DTD_PUBLIC_ID_11 =
 "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN";
 private static final String TAGLIB_DTD_RESOURCE_PATH_11 =
-"/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd";
+"/javax/servlet/resources/web-jsptaglibrary_1_1.dtd";
 private static final String TAGLIB_DTD_PUBLIC_ID_12 =
 "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";
 private static final String TAGLIB_DTD_RESOURCE_PATH_12 =
-"/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd";
+"/javax/servlet/resources/web-jsptaglibrary_1_2.dtd";
 
 /**
  * Public Id and the Resource path (of the cached copy)



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: buildbot failure in ASF Buildbot on tomcat-trunk

2013-07-08 Thread Mark Thomas
On 08/07/2013 12:21, Konstantin Kolinko wrote:

> Apparently there is a resolver in Jasper
> (org.apache.jasper.xmlparser.MyEntityResolver) and it is now stuck as
> the files have been moved.

Thanks. Fixed.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500682 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/ContextConfig.java webapps/docs/changelog.xml

2013-07-08 Thread violetagg
Author: violetagg
Date: Mon Jul  8 12:12:04 2013
New Revision: 1500682

URL: http://svn.apache.org/r1500682
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55210
Merged revision 1500590 from tomcat/trunk:
When searching for ServletContainerInitializer, ignore comments in the 
provider-configuration file.
Support multiple ServletContainerInitializer in the provider-configuration file.
Patch is provided by Nick Williams.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1500590

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1500682&r1=1500681&r2=1500682&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
Mon Jul  8 12:12:04 2013
@@ -1546,7 +1546,7 @@ public class ContextConfig implements Li
 URL url = fragment.getURL();
 Jar jar = null;
 InputStream is = null;
-ServletContainerInitializer sci = null;
+List detectedScis = null;
 try {
 if ("jar".equals(url.getProtocol())) {
 jar = JarFactory.newInstance(url);
@@ -1559,7 +1559,7 @@ public class ContextConfig implements Li
 }
 }
 if (is != null) {
-sci = getServletContainerInitializer(is);
+detectedScis = getServletContainerInitializers(is);
 }
 } catch (IOException ioe) {
 log.error(sm.getString(
@@ -1580,42 +1580,44 @@ public class ContextConfig implements Li
 }
 }
 
-if (sci == null) {
+if (detectedScis == null) {
 continue;
 }
 
-initializerClassMap.put(sci, new HashSet>());
+for (ServletContainerInitializer sci : detectedScis) {
+initializerClassMap.put(sci, new HashSet>());
 
-HandlesTypes ht = null;
-try {
-ht = sci.getClass().getAnnotation(HandlesTypes.class);
-} catch (Exception e) {
-if (log.isDebugEnabled()) {
-log.info(sm.getString("contextConfig.sci.debug", url), e);
-} else {
-log.info(sm.getString("contextConfig.sci.info", url));
+HandlesTypes ht = null;
+try {
+ht = sci.getClass().getAnnotation(HandlesTypes.class);
+} catch (Exception e) {
+if (log.isDebugEnabled()) {
+log.info(sm.getString("contextConfig.sci.debug", url),
+e);
+} else {
+log.info(sm.getString("contextConfig.sci.info", url));
+}
 }
-}
-if (ht != null) {
-Class[] types = ht.value();
-if (types != null) {
-for (Class type : types) {
-if (type.isAnnotation()) {
-handlesTypesAnnotations = true;
-} else {
-handlesTypesNonAnnotations = true;
-}
-Set scis =
-typeInitializerMap.get(type);
-if (scis == null) {
-scis = new HashSet();
-typeInitializerMap.put(type, scis);
+if (ht != null) {
+Class[] types = ht.value();
+if (types != null) {
+for (Class type : types) {
+if (type.isAnnotation()) {
+handlesTypesAnnotations = true;
+} else {
+handlesTypesNonAnnotations = true;
+}
+Set scis = 
typeInitializerMap
+.get(type);
+if (scis == null) {
+scis = new 
HashSet();
+typeInitializerMap.put(type, scis);
+}
+scis.add(sci);
 }
-scis.add(sci);
 }
 }
 }
-
 }
 }
 
@@ -1627,19 +1629,28 @@ public class Context

svn commit: r1500687 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/startup/ test/webapp-3.0-fragments/WEB-INF/lib/

2013-07-08 Thread violetagg
Author: violetagg
Date: Mon Jul  8 12:20:08 2013
New Revision: 1500687

URL: http://svn.apache.org/r1500687
Log:
Merged revision 1500663 from tomcat/trunk:
Provide test case for 
META-INF/services/javax.servlet.ServletContainerInitializer that contains 
multiple SCIs and comments.

Added:

tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer1.java
  - copied unchanged from r1500663, 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer1.java

tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer2.java
  - copied unchanged from r1500663, 
tomcat/trunk/test/org/apache/catalina/startup/TesterServletContainerInitializer2.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestContextConfig.java
tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/lib/resources.jar

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1500663

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestContextConfig.java?rev=1500687&r1=1500686&r2=1500687&view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestContextConfig.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TestContextConfig.java 
Mon Jul  8 12:20:08 2013
@@ -146,6 +146,19 @@ public class TestContextConfig extends T
 "envEntry1: 1 envEntry2: 2 envEntry3: 33 envEntry4: 4");
 }
 
+@Test
+public void testBug55210() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir = new File("test/webapp-3.0-fragments");
+tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+tomcat.start();
+
+assertPageContains("/test/TesterServlet1", "OK");
+assertPageContains("/test/TesterServlet2", "OK");
+}
+
 private static class CustomDefaultServletSCI
 implements ServletContainerInitializer {
 

Modified: 
tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/lib/resources.jar
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/webapp-3.0-fragments/WEB-INF/lib/resources.jar?rev=1500687&r1=1500686&r2=1500687&view=diff
==
Binary files - no diff available.



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55210] SEVERE: The ServletContentInitializer [# Licensed to the Apache Software Foundation (ASF) under one or more] could not be created

2013-07-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55210

Violeta Georgieva  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Violeta Georgieva  ---
Thanks for the report and the patch. It was applied to trunk and 7.0.x and will
be included in 7.0.43 onwards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500690 - in /tomcat/trunk: java/javax/el/ImportHandler.java java/javax/el/LocalStrings.properties test/javax/el/TestImportHandler.java

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 12:26:08 2013
New Revision: 1500690

URL: http://svn.apache.org/r1500690
Log:
Add a unit test for ImportHandler and fix some bugs it idenfifed:
- missing i18n message
- importing a package that is not referenced elsewhere failed
- ambiguous imports where not detected

Added:
tomcat/trunk/test/javax/el/TestImportHandler.java   (with props)
Modified:
tomcat/trunk/java/javax/el/ImportHandler.java
tomcat/trunk/java/javax/el/LocalStrings.properties

Modified: tomcat/trunk/java/javax/el/ImportHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ImportHandler.java?rev=1500690&r1=1500689&r2=1500690&view=diff
==
--- tomcat/trunk/java/javax/el/ImportHandler.java (original)
+++ tomcat/trunk/java/javax/el/ImportHandler.java Mon Jul  8 12:26:08 2013
@@ -19,6 +19,7 @@ package javax.el;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -112,8 +113,15 @@ public class ImportHandler {
 // Import ambiguity is handled at resolution, not at import
 Package p = Package.getPackage(name);
 if (p == null) {
-throw new IllegalArgumentException(Util.message(
-null, "importHandler.invalidPackage", name));
+// Either the package does not exist or no class has been loaded
+// from that package. Check if the package exists.
+ClassLoader cl = Thread.currentThread().getContextClassLoader();
+String path = name.replace('.', '/');
+URL url = cl.getResource(path);
+if (url == null) {
+throw new ELException(Util.message(
+null, "importHandler.invalidPackage", name));
+}
 }
 packages.add(name);
 }
@@ -123,13 +131,11 @@ public class ImportHandler {
 Class result = clazzes.get(name);
 
 if (result == null) {
-// Search the package imports
+// Search the package imports - note there may be multiple matches
+// (which correctly triggers an error)
 for (String p : packages) {
 String className = p + '.' + name;
 result = findClass(className);
-if (result != null) {
-break;
-}
 }
 }
 

Modified: tomcat/trunk/java/javax/el/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/LocalStrings.properties?rev=1500690&r1=1500689&r2=1500690&view=diff
==
--- tomcat/trunk/java/javax/el/LocalStrings.properties (original)
+++ tomcat/trunk/java/javax/el/LocalStrings.properties Mon Jul  8 12:26:08 2013
@@ -37,6 +37,7 @@ importHandler.classNotFound=The class [{
 importHandler.invalidClass=The class [{0}] must be public, non-abstract and 
not an interface
 importHandler.invalidClassName=Name of class to import [{0}] must include a 
package
 importHandler.invalidClassNameForStatic=The class [{0}] specified for static 
import [{1}] is not valid
+importHandler.invalidPackage=The package [{0}] could not be found
 importHandler.invalidStaticName=Name of static method or field to import [{0}] 
must include a class
 importHandler.staticNotFound=The static import [{0}] could not be found in 
class [{1}] for import [{2}]
 

Added: tomcat/trunk/test/javax/el/TestImportHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestImportHandler.java?rev=1500690&view=auto
==
--- tomcat/trunk/test/javax/el/TestImportHandler.java (added)
+++ tomcat/trunk/test/javax/el/TestImportHandler.java Mon Jul  8 12:26:08 2013
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.el;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.tomcat.util.res.StringManager;
+
+public class TestImportHandler {
+
+/**
+ * java.lang should be

svn commit: r1500707 - in /tomcat/trunk: java/javax/el/ImportHandler.java test/javax/el/TestImportHandler.java

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 13:04:31 2013
New Revision: 1500707

URL: http://svn.apache.org/r1500707
Log:
Extend unit test for ImportHandler and fix some bugs identifed:
- off-by-one error extracting class name
- not limiting static imports to public static fields/methods
- incorrectly flagging non-conflicting imports from classes with the same name 
as conflicting

Modified:
tomcat/trunk/java/javax/el/ImportHandler.java
tomcat/trunk/test/javax/el/TestImportHandler.java

Modified: tomcat/trunk/java/javax/el/ImportHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ImportHandler.java?rev=1500707&r1=1500706&r2=1500707&view=diff
==
--- tomcat/trunk/java/javax/el/ImportHandler.java (original)
+++ tomcat/trunk/java/javax/el/ImportHandler.java Mon Jul  8 13:04:31 2013
@@ -48,10 +48,10 @@ public class ImportHandler {
 null, "importHandler.invalidStaticName", name));
 }
 
-String className = name.substring(0, lastPeriod - 1);
+String className = name.substring(0, lastPeriod);
 String fieldOrMethodName = name.substring(lastPeriod + 1);
 
-Class clazz = findClass(className);
+Class clazz = findClass(className, false);
 
 if (clazz == null) {
 throw new ELException(Util.message(
@@ -63,16 +63,24 @@ public class ImportHandler {
 
 for (Field field : clazz.getFields()) {
 if (field.getName().equals(fieldOrMethodName)) {
-found = true;
-break;
+int modifiers = field.getModifiers();
+if (Modifier.isStatic(modifiers) &&
+Modifier.isPublic(modifiers)) {
+found = true;
+break;
+}
 }
 }
 
 if (!found) {
 for (Method method : clazz.getMethods()) {
 if (method.getName().equals(fieldOrMethodName)) {
-found = true;
-break;
+int modifiers = method.getModifiers();
+if (Modifier.isStatic(modifiers) &&
+Modifier.isPublic(modifiers)) {
+found = true;
+break;
+}
 }
 }
 }
@@ -100,7 +108,7 @@ public class ImportHandler {
 null, "importHandler.invalidClassName", name));
 }
 
-Class clazz = findClass(name);
+Class clazz = findClass(name, true);
 
 if (clazz == null) {
 throw new ELException(Util.message(
@@ -135,7 +143,7 @@ public class ImportHandler {
 // (which correctly triggers an error)
 for (String p : packages) {
 String className = p + '.' + name;
-result = findClass(className);
+result = findClass(className, true);
 }
 }
 
@@ -148,7 +156,7 @@ public class ImportHandler {
 }
 
 
-private Class findClass(String name) {
+private Class findClass(String name, boolean cache) {
 Class clazz;
 try {
  clazz = Class.forName(name);
@@ -164,16 +172,18 @@ public class ImportHandler {
 null, "importHandler.invalidClass", name));
 }
 
-String simpleName = clazz.getSimpleName();
-Class conflict = clazzes.get(simpleName);
+if (cache) {
+String simpleName = clazz.getSimpleName();
+Class conflict = clazzes.get(simpleName);
+
+if (conflict != null) {
+throw new ELException(Util.message(null,
+"importHandler.ambiguousImport", name, 
conflict.getName()));
+}
 
-if (conflict != null) {
-throw new ELException(Util.message(null,
-"importHandler.ambiguousImport", name, 
conflict.getName()));
+clazzes.put(simpleName, clazz);
 }
 
-clazzes.put(simpleName, clazz);
-
 return clazz;
 }
 }

Modified: tomcat/trunk/test/javax/el/TestImportHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestImportHandler.java?rev=1500707&r1=1500706&r2=1500707&view=diff
==
--- tomcat/trunk/test/javax/el/TestImportHandler.java (original)
+++ tomcat/trunk/test/javax/el/TestImportHandler.java Mon Jul  8 13:04:31 2013
@@ -102,7 +102,7 @@ public class TestImportHandler {
 
 
 /**
- * Import an invalid [ackage.
+ * Import an invalid package.
  */
 @Test(expected=ELException.class)
 public void testImportPackage01() {
@@ -110,4 +110,57 @@ public class TestImportHandler {
 
 handler.importPackage("org.apache.tomcat.foo");
 }
+
+
+/**
+ * Import a valid static field.
+ */
+@Test
+public void testImportStatic

buildbot success in ASF Buildbot on tomcat-trunk

2013-07-08 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4617

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1500690
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





svn commit: r1500736 - in /tomcat/trunk: java/javax/el/ java/javax/servlet/jsp/el/ java/org/apache/jasper/el/ test/javax/el/

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 13:58:50 2013
New Revision: 1500736

URL: http://svn.apache.org/r1500736
Log:
Add a test case for EvaluationListener.propertyResolved() and update the 
various resolvers to call the new ELContext.setPropertyResolved(Object, Object) 
method

Added:
tomcat/trunk/test/javax/el/TestEvaluationListener.java   (with props)
tomcat/trunk/test/javax/el/TesterEvaluationListener.java   (with props)
Modified:
tomcat/trunk/java/javax/el/ArrayELResolver.java
tomcat/trunk/java/javax/el/BeanELResolver.java
tomcat/trunk/java/javax/el/BeanNameELResolver.java
tomcat/trunk/java/javax/el/ListELResolver.java
tomcat/trunk/java/javax/el/MapELResolver.java
tomcat/trunk/java/javax/el/ResourceBundleELResolver.java
tomcat/trunk/java/javax/el/StaticFieldELResolver.java
tomcat/trunk/java/javax/servlet/jsp/el/ImplicitObjectELResolver.java
tomcat/trunk/java/javax/servlet/jsp/el/ScopedAttributeELResolver.java
tomcat/trunk/java/org/apache/jasper/el/ELResolverImpl.java
tomcat/trunk/test/javax/el/TesterELResolverOne.java
tomcat/trunk/test/javax/el/TesterELResolverTwo.java

Modified: tomcat/trunk/java/javax/el/ArrayELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ArrayELResolver.java?rev=1500736&r1=1500735&r2=1500736&view=diff
==
--- tomcat/trunk/java/javax/el/ArrayELResolver.java (original)
+++ tomcat/trunk/java/javax/el/ArrayELResolver.java Mon Jul  8 13:58:50 2013
@@ -41,7 +41,7 @@ public class ArrayELResolver extends ELR
 }
 
 if (base != null && base.getClass().isArray()) {
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, property);
 int idx = coerce(property);
 checkBounds(base, idx);
 return base.getClass().getComponentType();
@@ -57,7 +57,7 @@ public class ArrayELResolver extends ELR
 }
 
 if (base != null && base.getClass().isArray()) {
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, property);
 int idx = coerce(property);
 if (idx < 0 || idx >= Array.getLength(base)) {
 return null;
@@ -76,7 +76,7 @@ public class ArrayELResolver extends ELR
 }
 
 if (base != null && base.getClass().isArray()) {
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, property);
 
 if (this.readOnly) {
 throw new PropertyNotWritableException(Util.message(context,
@@ -103,7 +103,7 @@ public class ArrayELResolver extends ELR
 }
 
 if (base != null && base.getClass().isArray()) {
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, property);
 int idx = coerce(property);
 checkBounds(base, idx);
 }

Modified: tomcat/trunk/java/javax/el/BeanELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=1500736&r1=1500735&r2=1500736&view=diff
==
--- tomcat/trunk/java/javax/el/BeanELResolver.java (original)
+++ tomcat/trunk/java/javax/el/BeanELResolver.java Mon Jul  8 13:58:50 2013
@@ -78,7 +78,7 @@ public class BeanELResolver extends ELRe
 return null;
 }
 
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, property);
 return this.property(context, base, property).getPropertyType();
 }
 
@@ -91,7 +91,7 @@ public class BeanELResolver extends ELRe
 return null;
 }
 
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, property);
 Method m = this.property(context, base, property).read(context);
 try {
 return m.invoke(base, (Object[]) null);
@@ -122,7 +122,7 @@ public class BeanELResolver extends ELRe
 return;
 }
 
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, property);
 
 if (this.readOnly) {
 throw new PropertyNotWritableException(Util.message(context,
@@ -185,7 +185,7 @@ public class BeanELResolver extends ELRe
 throw new ELException(cause);
 }
 
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, method);
 return result;
 }
 
@@ -198,7 +198,7 @@ public class BeanELResolver extends ELRe
 return false;
 }
 
-context.setPropertyResolved(true);
+context.setPropertyResolved(base, property);
 return this.readOnly
 || this.property(context, base, property).isReadOnly();
 }

Modified: tomcat/trunk/java/javax/el/BeanNameELResolver.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanNameELResolver.java?rev=1500736&r1=150073

buildbot failure in ASF Buildbot on tomcat-trunk

2013-07-08 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4618

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1500707
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





Re: Jasper improvements/XML handling

2013-07-08 Thread Jeremy Boynes
On Jul 8, 2013, at 12:23 AM, Mark Thomas  wrote:
> On 08/07/2013 06:38, Jeremy Boynes wrote:
...
> 
>> I'm planning on merging these two patches and pressing on with a
>> converged solution, but probably won't be able to do much until next
>> weekend.
> 
> I very much doubt that a single patch that did everything above would
> ever get applied. Small incremental changes are the way to do this. I
> think you've identified the key issues and the right order in which to
> address them. Lets move forward but one small step at a time.

Thanks. It sounds like a couple of people have looked into this area already 
and found a similar ball of twine.
I'll start opening individual issues for the potential enhancements I found and 
break down the patches to be as fine grained as I can.

Cheers
Jeremy


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Jasper improvements/XML handling

2013-07-08 Thread Violeta Georgieva
2013/7/8 Mark Thomas wrote:
>
> On 08/07/2013 06:38, Jeremy Boynes wrote:
> > On Jun 25, 2013, at 10:44 PM, Jeremy Boynes 
> > wrote:
>
> > Jasper's descriptor parser (used for web.xml and TLDs) can only
> > validate DTD-based documents. I opened 55212 about adding it. Such a
> > fix could benefit from using the same resolver and cached copies that
> > Catalina does. This is less of an issue if Jasper uses the
> > ServletContext as it could rely on the container to parse/validate
> > web.xml. It would still be needed if we wanted JspC to validate files
> > standalone but there is a separate ant task that can do that.
>
> Jasper and Catalina need to share the same web.xml parsing and merging
> code. Violetta started on this before she was a committer but the work
> stalled primarily because of the size of patch which in turn was due to
> the re-factoring required. The first step is to get the parsing and
> merging into a package that can be shared by Jasper and Catalina. That
> is far easier for a committer to do as they can use the refactoring
> tools in an IDE rather than having to generate a huge patch and then
> wait for a committer to find the time to review it.
>


Jeremy,

Here [1] is my work on the topic that I started several months ago.
We can discuss which parts of it are still applicable and I can work on
this also.

Regards
Violeta

[1] https://github.com/violetagg/apache-tomcat-8.0/commits/master


[Bug 55102] Add ability to report time taken to prepare response

2013-07-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55102

Jeremy Boynes  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500827 - /tomcat/trunk/test/javax/el/TestImportHandler.java

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 16:38:50 2013
New Revision: 1500827

URL: http://svn.apache.org/r1500827
Log:
Add missing exception check

Modified:
tomcat/trunk/test/javax/el/TestImportHandler.java

Modified: tomcat/trunk/test/javax/el/TestImportHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestImportHandler.java?rev=1500827&r1=1500826&r2=1500827&view=diff
==
--- tomcat/trunk/test/javax/el/TestImportHandler.java (original)
+++ tomcat/trunk/test/javax/el/TestImportHandler.java Mon Jul  8 16:38:50 2013
@@ -156,7 +156,7 @@ public class TestImportHandler {
 /**
  * Import an invalid static field - conflict.
  */
-@Test
+@Test(expected=ELException.class)
 public void testImportStatic04() {
 ImportHandler handler = new ImportHandler();
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Jasper improvements/XML handling

2013-07-08 Thread Mark Thomas
On 08/07/2013 16:55, Violeta Georgieva wrote:
> 2013/7/8 Mark Thomas wrote:
>>
>> On 08/07/2013 06:38, Jeremy Boynes wrote:
>>> On Jun 25, 2013, at 10:44 PM, Jeremy Boynes 
>>> wrote:
>>
>>> Jasper's descriptor parser (used for web.xml and TLDs) can only
>>> validate DTD-based documents. I opened 55212 about adding it. Such a
>>> fix could benefit from using the same resolver and cached copies that
>>> Catalina does. This is less of an issue if Jasper uses the
>>> ServletContext as it could rely on the container to parse/validate
>>> web.xml. It would still be needed if we wanted JspC to validate files
>>> standalone but there is a separate ant task that can do that.
>>
>> Jasper and Catalina need to share the same web.xml parsing and merging
>> code. Violetta started on this before she was a committer but the work
>> stalled primarily because of the size of patch which in turn was due to
>> the re-factoring required. The first step is to get the parsing and
>> merging into a package that can be shared by Jasper and Catalina. That
>> is far easier for a committer to do as they can use the refactoring
>> tools in an IDE rather than having to generate a huge patch and then
>> wait for a committer to find the time to review it.
>>
> 
> 
> Jeremy,
> 
> Here [1] is my work on the topic that I started several months ago.
> We can discuss which parts of it are still applicable and I can work on
> this also.
> 
> Regards
> Violeta
> 
> [1] https://github.com/violetagg/apache-tomcat-8.0/commits/master

Yep, that is where I was planning on starting from as well - at least
following the same steps anyway. There may well be differences in the
detail. One of the things I want to do is to take a look with Structure
101 to ensure that we get the interdependencies right.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500834 - in /tomcat/trunk: build.xml java/org/apache/tomcat/util/descriptor/ java/org/apache/tomcat/util/descriptor/web/

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 16:51:38 2013
New Revision: 1500834

URL: http://svn.apache.org/r1500834
Log:
Create a new package for descriptor parsing that will be shared between 
Catalina and Jasper.
There is currently a single sub-package (web) for web.xml parsing. It is 
expected that additional parsers will be added (e.g. for taglibs).
The intended end point is for Jasper to depend only on the Servlet API and JspC 
to share web.xml processing with Catalina so it can handle web applications 
with fragments.

Added:
tomcat/trunk/java/org/apache/tomcat/util/descriptor/
tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/
Modified:
tomcat/trunk/build.xml

Modified: tomcat/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1500834&r1=1500833&r2=1500834&view=diff
==
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Mon Jul  8 16:51:38 2013
@@ -319,6 +319,7 @@
   
 
 
+
 
 
 
@@ -366,6 +367,7 @@
  WebSockets -->
 
 
+
 
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 55210] SEVERE: The ServletContentInitializer [# Licensed to the Apache Software Foundation (ASF) under one or more] could not be created

2013-07-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55210

--- Comment #4 from Nick Williams  ---
Excellent! Thanks for acting on it so quickly!

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in ASF Buildbot on tomcat-trunk

2013-07-08 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4620

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1500827
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[Bug 55215] New: Improvements to sample log4j configuration

2013-07-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55215

Bug ID: 55215
   Summary: Improvements to sample log4j configuration
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: minor
  Priority: P2
 Component: Documentation
  Assignee: dev@tomcat.apache.org
  Reporter: br...@pingtoo.com

Created attachment 30569
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=30569&action=edit
patch to docs/logging.xml

I decided to make a fresh start with my log4j configuration because it hasn't
changed much since tc5. Naturally, I chose
http://tomcat.apache.org/tomcat-7.0-doc/logging.html as my starting point.

The sample configuration seems to suffer from the same kind of problem - log4j
was quite picky about syntax in "the old days" and so the current version seemd
to be worth a spring clean.

1. The File properties cause the "live" log files to be created with names that
have a trailing dot. Further, as these files are renamed by the Rolling
Appender they end up with a double dot in the middle of the new file name.

2. The "live" files also acquire an additional ".log" suffix when Rolled. This
is superfluous when the configuration quite sensibly puts all the files into a
subdirectory called "logs".

3. Following log4j best practices (http://juliusdavies.ca/logging.html), I have
extracted three error-prone substrings which are used many times, and defined
them at the top of the configuration as local log4j symbolic variables.

4. I have consistently used white space around the property equals signs to
improve readability. Some of the older properties did not use white space,
while the newer ones did.

The patch is directed at tc8 trunk, although the generated html sample
configuration is a subset of that currently working on my production tc7
system.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500887 - in /tomcat/trunk: java/javax/el/ELContext.java test/javax/el/TestELContext.java test/javax/el/TesterEvaluationListener.java

2013-07-08 Thread violetagg
Author: violetagg
Date: Mon Jul  8 19:10:52 2013
New Revision: 1500887

URL: http://svn.apache.org/r1500887
Log:
Unit tests for ELContext

Modified:
tomcat/trunk/java/javax/el/ELContext.java
tomcat/trunk/test/javax/el/TestELContext.java
tomcat/trunk/test/javax/el/TesterEvaluationListener.java

Modified: tomcat/trunk/java/javax/el/ELContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ELContext.java?rev=1500887&r1=1500886&r2=1500887&view=diff
==
--- tomcat/trunk/java/javax/el/ELContext.java (original)
+++ tomcat/trunk/java/javax/el/ELContext.java Mon Jul  8 19:10:52 2013
@@ -61,7 +61,7 @@ public abstract class ELContext {
 // Can't use Class because API needs to match specification
 /**
  * @throws NullPointerException
- *  If the supplied context is null
+ *  If the supplied key or context is null
  */
 public void putContext(@SuppressWarnings("rawtypes") Class key,
 Object contextObject) {
@@ -79,7 +79,7 @@ public abstract class ELContext {
 // Can't use Class because API needs to match specification
 /**
  * @throws NullPointerException
- *  If the key is null
+ *  If the supplied key is null
  */
 public Object getContext(@SuppressWarnings("rawtypes") Class key) {
 if (key == null) {

Modified: tomcat/trunk/test/javax/el/TestELContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/el/TestELContext.java?rev=1500887&r1=1500886&r2=1500887&view=diff
==
--- tomcat/trunk/test/javax/el/TestELContext.java (original)
+++ tomcat/trunk/test/javax/el/TestELContext.java Mon Jul  8 19:10:52 2013
@@ -16,6 +16,11 @@
  */
 package javax.el;
 
+import java.util.List;
+
+import javax.el.TesterEvaluationListener.Pair;
+
+import org.junit.Assert;
 import org.junit.Test;
 
 public class TestELContext {
@@ -29,4 +34,140 @@ public class TestELContext {
 elContext.getContext(null);
 }
 
+/**
+ * Tests that a null key results in an NPE as per EL Javadoc.
+ */
+@Test(expected = NullPointerException.class)
+public void testPutContext01() {
+ELContext elContext = new TesterELContext();
+elContext.putContext(null, new Object());
+}
+
+/**
+ * Tests that a null context results in an NPE as per EL Javadoc.
+ */
+@Test(expected = NullPointerException.class)
+public void testPutContext02() {
+ELContext elContext = new TesterELContext();
+elContext.putContext(Object.class, null);
+}
+
+/**
+ * Tests that the context object will be added to the map with context
+ * objects. The key is used as unique identifier of the context object in
+ * the map.
+ */
+@Test
+public void testPutContext03() {
+ELContext elContext = new TesterELContext();
+Assert.assertNull(elContext.getContext(String.class));
+elContext.putContext(String.class, "test");
+Assert.assertEquals("test", elContext.getContext(String.class));
+elContext.putContext(String.class, "test1");
+Assert.assertEquals("test1", elContext.getContext(String.class));
+}
+
+/**
+ * Tests that propertyResolved will be set to true and the corresponding
+ * listeners will be notified.
+ */
+@Test
+public void testSetPropertyResolved() {
+ELContext elContext = new TesterELContext();
+
+TesterEvaluationListener listener = new TesterEvaluationListener();
+elContext.addEvaluationListener(listener);
+
+TesterBean bean = new TesterBean("test");
+
+elContext.setPropertyResolved(bean, "name");
+
+Assert.assertTrue(elContext.isPropertyResolved());
+
+List events = listener.getResolvedProperties();
+Assert.assertEquals(1, events.size());
+Pair p = events.get(0);
+Assert.assertEquals(bean, p.getBase());
+Assert.assertEquals("name", p.getProperty());
+}
+
+/**
+ * Tests that the corresponding listeners will be notified.
+ */
+@Test
+public void testNotifyBeforeEvaluation() {
+ELContext elContext = new TesterELContext();
+
+TesterEvaluationListener listener = new TesterEvaluationListener();
+elContext.addEvaluationListener(listener);
+
+elContext.notifyBeforeEvaluation("before");
+
+List events = listener.getBeforeEvaluationExpressions();
+Assert.assertEquals(1, events.size());
+Assert.assertEquals("before", events.get(0));
+}
+
+/**
+ * Tests that the corresponding listeners will be notified.
+ */
+@Test
+public void testNotifyAfterEvaluation() {
+ELContext elContext = new TesterELContext();
+
+TesterEvaluationListener listener = new TesterEvaluationListener();
+elContext.addEvaluatio

[Bug 55215] Improvements to sample log4j configuration

2013-07-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=55215

--- Comment #1 from Konstantin Kolinko  ---
(In reply to Brian Burch from comment #0)
> Created attachment 30569 [details]
> patch to docs/logging.xml
> 
> I decided to make a fresh start with my log4j configuration because it
> hasn't changed much since tc5. Naturally, I chose
> http://tomcat.apache.org/tomcat-7.0-doc/logging.html as my starting point.
> 
> The sample configuration seems to suffer from the same kind of problem -
> log4j was quite picky about syntax in "the old days" and so the current
> version seemd to be worth a spring clean.
> 
> 1. The File properties cause the "live" log files to be created with names
> that have a trailing dot. Further, as these files are renamed by the Rolling
> Appender they end up with a double dot in the middle of the new file name.
> 

So it boils down to removing the trailing dot from
log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.
to be
log4j.appender.CATALINA.File=${catalina.base}/logs/catalina

and so on, because the dot is already contained in DatePattern property.

> 2. The "live" files also acquire an additional ".log" suffix when Rolled.
> This is superfluous when the configuration quite sensibly puts all the files
> into a subdirectory called "logs".

I think this should be kept as is.

1). The .log suffix might be needed e.g. to assign mime types when serving
those files through HTTP.

It may be also useful when transferring such files between systems. Some
clients automatically do LF<->CRLF according to file types.

2). This configuration is supposed to match the default (JULI) one.

> 3. Following log4j best practices (http://juliusdavies.ca/logging.html), I
> have extracted three error-prone substrings which are used many times, and
> defined them at the top of the configuration as local log4j symbolic
> variables.

Interesting, but I suspect that it will be harder for newbies to read such
configuration.

> 4. I have consistently used white space around the property equals signs to
> improve readability. Some of the older properties did not use white space,
> while the newer ones did.
> 
> The patch is directed at tc8 trunk, although the generated html sample
> configuration is a subset of that currently working on my production tc7
> system.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500934 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/servlets/ java/org/apache/catalina/util/ java/org/apache/tomcat/util/b

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 20:32:53 2013
New Revision: 1500934

URL: http://svn.apache.org/r1500934
Log:
Move URL decoding util methods to support upcoming refactoring of
web.xml parsing.

Added:
tomcat/trunk/test/org/apache/tomcat/util/buf/TestUDecoder.java
  - copied, changed from r1500887, 
tomcat/trunk/test/org/apache/catalina/util/TestRequestUtil.java
Removed:
tomcat/trunk/test/org/apache/catalina/util/TestRequestUtil.java
Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/deploy/ErrorPage.java
tomcat/trunk/java/org/apache/catalina/deploy/FilterMap.java
tomcat/trunk/java/org/apache/catalina/deploy/LoginConfig.java
tomcat/trunk/java/org/apache/catalina/deploy/SecurityCollection.java
tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
tomcat/trunk/java/org/apache/catalina/util/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/util/RequestUtil.java
tomcat/trunk/java/org/apache/tomcat/util/buf/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/util/buf/UDecoder.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1500934&r1=1500933&r2=1500934&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Mon Jul  8 
20:32:53 2013
@@ -115,7 +115,6 @@ import org.apache.catalina.startup.TldCo
 import org.apache.catalina.util.CharsetMapper;
 import org.apache.catalina.util.ContextName;
 import org.apache.catalina.util.ExtensionValidator;
-import org.apache.catalina.util.RequestUtil;
 import org.apache.catalina.util.URLEncoder;
 import org.apache.catalina.webresources.StandardRoot;
 import org.apache.juli.logging.Log;
@@ -125,6 +124,7 @@ import org.apache.tomcat.InstanceManager
 import org.apache.tomcat.JarScanner;
 import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.IntrospectionUtils;
+import org.apache.tomcat.util.buf.UDecoder;
 import org.apache.tomcat.util.scan.StandardJarScanner;
 
 /**
@@ -3172,7 +3172,7 @@ public class StandardContext extends Con
 if (findChild(name) == null)
 throw new IllegalArgumentException
 (sm.getString("standardContext.servletMap.name", name));
-String decodedPattern = 
adjustURLPattern(RequestUtil.URLDecode(pattern));
+String decodedPattern = adjustURLPattern(UDecoder.URLDecode(pattern));
 if (!validateURLPattern(decodedPattern))
 throw new IllegalArgumentException
 (sm.getString("standardContext.servletMap.pattern", 
decodedPattern));

Modified: tomcat/trunk/java/org/apache/catalina/deploy/ErrorPage.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/ErrorPage.java?rev=1500934&r1=1500933&r2=1500934&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/ErrorPage.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/ErrorPage.java Mon Jul  8 
20:32:53 2013
@@ -21,7 +21,7 @@ package org.apache.catalina.deploy;
 
 import java.io.Serializable;
 
-import org.apache.catalina.util.RequestUtil;
+import org.apache.tomcat.util.buf.UDecoder;
 
 
 /**
@@ -142,7 +142,7 @@ public class ErrorPage implements Serial
 //if ((location == null) || !location.startsWith("/"))
 //throw new IllegalArgumentException
 //("Error Page Location must start with a '/'");
-this.location = RequestUtil.URLDecode(location);
+this.location = UDecoder.URLDecode(location);
 
 }
 

Modified: tomcat/trunk/java/org/apache/catalina/deploy/FilterMap.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/FilterMap.java?rev=1500934&r1=1500933&r2=1500934&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/FilterMap.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/FilterMap.java Mon Jul  8 
20:32:53 2013
@@ -25,7 +25,7 @@ import java.util.Locale;
 
 import javax.servlet.DispatcherType;
 
-import org.apache.catalina.util.RequestUtil;
+import org.apache.tomcat.util.buf.UDecoder;
 
 
 /**
@@ -138,7 +138,7 @@ public class FilterMap implements Serial
 } else {
 String[] results = new String[urlPatterns.length + 1];
 System.arraycopy(urlPatterns, 0, results, 0, urlPatterns.length);
-results[urlPatterns.length] = RequestUtil.URLDecode(urlPattern);
+results[urlPatterns.length] = UDecoder.URLDecode(urlPattern);
 urlPatterns = results;
 }
 }

Modified: tomcat/trunk

svn commit: r1500947 - in /tomcat/trunk: java/org/apache/catalina/ java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/mbeans/ java/org/apache/catalina/startup/ ja

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 21:02:07 2013
New Revision: 1500947

URL: http://svn.apache.org/r1500947
Log:
NamingResources -> NamingResourcesImpl in preparation for new interface
NamingResources

Added:
tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java
  - copied, changed from r1500934, 
tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
Removed:
tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
Modified:
tomcat/trunk/java/org/apache/catalina/Context.java
tomcat/trunk/java/org/apache/catalina/Server.java
tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
tomcat/trunk/java/org/apache/catalina/deploy/ResourceBase.java
tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java
tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceLinkMBean.java
tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceMBean.java
tomcat/trunk/java/org/apache/catalina/mbeans/NamingResourcesMBean.java
tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java
tomcat/trunk/java/org/apache/catalina/startup/SetNextNamingRule.java

tomcat/trunk/java/org/apache/catalina/storeconfig/GlobalNamingResourcesSF.java
tomcat/trunk/java/org/apache/catalina/storeconfig/NamingResourcesSF.java
tomcat/trunk/java/org/apache/catalina/storeconfig/StandardContextSF.java
tomcat/trunk/java/org/apache/catalina/storeconfig/StandardServerSF.java
tomcat/trunk/test/org/apache/catalina/core/TesterContext.java

Modified: tomcat/trunk/java/org/apache/catalina/Context.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Context.java?rev=1500947&r1=1500946&r2=1500947&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Context.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Context.java Mon Jul  8 21:02:07 2013
@@ -34,7 +34,7 @@ import org.apache.catalina.deploy.ErrorP
 import org.apache.catalina.deploy.FilterDef;
 import org.apache.catalina.deploy.FilterMap;
 import org.apache.catalina.deploy.LoginConfig;
-import org.apache.catalina.deploy.NamingResources;
+import org.apache.catalina.deploy.NamingResourcesImpl;
 import org.apache.catalina.deploy.SecurityConstraint;
 import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.JarScanner;
@@ -424,7 +424,7 @@ public interface Context extends Contain
 /**
  * Return the naming resources associated with this web application.
  */
-public NamingResources getNamingResources();
+public NamingResourcesImpl getNamingResources();
 
 
 /**
@@ -432,7 +432,7 @@ public interface Context extends Contain
  *
  * @param namingResources The new naming resources
  */
-public void setNamingResources(NamingResources namingResources);
+public void setNamingResources(NamingResourcesImpl namingResources);
 
 
 /**

Modified: tomcat/trunk/java/org/apache/catalina/Server.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/Server.java?rev=1500947&r1=1500946&r2=1500947&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/Server.java (original)
+++ tomcat/trunk/java/org/apache/catalina/Server.java Mon Jul  8 21:02:07 2013
@@ -20,7 +20,7 @@ package org.apache.catalina;
 
 import java.io.File;
 
-import org.apache.catalina.deploy.NamingResources;
+import org.apache.catalina.deploy.NamingResourcesImpl;
 import org.apache.catalina.startup.Catalina;
 
 /**
@@ -55,7 +55,7 @@ public interface Server extends Lifecycl
 /**
  * Return the global naming resources.
  */
-public NamingResources getGlobalNamingResources();
+public NamingResourcesImpl getGlobalNamingResources();
 
 
 /**
@@ -64,7 +64,7 @@ public interface Server extends Lifecycl
  * @param globalNamingResources The new global naming resources
  */
 public void setGlobalNamingResources
-(NamingResources globalNamingResources);
+(NamingResourcesImpl globalNamingResources);
 
 
 /**

Modified: tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java?rev=1500947&r1=1500946&r2=1500947&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java Mon 
Jul  8 21:02:07 2013
@@ -54,7 +54,7 @@ import org.apache.catalina.deploy.Contex
 import org.apache.catalina.deploy.ContextResourceLink;
 import org.apache.catalina.deploy.ContextService;
 import org.apache.catalina.deploy.C

svn commit: r1500948 - in /tomcat/trunk/java/org/apache: catalina/deploy/ catalina/mbeans/ tomcat/util/descriptor/web/

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 21:02:52 2013
New Revision: 1500948

URL: http://svn.apache.org/r1500948
Log:
Switch to NamingResources interface in objects that represent JNDI
entries in web.xml

Added:
tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/NamingResources.java
Modified:
tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java
tomcat/trunk/java/org/apache/catalina/deploy/ResourceBase.java
tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java
tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceLinkMBean.java
tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceMBean.java

Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java?rev=1500948&r1=1500947&r2=1500948&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java Mon 
Jul  8 21:02:52 2013
@@ -42,6 +42,7 @@ import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 import org.apache.naming.ContextBindings;
 import org.apache.tomcat.util.ExceptionUtils;
+import org.apache.tomcat.util.descriptor.web.NamingResources;
 import org.apache.tomcat.util.res.StringManager;
 
 
@@ -53,7 +54,8 @@ import org.apache.tomcat.util.res.String
  * @version $Id$
  */
 
-public class NamingResourcesImpl extends LifecycleMBeanBase implements 
Serializable {
+public class NamingResourcesImpl extends LifecycleMBeanBase
+implements Serializable, NamingResources {
 
 private static final long serialVersionUID = 1L;
 
@@ -164,6 +166,7 @@ public class NamingResourcesImpl extends
 /**
  * Get the container with which the naming resources are associated.
  */
+@Override
 public Object getContainer() {
 return container;
 }
@@ -220,6 +223,7 @@ public class NamingResourcesImpl extends
  *
  * @param environment New environment entry
  */
+@Override
 public void addEnvironment(ContextEnvironment environment) {
 
 if (entries.contains(environment.getName())) {
@@ -353,6 +357,7 @@ public class NamingResourcesImpl extends
  *
  * @param resource New resource reference
  */
+@Override
 public void addResource(ContextResource resource) {
 
 if (entries.contains(resource.getName())) {
@@ -416,6 +421,7 @@ public class NamingResourcesImpl extends
  *
  * @param resourceLink New resource link
  */
+@Override
 public void addResourceLink(ContextResourceLink resourceLink) {
 
 if (entries.contains(resourceLink.getName())) {
@@ -726,6 +732,7 @@ public class NamingResourcesImpl extends
  *
  * @param name Name of the environment entry to remove
  */
+@Override
 public void removeEnvironment(String name) {
 
 entries.remove(name);
@@ -810,6 +817,7 @@ public class NamingResourcesImpl extends
  *
  * @param name Name of the resource reference to remove
  */
+@Override
 public void removeResource(String name) {
 
 entries.remove(name);
@@ -861,6 +869,7 @@ public class NamingResourcesImpl extends
  *
  * @param name Name of the resource link to remove
  */
+@Override
 public void removeResourceLink(String name) {
 
 entries.remove(name);

Modified: tomcat/trunk/java/org/apache/catalina/deploy/ResourceBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/ResourceBase.java?rev=1500948&r1=1500947&r2=1500948&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/deploy/ResourceBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/deploy/ResourceBase.java Mon Jul  8 
21:02:52 2013
@@ -22,6 +22,8 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.tomcat.util.descriptor.web.NamingResources;
+
 
 /**
  * Representation of an Context element
@@ -199,13 +201,13 @@ public class ResourceBase implements Ser
 /**
  * The NamingResources with which we are associated (if any).
  */
-protected NamingResourcesImpl resources = null;
+protected NamingResources resources = null;
 
-public NamingResourcesImpl getNamingResources() {
+public NamingResources getNamingResources() {
 return (this.resources);
 }
 
-void setNamingResources(NamingResourcesImpl resources) {
+void setNamingResources(NamingResources resources) {
 this.resources = resources;
 }
 }

Modified: 
tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java?rev=1500948&r1=1500947&

Re: Jasper improvements/XML handling

2013-07-08 Thread Mark Thomas
On 08/07/2013 16:02, Jeremy Boynes wrote:
> On Jul 8, 2013, at 12:23 AM, Mark Thomas  wrote:
>> On 08/07/2013 06:38, Jeremy Boynes wrote:
> ...
>>
>>> I'm planning on merging these two patches and pressing on with a
>>> converged solution, but probably won't be able to do much until next
>>> weekend.
>>
>> I very much doubt that a single patch that did everything above would
>> ever get applied. Small incremental changes are the way to do this. I
>> think you've identified the key issues and the right order in which to
>> address them. Lets move forward but one small step at a time.
> 
> Thanks. It sounds like a couple of people have looked into this area already 
> and found a similar ball of twine.
> I'll start opening individual issues for the potential enhancements I found 
> and break down the patches to be as fine grained as I can.

Great.

You've probably seen that I have started the work to move the web.xml
processing code to a common package. I'm validating each step by
comparing to Violetta's github version.

trunk is going to be somewhat of a moving target over the next few days.
You'll probably see a few "It would be great if you could extract xyz
from your patch" requests but check trunk before you start on them as
they might already have been done by the time you read the message. For
example, the changes to the schema resolver are likely to be needed
fairly soon so that would be a good one to start with.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1500979 - in /tomcat/trunk/test: org/apache/jasper/compiler/TestJspConfig.java org/apache/jasper/compiler/TestValidator.java webapp-2.2/ webapp-2.2/WEB-INF/web.xml

2013-07-08 Thread markt
Author: markt
Date: Mon Jul  8 21:44:32 2013
New Revision: 1500979

URL: http://svn.apache.org/r1500979
Log:
Add a Servlet 2.2 test web application.
Extracted from a larger patch by Jeremy Boynes

Added:
tomcat/trunk/test/webapp-2.2/
  - copied from r1500948, tomcat/trunk/test/webapp-2.3/
Modified:
tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java
tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java
tomcat/trunk/test/webapp-2.2/WEB-INF/web.xml

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java?rev=1500979&r1=1500978&r2=1500979&view=diff
==
--- tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestJspConfig.java Mon Jul  8 
21:44:32 2013
@@ -30,6 +30,26 @@ import org.apache.tomcat.util.buf.ByteCh
 public class TestJspConfig extends TomcatBaseTest {
 
 @Test
+public void testServlet22NoEL() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir =
+new File("test/webapp-2.2");
+// app dir is relative to server home
+tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+tomcat.start();
+
+ByteChunk res = getUrl("http://localhost:"; + getPort() +
+"/test/el-as-literal.jsp");
+
+String result = res.toString();
+
+assertTrue(result.indexOf("00-${'hello world'}") > 0);
+assertTrue(result.indexOf("01-#{'hello world'}") > 0);
+}
+
+@Test
 public void testServlet23NoEL() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java?rev=1500979&r1=1500978&r2=1500979&view=diff
==
--- tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java Mon Jul  8 
21:44:32 2013
@@ -53,6 +53,31 @@ public class TestValidator extends Tomca
 }
 
 @Test
+public void testTldVersions22() throws Exception {
+Tomcat tomcat = getTomcatInstance();
+
+File appDir =
+new File("test/webapp-2.2");
+// app dir is relative to server home
+tomcat.addWebapp(null, "/test", appDir.getAbsolutePath());
+
+tomcat.start();
+
+ByteChunk res = getUrl("http://localhost:"; + getPort() +
+"/test/tld-versions.jsp");
+
+String result = res.toString();
+
+assertTrue(result.indexOf("${'00-hello world'}") > 0);
+assertTrue(result.indexOf("#{'01-hello world'}") > 0);
+assertTrue(result.indexOf("${'02-hello world'}") > 0);
+assertTrue(result.indexOf("#{'03-hello world'}") > 0);
+assertTrue(result.indexOf("${'04-hello world'}") > 0);
+assertTrue(result.indexOf("#{'05-hello world'}") > 0);
+assertTrue(result.indexOf("${'06-hello world'}") > 0);
+}
+
+@Test
 public void testTldVersions23() throws Exception {
 Tomcat tomcat = getTomcatInstance();
 

Modified: tomcat/trunk/test/webapp-2.2/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-2.2/WEB-INF/web.xml?rev=1500979&r1=1500948&r2=1500979&view=diff
==
--- tomcat/trunk/test/webapp-2.2/WEB-INF/web.xml (original)
+++ tomcat/trunk/test/webapp-2.2/WEB-INF/web.xml Mon Jul  8 21:44:32 2013
@@ -16,15 +16,15 @@
   limitations under the License.
 -->
 http://java.sun.com/dtd/web-app_2_3.dtd";>
+  "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
+  "http://java.sun.com/dtd/web-app_2_2.dtd";>
 
-  Tomcat Servlet 2.3 Tests
+  Tomcat Servlet 2.2 Tests
   
 Provides a web application used by the Tomcat unit tests to ensure that
 Tomcat meets the requirements of the current JSP and Servlet specification
-for web applications that declare that they follow version 2.3 of the
-Servlet specification and version 1.2 of the JSP specification. This
+for web applications that declare that they follow version 2.2 of the
+Servlet specification and version 1.1 of the JSP specification. This
 typically means ensuring that features introduced in later versions of the
 specification do not change the behaviour of applications that declared an
 earlier version of the specification.



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[jira] [Created] (MTOMCAT-231) tomcat6:run fail with jdk1.5 because commons-io-2.4 requires jdk1.6

2013-07-08 Thread ricou7b (JIRA)
ricou7b created MTOMCAT-231:
---

 Summary: tomcat6:run fail with jdk1.5 because commons-io-2.4 
requires jdk1.6
 Key: MTOMCAT-231
 URL: https://issues.apache.org/jira/browse/MTOMCAT-231
 Project: Apache Tomcat Maven Plugin
  Issue Type: Bug
  Components: tomcat6
Affects Versions: 2.1, 2.0
 Environment: all
Reporter: ricou7b
Assignee: Olivier Lamy (*$^¨%`£)


You can't launch mvn tomcat6:run with jdk5 because the plugin dependency 
commons-io-2.4 requires jdk6.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in ASF Buildbot on tomcat-trunk

2013-07-08 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4625

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1500979
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





Re: buildbot failure in ASF Buildbot on tomcat-trunk

2013-07-08 Thread Konstantin Kolinko
2013/7/9  :
> The Buildbot has detected a new failure on builder tomcat-trunk while 
> building ASF Buildbot.
> Full details are available at:
>  http://ci.apache.org/builders/tomcat-trunk/builds/4625
>
> Buildbot URL: http://ci.apache.org/
>
> Buildslave for this Build: bb-vm_ubuntu
>
> Build Reason: scheduler
> Build Source Stamp: [branch tomcat/trunk] 1500979
> Blamelist: markt
>
> BUILD FAILED: failed compile_1
>


 Test org.apache.catalina.core.TestApplicationContext FAILED
 Test org.apache.catalina.core.TestStandardContext FAILED
and many others are failing...,

http://ci.apache.org/projects/tomcat/tomcat8/logs/1500979/TEST-org.apache.catalina.core.TestStandardContext.BIO.txt

java.lang.ClassNotFoundException: org.apache.catalina.deploy.FilterDef
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1466)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1311)
at 
org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:116)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1171)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
at (...)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1432)
at 
org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:2001)

Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1501081 - in /tomcat/trunk/java/org/apache/catalina: mbeans/NamingResourcesMBean.java startup/Catalina.java

2013-07-08 Thread violetagg
Author: violetagg
Date: Tue Jul  9 04:28:42 2013
New Revision: 1501081

URL: http://svn.apache.org/r1501081
Log:
Followup to r1500947: NamingResources -> NamingResourcesImpl

Modified:
tomcat/trunk/java/org/apache/catalina/mbeans/NamingResourcesMBean.java
tomcat/trunk/java/org/apache/catalina/startup/Catalina.java

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/NamingResourcesMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/NamingResourcesMBean.java?rev=1501081&r1=1501080&r2=1501081&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/NamingResourcesMBean.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/NamingResourcesMBean.java Tue 
Jul  9 04:28:42 2013
@@ -34,7 +34,7 @@ import org.apache.tomcat.util.modeler.Re
 
 /**
  * A ModelMBean implementation for the
- * org.apache.catalina.deploy.NamingResources component.
+ * org.apache.catalina.deploy.NamingResourcesImpl component.
  *
  * @author Amy Roh
  * @version $Id$

Modified: tomcat/trunk/java/org/apache/catalina/startup/Catalina.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Catalina.java?rev=1501081&r1=1501080&r2=1501081&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/Catalina.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Catalina.java Tue Jul  9 
04:28:42 2013
@@ -287,11 +287,11 @@ public class Catalina {
 "org.apache.catalina.Server");
 
 digester.addObjectCreate("Server/GlobalNamingResources",
- "org.apache.catalina.deploy.NamingResources");
+ 
"org.apache.catalina.deploy.NamingResourcesImpl");
 digester.addSetProperties("Server/GlobalNamingResources");
 digester.addSetNext("Server/GlobalNamingResources",
 "setGlobalNamingResources",
-"org.apache.catalina.deploy.NamingResources");
+"org.apache.catalina.deploy.NamingResourcesImpl");
 
 digester.addObjectCreate("Server/Listener",
  null, // MUST be specified in the element



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1501082 - in /tomcat/trunk/java/org/apache: catalina/mbeans/ catalina/startup/ tomcat/util/descriptor/web/

2013-07-08 Thread violetagg
Author: violetagg
Date: Tue Jul  9 04:33:04 2013
New Revision: 1501082

URL: http://svn.apache.org/r1501082
Log:
Followup to r1500964: The new package in *RuleSet classes and in mbeans 
descriptors.

Modified:
tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java
tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceLinkMBean.java
tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceMBean.java
tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
tomcat/trunk/java/org/apache/catalina/startup/ContextRuleSet.java
tomcat/trunk/java/org/apache/catalina/startup/NamingRuleSet.java
tomcat/trunk/java/org/apache/catalina/startup/WebRuleSet.java

tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/mbeans-descriptors.xml

Modified: 
tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java?rev=1501082&r1=1501081&r2=1501082&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java 
Tue Jul  9 04:33:04 2013
@@ -31,7 +31,7 @@ import org.apache.tomcat.util.modeler.Ba
 
 /**
  * A ModelMBean implementation for the
- * org.apache.catalina.deploy.ContextEnvironment component.
+ * org.apache.tomcat.util.descriptor.web.ContextEnvironment 
component.
  *
  * @author Amy Roh
  * @version $Id$

Modified: 
tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceLinkMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceLinkMBean.java?rev=1501082&r1=1501081&r2=1501082&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceLinkMBean.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceLinkMBean.java 
Tue Jul  9 04:33:04 2013
@@ -31,7 +31,7 @@ import org.apache.tomcat.util.modeler.Ba
 
 /**
  * A ModelMBean implementation for the
- * org.apache.catalina.deploy.ContextResourceLink component.
+ * org.apache.tomcat.util.descriptor.web.ContextResourceLink 
component.
  *
  * @author Amy Roh
  * @version $Id$

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceMBean.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceMBean.java?rev=1501082&r1=1501081&r2=1501082&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceMBean.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/ContextResourceMBean.java Tue 
Jul  9 04:33:04 2013
@@ -31,7 +31,7 @@ import org.apache.tomcat.util.modeler.Ba
 
 /**
  * A ModelMBean implementation for the
- * org.apache.catalina.deploy.ContextResource component.
+ * org.apache.tomcat.util.descriptor.web.ContextResource 
component.
  *
  * @author Amy Roh
  * @version $Id$

Modified: tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java?rev=1501082&r1=1501081&r2=1501082&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java (original)
+++ tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java Tue Jul  9 
04:33:04 2013
@@ -564,6 +564,7 @@ public class MBeanUtils {
 registry.loadDescriptors("org.apache.catalina.connector", cl);
 registry.loadDescriptors("org.apache.catalina.valves",  cl);
 registry.loadDescriptors("org.apache.catalina.storeconfig",  cl);
+registry.loadDescriptors("org.apache.tomcat.util.descriptor.web",  
cl);
 }
 return (registry);
 

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextRuleSet.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextRuleSet.java?rev=1501082&r1=1501081&r2=1501082&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/startup/ContextRuleSet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextRuleSet.java Tue Jul  
9 04:33:04 2013
@@ -155,11 +155,11 @@ public class ContextRuleSet extends Rule
 "org.apache.catalina.Store");
 
 digester.addObjectCreate(prefix + "Context/Parameter",
- 
"org.apache.catalina.deploy.ApplicationParameter");
+ 
"org.apache.tomcat.util.descriptor.web.ApplicationParameter");
 digester.addSetProperties(prefix + "Context/Parameter");
 digester.addSetNext(prefix + "Context/Parameter"

buildbot success in ASF Buildbot on tomcat-trunk

2013-07-08 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4626

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1501082
Blamelist: violetagg

Build succeeded!

sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: Jasper improvements/XML handling

2013-07-08 Thread Jeremy Boynes
On Jul 8, 2013, at 2:32 PM, Mark Thomas  wrote:

> On 08/07/2013 16:02, Jeremy Boynes wrote:
>> On Jul 8, 2013, at 12:23 AM, Mark Thomas  wrote:
>>> On 08/07/2013 06:38, Jeremy Boynes wrote:
>> ...
>>> 
 I'm planning on merging these two patches and pressing on with a
 converged solution, but probably won't be able to do much until next
 weekend.
>>> 
>>> I very much doubt that a single patch that did everything above would
>>> ever get applied. Small incremental changes are the way to do this. I
>>> think you've identified the key issues and the right order in which to
>>> address them. Lets move forward but one small step at a time.
>> 
>> Thanks. It sounds like a couple of people have looked into this area already 
>> and found a similar ball of twine.
>> I'll start opening individual issues for the potential enhancements I found 
>> and break down the patches to be as fine grained as I can.
> 
> Great.
> 
> You've probably seen that I have started the work to move the web.xml
> processing code to a common package. I'm validating each step by
> comparing to Violetta's github version.
> 
> trunk is going to be somewhat of a moving target over the next few days.
> You'll probably see a few "It would be great if you could extract xyz
> from your patch" requests but check trunk before you start on them as
> they might already have been done by the time you read the message. For
> example, the changes to the schema resolver are likely to be needed
> fairly soon so that would be a good one to start with.

Thanks, I'll start with that once I've caught up. 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: buildbot failure in ASF Buildbot on tomcat-trunk

2013-07-08 Thread Violeta Georgieva
2013/7/9 Konstantin Kolinko wrote:
>
> 2013/7/9  :
> > The Buildbot has detected a new failure on builder tomcat-trunk while
building ASF Buildbot.
> > Full details are available at:
> >  http://ci.apache.org/builders/tomcat-trunk/builds/4625
> >
> > Buildbot URL: http://ci.apache.org/
> >
> > Buildslave for this Build: bb-vm_ubuntu
> >
> > Build Reason: scheduler
> > Build Source Stamp: [branch tomcat/trunk] 1500979
> > Blamelist: markt
> >
> > BUILD FAILED: failed compile_1
> >
>
>
>  Test org.apache.catalina.core.TestApplicationContext FAILED
>  Test org.apache.catalina.core.TestStandardContext FAILED
> and many others are failing...,
>

The build is OK now.
Thanks
Violeta