Author: rich
Date: Fri Apr 8 15:48:18 2005
New Revision: 160635
URL: http://svn.apache.org/viewcvs?view=rev&rev=160635
Log:
Two patches from Carlin Rogers, to address:
- http://issues.apache.org/jira/browse/BEEHIVE-489 : remove the 500
error-page entry from NetUI default webapp-template web.xml
- http://issues.apache.org/jira/browse/BEEHIVE-432 : validator merge file
are not located correctly with page flow inheritance.
tests: beehive drt (WinXP)
BB: self (linux)
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerChecker.java
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties
incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/web.xml
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerChecker.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerChecker.java?view=diff&r1=160634&r2=160635
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerChecker.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/FlowControllerChecker.java
Fri Apr 8 15:48:18 2005
@@ -337,7 +337,7 @@
for ( Iterator ii = simpleActions.iterator(); ii.hasNext(); )
{
AnnotationMirror i = ( AnnotationMirror ) ii.next();
- checkRelativePath( i, jclass, decl );
+ checkRelativePath( i, PATH_ATTR, jclass, decl );
List conditionalForwards =
CompilerUtils.getAnnotationArray( i,
CONDITIONAL_FORWARDS_ATTR, true );
@@ -346,7 +346,7 @@
for ( Iterator i2 = conditionalForwards.iterator();
i2.hasNext(); )
{
AnnotationMirror j = ( AnnotationMirror )
i2.next();
- checkRelativePath( j, jclass, decl );
+ checkRelativePath( j, PATH_ATTR, jclass, decl );
}
}
}
@@ -360,7 +360,7 @@
for ( Iterator ii = forwards.iterator(); ii.hasNext(); )
{
AnnotationMirror i = ( AnnotationMirror ) ii.next();
- checkRelativePath( i, jclass, decl );
+ checkRelativePath( i, PATH_ATTR, jclass, decl );
}
}
@@ -372,17 +372,24 @@
for ( Iterator ii = catches.iterator(); ii.hasNext(); )
{
AnnotationMirror i = ( AnnotationMirror ) ii.next();
- checkRelativePath( i, jclass, decl );
+ checkRelativePath( i, PATH_ATTR, jclass, decl );
}
}
+
+ AnnotationMirror controllerAnnotation =
CompilerUtils.getAnnotation( decl, CONTROLLER_TAG_NAME );
+
+ if ( controllerAnnotation != null )
+ {
+ checkRelativePath( controllerAnnotation, VALIDATOR_MERGE_ATTR,
jclass, decl );
+ }
}
}
- private void checkRelativePath( AnnotationMirror ann, TypeDeclaration
jclass, TypeDeclaration baseType )
+ private void checkRelativePath( AnnotationMirror ann, String memberName,
TypeDeclaration jclass, TypeDeclaration baseType )
{
if ( ann != null )
{
- AnnotationValue pathVal = CompilerUtils.getAnnotationValue( ann,
PATH_ATTR, true );
+ AnnotationValue pathVal = CompilerUtils.getAnnotationValue( ann,
memberName, true );
if ( pathVal != null )
{
@@ -391,7 +398,7 @@
if ( ! WebappPathType.relativePathExists( path, jclass,
getEnv() ) )
{
getDiagnostics().addWarning(
- pathVal, "warning.inherited-file-not-found", path,
+ ann, "warning.inherited-file-not-found", path,
ANNOTATION_INTERFACE_PREFIX +
ann.getAnnotationType().getDeclaration().getSimpleName(),
baseType.getQualifiedName() );
}
Modified:
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties?view=diff&r1=160634&r2=160635
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties
(original)
+++
incubator/beehive/trunk/netui/src/compiler-core/org/apache/beehive/netui/compiler/diagnostics.properties
Fri Apr 8 15:48:18 2005
@@ -182,7 +182,7 @@
error.no-matching-shared-flow-declared = There is no {0} annotation that
declares a shared flow with name "{1}".
warning.annotated-abstract-method = This annotation will have no effect on an
abstract method.
-warning.inherited-file-not-found =
+warning.inherited-file-not-found = \
File "{0}" (reference inherited from a {1} annotation on {2}) could not be
found in the web application.
error.absolute-path-required-for-tiles-def = \
Modified:
incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/web.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/web.xml?view=diff&r1=160634&r2=160635
==============================================================================
--- incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/web.xml
(original)
+++ incubator/beehive/trunk/netui/src/webapp-template/default/WEB-INF/web.xml
Fri Apr 8 15:48:18 2005
@@ -106,9 +106,4 @@
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
-
- <error-page>
- <error-code>500</error-code>
- <location>/error.jsp</location>
- </error-page>
</web-app>